This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Passing through character entities intact


>>>>> "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 '&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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]