RE: [xsl] Simple XML to XML transformation question

Subject: RE: [xsl] Simple XML to XML transformation question
From: "Joe Heidenreich" <HeidenreichJ@xxxxxxxx>
Date: Thu, 18 Nov 2004 09:07:54 -0500
David Wrote:
>   view source in IE always shows the original source not the transform.


I was sort of thrown into the middle of learning XSLT from a pre-existing
project. They handled their transforms like this:

 Dim sourceFile, styleFile, source
 'sourceFile = Server.GetFile()
 styleFile = Server.MapPath("style.xsl")

 'Load the XML
 set source = Server.CreateObject("MSXML2.DOMDocument")
 source.async = false
 source.load(path)

 ' Load the XSL
 set  style = Server.CreateObject("MSXML2.DOMDocument")
 style.async = false
 style.load styleFile

 result = source.transformNode(style)
 Response.Write(result)

Which produces the transform in the browser, and by viewing the source you do
see the transformed file. Even if the output method is XML, when the document
is translated you will not see unknown elements in the browser, but they would
show up in the source. Is this a bad practice? Is there a better way to be
handling this?

I have since edited this code so that my output is written to a file instead
of to a browser, but it would be a way to have the view source show the
transform.

Current Thread