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

Re: [xsl] msxml apostrophe encoding

Subject: Re: [xsl] msxml apostrophe encoding
From: Emmanouil Batsis <Emmanouil.Batsis@xxxxxxxxxxx>
Date: Tue, 11 Jan 2005 16:28:38 +0200

fchoodless@xxxxxxxxxxx wrote:


I can't seem to get certain type of apostrophe () to show up correctly when transforming client side with Javascript and using transformNodeToObject. It's a curly apostrophe which is typically cut and paste from word, etc. The end of the code I'm using to transform is here, it's being inserted into the middle of an html page. xml.transformNodeToObject(xsl, resultdoc); document.write(xml.transformNode(xsl));

First of all you may want to avoid document.write. Also, why are you transforming twice? I believe you need to

someElement.innerHTML = xml.transformNode(xsl);


xml.transformNodeToObject(xsl, resultdoc);
someElement.innerHTML = resultdoc.xml;

using the DOM to append the result instead of innerHTML would be a lot better.

As for the apostrophe, just save as HTML from word to tell us how Word outputs that. Once the character is identified, i'm sure someone will figure oout the right entity to use. However i dont think you will need to, the problem probably has to do with document.write (but please ensure you are using UTF-8 or something when trying the above).



Current Thread