Re: [xsl] Switching off character entity resolution in XSL

Subject: Re: [xsl] Switching off character entity resolution in XSL
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 4 Feb 2004 10:13:36 GMT
  I realise there is some way of dealing with this with character
  substitutions before or after using something like sed, but this isn't
  really a great solution,

Great or not, it's what we all do:-)
sed -e "s/&/[[[AMP]]]/g" file.xml > tmp.xml
saxon -o tmp2.xml tmp.xml style.xsl
sed -e "s/[[AMP]]/&/g" tmp2.xml > result.xml

XSLT2 provides a character map functionality which allows characters to
be rewritten back as entity references or anything else.

For XSLT1 a system is _allowed_ to do that but probably won't unless it
has some mechanism of supplying a non standard serialiser. Many of the
java ones do have such an facility I think.



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

 XSL-List info and archive:

Current Thread