RE: [xsl] Passing through character entities intact

Subject: RE: [xsl] Passing through character entities intact
From: "McCollum , Angus" <AMcCollum@xxxxxxxx>
Date: Wed, 10 Oct 2001 17:08:11 -0400
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 '&amp;' 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: [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


Current Thread