|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Passing through character entities intact
[McCollum , Angus] > I would like pass the entity through so I can use a non-encodable > character(mdash) in the final output. What happens in Xalan, is that when it > finds a '&' character code it substitues the '&' reference. This does > not work for non-standard, but common references such as mdash. As a result > setting the output encoding to ISO_8859-1, which is the most compatable for > the web, will cause an XSLT processor to throw and error or input a > character like '?' instead of the entity reference. > Hmm, if it's non-encodable then how can it be encoded in the output? Conversely, if it is encodable, the processor should encode it, otherwise it should output a character reference. Have you tried another processor to see whether it handles it more to your liking? They don't all do the same thing. Sometimes you actually get the right thing but it looks different depending on your editor or viewer and the encoding in use. If you look at the result with a hex editor, the character reference is really there. I just tried this out, transforming an XML document with a   in it, using utf-8 and iso-8859-1. Depending on the encoding and the processor, it displayed differently in XML Cooktop on Windows 2000 (variously as a space or an A with an hat over it), but the hex viewer showed that   was actually in all these versions. So you may really be getting the result you want but not realize it. Cheers, Tom P XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








