Subject: Re: [xsl] Re: Microsoft.XMLDOM UTF-8 Encoding! From: "[Tech]" <tech@xxxxxxxxxxx> Date: Sat, 12 Jul 2003 09:03:05 -0400 |
Ok, you just dont understand my poor english! I dont have problem with load or parse !!!!! Tx for you time. ----- Original Message ----- From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, July 12, 2003 8:56 AM Subject: [xsl] Re: Microsoft.XMLDOM UTF-8 Encoding! > > "[Tech]" <tech@xxxxxxxxxxx> wrote in message > news:004201c34868$957de3c0$0200a8c0@xxxxxxx > > I repeat, > > > > I dont have problem to parse the XML. All caracters are UTF-8 encoding. > > So response.write(dom.transformNode(xsl)) show the writh thing! > > This is a FAQ: > > Either use: > > dom.transformNodeToObject(xsl, response) > > or use IXSLTemplate, IXSLProcessor -- the slightly modified example from > the MSXML4 SDK is: > > var xslt = new ActiveXObject("Msxml2.XSLTemplate.4.0"); > var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0"); > var xslProc; > xslDoc.async = false; > xslDoc.load("sample2.xsl"); > xslt.stylesheet = xslDoc; > var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0"); > xmlDoc.async = false; > xmlDoc.load("books.xml"); > xslProc = xslt.createProcessor(); > xslProc.input = xmlDoc; > > xslProc.output = response; // <=== this is the important line of code > > xslProc.transform(); > > > What happens is that whenever a string variable is set to the result of the > transformation, this result is converted into UTF-16, because a string in > any MS scripting language and VB is of type BSTR, that is 16 bit Unicode. > > This can be avoided in one of the above ways, by setting the result > transformation directly into a stream object, without an intermediate > conversion to string. > > > > ===== > Cheers, > > Dimitre Novatchev. > http://fxsl.sourceforge.net/ -- the home of FXSL > > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Microsoft.XMLDOM UTF-8 E, Dimitre Novatchev | Thread | [xsl] Re: Re: Microsoft.XMLDOM UTF-, Dimitre Novatchev |
[xsl] Re: Microsoft.XMLDOM UTF-8 E, Dimitre Novatchev | Date | RE: [xsl] Selecting a particular at, Michael Kay |
Month |