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: Colin Paul Adams <colin at colina dot demon dot co dot uk>
- Date: 11 Oct 2001 07:45:45 +0100
- References: <53A29CF72629D511B5C600B0D0AB708507C161@PALM>
- Reply-To: xsl-list at lists dot mulberrytech dot com
>>>>> "Angus" == McCollum , Angus <AMcCollum@grow.net> writes:
Angus> I would like pass the entity through so I can use a
Angus> non-encodable character(mdash) in the final output. What
Angus> happens in Xalan, is that when it finds a '&' character
Angus> code it substitues the '&' reference. This does not
Angus> work for non-standard, but common references such as
Angus> mdash. As a result setting the output encoding to
Angus> ISO_8859-1, which is the most compatable for the web, will
Angus> cause an XSLT processor to throw and error or input a
Angus> character like '?' instead of the entity reference.
This is impossible to achieve - mdash is not supported by ISO 8859-1.
Output as UTF-8 - most web browsers support that now.
Alternatively, in the internal subset of the input document, define
mdash as a hyphen:
e.g. here's how I do it in docbook, when I intend ISO 8859-1 output
for HTML:
<!ENTITY mdash "‐">
--
Colin Paul Adams
Preston Lancashire
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list