Re: [xsl] Passing through character entities intact

Subject: Re: [xsl] Passing through character entities intact
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 11 Oct 2001 07:45:45 +0100
>>>>> "Angus" == McCollum , Angus <AMcCollum@xxxxxxxx> 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 '&amp;' 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 "&dash;">

-- 
Colin Paul Adams
Preston Lancashire

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread