xsl-list
[Top] [All Lists]

RE: [xsl] sgml to xml

2009-10-22 03:48:31

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

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 


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

<Prev in Thread] Current Thread [Next in Thread>