xsl-list
[Top] [All Lists]

RE: character transformation.

2003-08-13 02:53:39
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]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 ® and ™ in my XML doc but the ™ gets
transformed to this "corrupt" character while ® 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



<Prev in Thread] Current Thread [Next in Thread>