This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Passing through character entities intact
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Passing through character entities intact
- From: "McCollum , Angus" <AMcCollum at grow dot net>
- Date: Wed, 10 Oct 2001 17:08:11 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@mitretek.org]
Sent: Wednesday, October 10, 2001 4:43 PM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] 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