[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: MSXML / NBSP problem and resolution

Subject: Re: MSXML / NBSP problem and resolution
From: "Michael H. Semcheski" <mhs-list@xxxxxxxxx>
Date: Thu, 07 Nov 2002 12:17:18 -0500
transformnode utf 16


The question then, is MSXML 3.0 broken because it adds the meta node into the result set if output method="html"?



No it is _mandated_ to add a meta element by the XSLT spec.
It has to place a meta element reflecting the encoding it actually used
rather than the encoding you request in xsl:output.


This makes sense so far...

If you call msxml so that it produces a dom or similar in memory
representation then it always uses utf16 and ignores the requested output
encoding. If you ask it to output to a file or string then it will use
the encoding you request if it is supported on your platform.


The way do a transformation in MSXML with ASP:


const XSL = "structure.xsl"
const XML = "data.xml"
Set xmldoc = Server.CreateObject("MSXML2.DOMDocument.3.0")
Set xsldoc = Server.CreateObject("MSXML2.DOMDocument.3.0")

xmldoc.Load Server.MapPath(XML)
xsldoc.Load Server.MapPath(XSL)

strOutput = xmldoc.transformNode(xsldoc)
response.write strOutput

So what you are saying makes sense except that the transformNode returns a string, not an XML document or node set, so the encoding should be what I requested and not encoding of the internal DOM.

i.e., I still don't understand why it is adding that meta tag into the output. (though there is a lot more light on the subject now.)

Mike


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.