This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Loosing encoding information
- From: "Ragulf Pickaxe" <jawxml at hotmail dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 20 Feb 2002 13:55:15 +0000
- Subject: [xsl] Loosing encoding information
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello again,
Hopefully not problem but question (whether it is a problem for me depends
on the answers to my question :)
Julian Reschke:
> > Set oXml = Server.CreateObject("MSXML2.DOMDocument")
> > Set oXsl = Server.CreateObject("MSXML2.DOMDocument")
> >
> > call oXml.loadXML(vXmlData)
> > call oXsl.load(Server.MapPath(".\Stylesheets\File.xsl"))
> >
> > sData=oXml.transformNode(oXsl)
> > Response.Write(sData)
>
>Never do that. You'll loose encoding information.
>
>Use
>
> oXml.transformNode(oXsl, Response)
>
>instead.
>
>And complain to MSDN about their faulty examples.
>
I have never heard of this, loosing encoding information before, and I use
this code all over when transforming my documents. Can you (or anyone else)
please explain to me what exactly I am loosing? (When I say encoding, I
strongly presume that you don't mean the character encoding as in the
problem I had, but in a broader way...?)
Insidently, I looked up w3shool.com, looking for examples of the "right"
way, and they showed (transforming on the client):
..
document.write(xml.transformNode(xsl))
Which is not exactly the same as Julian Reschke's example, but doesn't
convert it into a string, before output, either.
Thank you again
Ragulf Pickaxe :)
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list