OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


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


That was supposed to say "I'll *bet* you a nickel ...".

Anyway, I decided this problem needed to be fixed for Xalan too, because the
stylesheet is automatically *generating* the trademark character when the
<trademark> element is used with no class attribute.  That's because the DTD
says 'trademark' is the default value of the class attribute (to be fixed in
the forthcoming 4.4 DTD), so it is automatically inserted by the parser. The
XSLT processor can't tell if an attribute was defaulted or manually entered.

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">

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Bob Stayton" <bobs@sagehill.net>
To: <paul_t100@fastmail.fm>
Cc: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, October 21, 2004 6:03 PM
Subject: Re: [docbook-apps] trademark tag not rendered correctly in javahelp


> Hi Paul,
> I'll be you a nickel that your ant task is running the built-in Xalan
> instead of Saxon, despite what you ask for in your classpath.  I don't
know
> enough about ant to debug it, though.
>
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
>
>
> ----- Original Message ----- 
> From: "Paul Taylor" <paul_t100@fastmail.fm>
> To: "Bob Stayton" <bobs@sagehill.net>
> Cc: <docbook-apps@lists.oasis-open.org>
> Sent: Thursday, October 21, 2004 9:46 AM
> Subject: Re: [docbook-apps] trademark tag not rendered correctly in
javahelp
>
>
> > Hi Bob
> >
> > Ive found the problem I think (though not the solution), Im actually
> > using ant to build my help which i omitted to metion before and Im not
> > sure if it is using saxon properly
> >
> > I processed your file as follows (javahelpdriver.xsl is the same as your
> > customjavahelp.xsl) in ant
> >
> > <xslt basedir="." classpath="C:/Apps/java/Help/Saxon6/saxon.jar"
> > includes="smalltest.xml" destdir="."   extension=".html"
> >
style="c:/apps/java/help/docbook-xsl-1.65.1/javahelp/javahelpdriver.xsl">
> >
> > and it returned ;trade
> >
> > I then tried running saxon directly as follows:
> > java -jar C:/Apps/java/Help/Saxon6/saxon.jar smalltest.xml
> > c:/apps/java/help/docbook-xsl-1.65/javahelp/javahelpdriver.xsl
> >
> > and it returned 0x3E 0xE2
> >
> > Paul
> >
> > >
> > >
> > >----- Original Message ----- 
> > >From: "Paul Taylor" <paul_t100@fastmail.fm>
> > >To: "Bob Stayton" <bobs@sagehill.net>;
> <docbook-apps@lists.oasis-open.org>
> > >Sent: Wednesday, October 20, 2004 1:48 AM
> > >Subject: Re: [docbook-apps] trademark tag not rendered correctly in
> javahelp
> > >
> > >
> > >
> > >
> > >>Hi Bob
> > >>
> > >>I provided the full files I'm running in an earlier mail. Are you
> > >>actually testing this with javahelp.xsl or just the html xsl ?
> > >>If you are I think Ill just give up on this and use the superscript
fix
> > >>you wrote earlier
> > >>thanks Paul
> > >>Bob Stayton wrote:
> > >>
> > >>
> > >>
> > >>>Paul,
> > >>>It would help if you could provide full details of how you are
> processing
> > >>>your files.  I can't get Saxon on Windows to output &trade; no matter
> > >>>
> > >>>
> > >what I
> > >
> > >
> > >>>try.   So I'm mystified that you can't seem to prevent it.
> > >>>
> > >>>If you are using a script and a customization layer, try running a
> > >>>
> > >>>
> > >straight
> > >
> > >
> > >>>java command using the stock javahelp stylesheet from the
distribution.
> > >>>
> > >>>
> > >And
> > >
> > >
> > >>>write the files to a different location so you can compare them for
> other
> > >>>changes.
> > >>>
> > >>>Bob Stayton
> > >>>Sagehill Enterprises
> > >>>DocBook Consulting
> > >>>bobs@sagehill.net
> > >>>
> > >>>
> > >>>----- Original Message ----- 
> > >>>From: "Paul Taylor" <paul_t100@fastmail.fm>
> > >>>To: "Mauritz Jeanson" <mj@johanneberg.com>
> > >>>Cc: <docbook-apps@lists.oasis-open.org>
> > >>>Sent: Monday, October 18, 2004 2:12 PM
> > >>>Subject: Re: [docbook-apps] trademark tag not rendered correctly in
> > >>>
> > >>>
> > >javahelp
> > >
> > >
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>>I dont know if Im missing the point but Ive done as you suggested
and
> > >>>>changed my script, the output files still contain &trade;
> > >>>>Im running on Windows vould this be a problem
> > >>>>
> > >>>>
> > >>>>Mauritz Jeanson wrote:
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>>>-----Original Message-----
> > >>>>>>From: Paul Taylor
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>>Ok I tried to this by creating a file javahelpdriver which
> references
> > >>>>>>javahelp (this is the way Ive pased paramters before and it doesnt
> > >>>>>>require me to alter the docbook stuff directly) but it didnt work
,
> > >>>>>>however Im probably calling it wrong.
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>...
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>><xsl:output method="html"
> > >>>>>>encoding="UTF-8"
> > >>>>>>indent="no"
> > >>>>>>saxon:character-representation="native;decimal"/>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>Since you are generating HTML chunks for JavaHelp, you must set the
> > >>>>>parameters like this:
> > >>>>>
> > >>>>><xsl:param name="chunker.output.encoding">UTF-8</xsl:param>
> > >>>>><xsl:param
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>name="saxon.character.representation">native;decimal</xsl:param>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>>>With these particular settings, you will get raw (native) UTF-8
with
> no
> > >>>>>entity references or character references at all.
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>>>Just seen this, saxon is outputting &trade; which doesnt work. I
> > >>>>>>>havent yet tried getting it to output the &#8482 but Ill
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>try tommorrow.
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>There must be something very strange going on if you are getting
> > >>>>>
> > >>>>>
> > >&trade;.
> > >
> > >
> > >>>>>Saxon doesn't know about that entity reference, and cannot output
it.
> > >>>>>
> > >>>>>/MJ
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >>
> >
> >
> >
> >
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]