xsl-list
[Top] [All Lists]

Re: Switching off character entity resolution in XSL

2004-02-04 03:13:36
  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.

David

-- 
http://www.dcarlisle.demon.co.uk/matthew

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

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list