This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to preserve numerical representation of chars when parsing?
At 15:55 05.09.2002 +0100, you wrote:
> Is there any possibility to let the numerical references pass
transparently?
> If not, what would be a good solution?
No, but if you request an output encoding (eg ascii) that does not
include the chracters they will be output as numeric references (however
they were input).
However most of your characters are in ascii range so most likey
supported most encodings.
You can always do
sed -e "s/#/#/g"
to the result of the XSLT.
David
Thanks David,
I guess you already helped me one time.. :)
The problem with post-processing is that one can not make use of the
powerful navigational possibilities of xslt. The whole processing must take
place in a flat/ non-hierachical way. I.e. when the refs should only be
replaced wihtin one element, it gets tricky, although everything is
possible with sed/regexp etc.
One could ask "Why not just go over to the "real" characters instead of the
numerical refs?" Numerical refs make sense where text content goes through
several systems with different char treating. With the numerical ref, it is
always clear what char it should be.
I suggest to consider a setting/property for XML Parsers that allows to not
expand numerical refs. Would this make any sense or is this feature too
exotic to consider?
Greets,
Thomas
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list