RE: [xsl] sgml to xml

Subject: RE: [xsl] sgml to xml
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 22 Oct 2009 08:47:50 +0100
> But in the OSX the character references are getting converted 
> into their respective characters. Is there any option to 
> retain the character references as in the input file.

No, there is not. The XSLT processor only sees the character, not the way it
was typed at the keyboard.

You can force the processor to generate character references on output by
using a restricted repertoire in the output encoding, for example
encoding="us-ascii". But if you need the original character references to be
retained verbatim, the only way is to apply a text-preprocessing phase
before XML parsing, for example to turn &xxxx; into $$$xxxx; (and then
invert the process on the output).


Michael Kay 

Current Thread