[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to preserve numerical representation of chars

Subject: Re: How to preserve numerical representation of chars when parsing?
From: Thomas Brand <brand@xxxxxxxxx>
Date: Fri, 06 Sep 2002 10:37:48 +0200
thomas brand
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/#/&#035/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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.