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>
- Subject: RE: [xsl] Passing through character entities intact
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 11 Oct 2001 10:26:51 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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)?
You can't, because XSLT processes the tree produced by the XML parser, and
that tree doesn't retain character entities.
The trick is to turn the character entities into something else (e.g. a
processing instruction) before XML parsing, which you can do by
preprocessing e.g. in Perl.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list