xsl-list
[Top] [All Lists]

Re: [xsl] Supressing entity expansion during XSLT transform

2008-01-11 03:18:46

I am asking this question assuming that saxon:character-representation
can solve this problem. Is my assumption correct?

this extension has no effect on general entities such as the one in your
post it just affects how characters are output, as character data as hex
numeric references as decimal numeric references or as well known (html)
entity names.

As ken said, your problem, isn't soluable in XSLT as XSLt has no
information that the entity reference was ever there. You need to do a
non-xml pre-pass, something like

sed -i -e "s/&/[[[amp]]]/g" file.xml

converts &x; to [[[amp]]]x; then do the xslt, then do a referese text
replace to put the entities back.

David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

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