xsl-list
[Top] [All Lists]

Re: generating numerical character entities in html output

2005-01-18 04:12:26

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
references. 

  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.

David

________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--