RE: Passing through character entities intact
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. - Angus -----Original Message----- From: Thomas B. Passin [mailto:tpassin@xxxxxxxxxxxx] Sent: Wednesday, October 10, 2001 4:43 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Passing through character entities intact [McCollum , Angus] > How do you take a character entity in an input document and pass it through > to the output document as an entity(i.e. without any change)? > Basically, you can't. By "character entitiy" I take it you mean "character reference". These are handled by the parser before any xslt processing takes place, so there is nothing you can do about them with the xsl. It is possible that a serializer might have to output character references because of the output encoding, but that is not the same as passing the references through. Most people would be asking why you think you need the character references passed through anyway? Cheers, Tom P XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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