Re: ASP/XSL transform problem -- go figure!

admin

Administrator
Staff member
Problem solved!The server has not had the "xmlinst" treatment done to it, thus MS XML parsers2 and 3 can be referenced on the same server. I needed to explicitely referencethe MSXML 3.0 parser.If I created the DOM in the following manner, the XSL transformation worked:Set objXML = Server.CreateObject("MSXML2.DOMDocument")(same for the DOM holding the XSL template).and this also worked:Set objXML = Server.CreateObject("MSXML2.DOMDocument.3.0")-----------------------------------------------------------"Hal" <[email protected]> wrote:>>I am terribly vexed. I can't get my XML to transform with the XSL template>when I run it on my remote webhost.>>Below is ASP code that creates a webpage from an "transformNode" methodcall.>When I run it against my webhost server, all I get back is the XSL.>>When I run it on my local computer with either PWS, VB, or XML Spy, thetransformation>generates the page I want from the template (XSL).>>Things I know:>1. My local machine has Windows 98 SE, and both MSXML 3 and 4.>2. I had the webmaster install MSXML 3 on the webhost server. I tested it>by making a call to instantiate the parser in the following way:>Server.CreateObject("MSXML2.DOMDocument.3.0")>[I could load this DOM and return XML from it]>3. Webhost computer is running NT4>>Suggestions would be greatly appreciated!>>--------------CODE-------------------->> Option Explicit>> Dim objXML> Dim objXSL> Dim objXslDocElement> Dim strMessage> Dim strResult> Dim strXmlFilePath> Dim strXslFilePath>>>> Set objXML = Server.CreateObject("MSXML.DOMDocument")> objXML.async = false>> Set objXSL = Server.CreateObject("MSXML.DOMDocument")> objXSL.async = false>> strXmlFilePath = Server.MapPath("detailfm.xml")> strXslFilePath = Server.MapPath("detailfrm.xsl")>> If objXML.load(strXmlFilePath) Then> If objXSL.load(strXslFilePath) Then> Set objXslDocElement = objXSL.documentElement> If Not (objXslDocElement Is Nothing) Then> strResult = objXML.transformNode(objXslDocElement)> Response.Write strResult> End If> End If> End If
 
Back
Top