This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [docbook-apps] trademark tag not rendered correctly in javahelp


> -----Original Message-----
> From: Bob Stayton 
> 
...
> So I added a kludge to javahelp.xsl to the 
> "dingbat.characters" template,
> which generates the trademark symbol for <trademark>.  If the 
> processor is
> Xalan, it outputs <sup>TM</sup> for the trademark symbol.  
> But it won't have
> any effect on any &trade; symbols you enter in your text.  
> For those, you
> should customize the entity definition in the internal subset of your
> documents, or in a special javahelp customization of the DTD:
> 
> <!ENTITY trade "<superscript>TM</superscript">

I have found another, maybe somewhat less kludgy, solution.

To prevent Xalan from producing entity references, you can create a file
that overrides the HTMLEntities.properties file that maps characters and
HTML entities, and then point to it in the JavaHelp customization layer:

<xsl:output encoding="UTF-8"
            xalan:entities="somefile"/>

The existence of this file, empty or not, disables HTML entities altogether
(which is good for JavaHelp). The idea is that you should be able to define
your own mappings, but for that to work you have to rebuild xalan.jar after
editing HTMLEntities.properties.

See http://xml.apache.org/xalan-j/usagepatterns.html#outputprops.

And this does work for HTML chunks. The xalanredirect:write element that
Xalan uses to generate chunks does not have any encoding or entities
attribute, but the attributes on xsl:output are recognized.

/MJ


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]