xsl-list
[Top] [All Lists]

RE: Simple XML to XML transformation question

2004-11-18 07:07:54
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.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--