[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] character transformation.


Subject: RE: [xsl] character transformation.
From: "Julian Reschke" <julian.reschke@xxxxxx>
Date: Wed, 13 Aug 2003 11:53:39 +0200

> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Paul Barclay
> Sent: Wednesday, August 13, 2003 10:51 AM
> To: XSLList
> Subject: RE: [xsl] character transformation.
>
>
> > Corrupt?
>
> I get a small square like the charset does not have the correct
> character reference.
>
> The only browser that can render it seems to be Konquror, while I am all
> for this the spec is that it works on IE6 and Netscape 4 and above.

If it doesn't work in IE6, you almost certainly have a broken encoding
declaration or a mismatch betwen XML declaration, META tag and/or HTTP
content type. FAQ.

And btw, forget about Netscape 4.

> I have tried using &reg; and &trade; in my XML doc but the &trade; gets
> transformed to this "corrupt" character while &reg; stays the same.
>
> I have solved it by defining the following entities:
>
> 	<!ENTITY tm "<![CDATA[&trade;]]>">
> 	<!ENTITY copy "<![CDATA[&copy;]]>">
> 	<!ENTITY reg "<![CDATA[&reg;]]>">
>
> I have also disabled output escaping in the XSL doc and this works
> great. However these entitey are no good for using in CDATA elements. So
> I have to define a new set of entities for that. As you can see it is
> going to get messy.

This is a non-portable workaround. XSLT engines are not required to support
this. Don't do this, *in particular* not to workaround a bug that's
somewhere else.

Julian

--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760


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



Current Thread
Keywords