[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XMLDOM Create object problem

  • To: <joe@r...>
  • Subject: Re: XMLDOM Create object problem
  • From: "asim" <qazi@a...>
  • Date: Wed, 19 Feb 2003 15:55:08 -0800
  • Cc: <xml-dev@l...>
  • References: <F258JKdXe7Ce1GTtBXO0000a410@h...>

xmldom create
all of my xsls are of this type ... i dont know what any thing abt xptah or
XSLPattern , coz i m new to it .... plz help

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="query-data">
<table align="center" cellpadding="0" cellspacing="0" width="100%"
border="0">
<tr><td>helloo</td></tr>
</table>
</xsl:template>
</xsl:stylesheet>

----- Original Message -----
From: "Joe Fawcett" <joefawcett@h...>
To: <qazi@a...>
Sent: Wednesday, February 19, 2003 2:24 AM
Subject: Re:  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@a...>
> >To: <xml-dev@l...>
> >Subject:  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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.