Subject: [xsl] Re: [xml-dev] XMLDOM Create object problem From: "asim" <qazi@xxxxxxxxxxx> Date: Wed, 19 Feb 2003 15:50:49 -0800 |
ok can i use set style = Server.CreateObject("Microsoft.XMLDOM") for any of the version of xml dom , it will work fine ? From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx> To: <qazi@xxxxxxxxxxx> Sent: Wednesday, February 19, 2003 2:24 AM Subject: Re: [xml-dev] XMLDOM Create object problem > You were originally using XSLPattern not Xpath in your stylesheet. It > probably needs changing in a couple of places. Let's see it. > Joe > > > > > > > >From: "asim" <qazi@xxxxxxxxxxx> > >To: <xml-dev@xxxxxxxxxxxxx> > >Subject: [xml-dev] XMLDOM Create object problem Date: Wed, 19 Feb 2003 > >14:52:32 -0800 > > > >Hi All > > when i was having msxml3.0 installed on my system this code was running > >fine to generate HTML from server > > > > > >function TransformDocument(srcXML, srcXSL) > > Dim sourceFile, styleFile, source > > 'sourceFile = Server.MapPath(srcXML) > > styleFile = srcXSL > > ' Load the XML > > set source = Server.CreateObject("Microsoft.XMLDOM") > > source.async = false > > 'source.load sourceFile > > source.loadXML srcXML > > ' Load the XSL > > set style = Server.CreateObject("Microsoft.XMLDOM") > > style.async = false > > style.load styleFile > > > > if (source.parseError.errorCode <> 0) then > > result = reportParseError(source.parseError) > > elseif (style.parseError.errorCode <> 0) then > > result = reportParseError(style.parseError) > > else > > on error resume next > > result = source.transformNode(style) > > if (err.number<>0) then > > result = reportRuntimeError(exception) > > end if > > end if > > TransformDocument = result > >End Function > > > >function reportParseError(strError) > > Response.Write strError & "<br>" > >end function > > > > > >but when i upgraded my dom from 3.0 to 4.0 it started throwing xsl on the > >client ........... > >so i made the the following changes , now it running fine ..... can anybody > >help whats the problem > > > > > > > >function TransformDocument(srcXML, srcXSL) > > Dim sourceFile, styleFile, source > > 'sourceFile = Server.MapPath(srcXML) > > styleFile = srcXSL > > ' Load the XML > >'/////// i changed this line > > set source = Server.CreateObject("MSXML2.DOMDocument.4.0") > > source.async = false > > 'source.load sourceFile > > source.loadXML srcXML > > ' Load the XSL > >'/////// i changed this line > > set style = Server.CreateObject("MSXML2.DOMDocument.4.0") > > style.async = false > > style.load styleFile > > > > if (source.parseError.errorCode <> 0) then > > result = reportParseError(source.parseError) > > elseif (style.parseError.errorCode <> 0) then > > result = reportParseError(style.parseError) > > else > > on error resume next > > result = source.transformNode(style) > > if (err.number<>0) then > > result = reportRuntimeError(exception) > > end if > > end if > > TransformDocument = result > >End Function > > > >function reportParseError(strError) > > Response.Write strError & "<br>" > >end function > > > _________________________________________________________________ > Stay in touch with MSN Messenger http://messenger.msn.co.uk XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] PHP users to test light-weigh, Terence Kearns | Thread | [xsl] How to Handle Attributes Cont, Imrran Wahid |
Re: [xsl] The Perils of Sudden Type, Kurt Cagle | Date | [xsl] How to Handle Attributes Cont, Imrran Wahid |
Month |