[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] generating numerical character entities in html output

Subject: Re: [xsl] generating numerical character entities in html output
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 18 Jan 2005 11:12:26 GMT

Note that numerical character references are not entity references (the
archives will show a longish threaad on this subject within the last
month or so) they are expanded at different times. Note however that
both are expanded by the XML parser before XSLT starts: the XSLT engine
just sees the characters and has no record of any entity or character

  I'm particularly puzzled by the fact that

  <xsl:text disable-output-escaping="yes">&amp;</xsl:text>

The amp entity reference is expanded by the XML parser to a single
ampersand character as the content of that element.

Normally when an ampersand is linearised on output it is written as
&amp; but d-o-e stops that and it will generate a & not &amp; (which
appears to be the opposite of what you said).

  correctly generates "&amp;" in the html code but

  <xsl:text disable-output-escaping="yes">&#64;</xsl:text>

Here the reference is to an @ character, @ characters are never escaped
on output so d-o-e has no effect.

personally I wouldn't try to get character references in output, I doubt
that any email scrapper that is capable of reading an html page at all
will be able to read these so it isn't really hiding anything.
If you really want them, XSLT probably isn't your system of choice.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread