[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Problem with rendering of  
Subject: Re: Problem with rendering of  
From: Julian Reschke <julian.reschke@xxxxxx>
Date: Wed, 14 Apr 2004 09:00:51 +0200
|
Richard.McMillian@xxxxxxxx wrote:
Thanks for info Tom, however with the change you suggested for the XSL, the
resulting HTML output still has this:
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
The charset=UTF-16 is not the issue. It is the content="text/html that
causes the
mal-rendering. Is there an option to give the microsoft parser not to
What's wrong with that? Except possibly that the encoding *isn't* UTF-16?
default
to this content value?
function GenOrder(xmlstr, xslfile)
dim xml, xsl, xslFileName, htmlDoc, tstr
set xml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument.3.0")
xml.async = FALSE
xml.validateOnParse = FALSE
xml.resolveExternals = FALSE
xml.preserveWhiteSpace = False
WriteToLog ("GenOrder xmlstr = " & xmlstr)
WriteToLog ("GenOrder xslfile = " & xslfile)
if xml.LoadXML(xmlstr) then
set xsl = Server.CreateObject("MSXML2.FreeThreadedDOMDocument.3.0")
xsl.async = false
xslFileName = Server.MapPath(xslfile)
xsl.load(xslFileName)
if xsl.parseError.errorCode <> 0 then
tstr = "<pre>XML Doc XSL Error" & vbCRLF _
& "Reason: " & xsl.parseError.reason & vbCRLF _
& "Line: " & xsl.parseError.line & vbCRLF _
& "Src: " & xsl.parseError.srcText & vbCRLF _
& "</pre>"
else
tstr = xml.transformNode(xsl)
Now this is the popular ASP XSLT problem #1. Never ever transform to a
string, because you'll use the intended encoding information. Always use
transformNodeToObject (for instance writing to the Response object) instead.
end if
end if
set xsl = nothing
set xml = nothing
GenOrder = tstr
end function
Regards, Julian
--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
Current Thread |
- RE: Problem with rendering of  , (continued)
- Andreas L. Delmelle - Tue, 13 Apr 2004 17:45:47 -0400 (EDT)
- Passin, Tom - Tue, 13 Apr 2004 17:44:49 -0400 (EDT)
- Richard . McMillian - Wed, 14 Apr 2004 00:45:20 -0400 (EDT)
- M. David Peterson - Wed, 14 Apr 2004 01:49:51 -0400 (EDT)
- Julian Reschke - Wed, 14 Apr 2004 03:01:45 -0400 (EDT) <=
- Richard . McMillian - Wed, 14 Apr 2004 15:57:44 -0400 (EDT)
- Passin, Tom - Wed, 14 Apr 2004 16:23:52 -0400 (EDT)
- Richard . McMillian - Thu, 15 Apr 2004 09:51:24 -0400 (EDT)
|
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|