[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 11:21:15 -0500
msxml charset


As I understand it, "Auto-Select" in IE means "if there's no charset parameter
given in the Content-Type HTTP response header or in the equivalent META
element in the HTML document itself, then make an intelligent guess at the
document's encoding". So once you set Response.CharSet in the server, you
force the output to be transcoded to the encoding you choose, and it is
reported correctly in the HTTP headers, thus bypassing the auto-select logic in the client.


So your problem is just that you've still got the erroneous meta tag, right? I
think you will be able to fix it if you make sure that your stylesheet uses
<xsl:output method="html" encoding="iso-8859-1"/> and that you follow Andy's
examples to avoid storing your output in intermediate String objects.



Changing the encoding in the output method node does not seem to affect the meta tag inserted by MSXML right after the head, as long as the output method="html".


As I said earlier, it can be overridden by adding a response.charset at the top of the ASP page. The meta tag still appears, but presumably IE ignores the meta tag if the charset is explicitly defined in the http header.

The other alternative, as Thomas Nielsen pointed out, is to change the output method to xml, and add the meta node into the result document after the transformation. The downside of this, in my opinion, is that the method="html" output text is nicer to read and easier to debug, not a production issue, but for development its a PITA. Adding any whitespace to the document with output=xml (eg, indent="yes") sometimes changes the way the browser renders the page.


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



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.