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

XSL Problem

Subject: XSL Problem
From: "retmmc" <retmmc@xxxxxxxxxxxxx>
Date: Wed, 7 Jul 2004 14:48:08 -0500
msxml3.dll 0x80004005
To begin with, I'm fairly new (actually brand new) to XML/XSL programming.
I am trying to create an piece to display references, job aids and/or
glossary items for a topic in an eLearning event. The problem arises when I
try to transform my XML doc with an XSL stylesheet using VBScript/ASP.

In index.asp I have the following code:

    Dim objXML
    Dim objXSL
    Dim strLoId
    Dim strXMLFile
    Dim strXSLFile

    strXMLFile = "resources.xml"
    strXSLFile = "resources.xsl"
    strLoId = Request.QueryString("loid")

    'Instantiate the XMLDOM Object that will hold the XML file.
    set objXML = Server.CreateObject("Microsoft.XMLDOM")

    'Turn off asynchronous file loading.
    objXML.async = false

    'Load the XML file.
    objXML.load(strXMLFile)

    'Instantiate the XMLDOM Object that will hold the XSL file.
    set objXSL = Server.CreateObject("Microsoft.XMLDOM")

    'Turn off asynchronous file loading.
    objXSL.async = false

    'Load the XSL file.
    objXSL.load(strXSLFile)

    'Use the "transformNode" method of the XMLDOM to apply the XSL
    'stylesheet to the XML document. Then the output is written to the
    'client.
    Response.Write(objXML.transformNode(objXSL))

This produces the following error:
    msxml3.dll (0x80004005)
    The stylesheet does not contain a document element. The stylesheet may
be empty, or it may not be a well-formed XML document.

My test stylesheet code follows:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:output method="html" />

 <xsl:template match="/">
  <html>
   <head>
    <title>Support Documents for <i>insert object name here</i></title>
    <link rel='stylesheet' type='text/css' href='ca2.css' />
   </head>
   <body>
    <xsl:apply-templates select="los" />
   </body>
  </html>
 </xsl:template>

 <xsl:template match="los">
  <h1>Support Documents for <i>insert object name here</i></h1>
  <xsl:apply-templates select="lo" />
 </xsl:template>

 <xsl:template match="lo">
  <h2>Matched LO</h2>
  <xsl:apply-templates select="references" />
  <xsl:apply-templates select="job_aids" />
  <xsl:apply-templates select="glossary" />
 </xsl:template>
 <xsl:template match="references">
  <h3>Matched References</h3>
 </xsl:template>
 <xsl:template match="job_aids">
  <h3>Matched Job Aids</h3>
 </xsl:template>
 <xsl:template match="glossary">
  <h3>Matched Glossary</h3>
 </xsl:template>
</xsl:stylesheet>


When I run my XML file with the following line:

    <?xml-stylesheet version="1.0" type="text/xsl" href="resource.xsl"?>

everything displays as planned.

I need to run this via the asp page so I can get the loid parameter from the
querystring to display the proper document links.

Any ideas?

Thanks,
Raymond Sugel Sr


begin 666 Sugel Sr, Raymond.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..E-U9V5L(%-R.U)A>6UO;F0-
M"D9..E-U9V5L(%-R+"!287EM;VYD#0I/4D<Z0F%N:R!/;F4[0V]M;65R8VEA
M;"!%9'5C871I;VX@)B!0<F]F97-S:6]N86P@1&5V96QO<&UE;G0-"E1)5$Q%
M.E90+U1R86EN:6YG($-O;G-U;'1A;G0-"E1%3#M73U)+.U9/24-%.B@S,3(I
M(#DU-"TQ,3<Q#0I414P[2$]-13M63TE#13HH.#0W*2 T,C8M-C$V,PT*5$5,
M.T-%3$P[5D])0T4Z*#@T-RD@,S<P+38Q-C,-"E1%3#M73U)+.T9!6#HH,S$R
M*2 Y-30M,3(P.0T*0412.U=/4DL[14Y#3T1)3D<]455/5$5$+5!224Y404),
M13H[4WES=&5M<RP@5V]R:W-T871I;VYS("8@5&5C:&YO;&]G>3LQ($)A;FL@
M3VYE(%!L87IA/3!$/3!!24PQ+3 W,C [0VAI8V%G;SM)/0T*3#LV,#8W, T*
M3$%"14P[5T]22SM%3D-/1$E.1SU154]4140M4%))3E1!0DQ%.E-Y<W1E;7,L
M(%=O<FMS=&%T:6]N<R F(%1E8VAN;VQO9WD],$0],$$Q($)A;FL@3VYE(%!L
M87IA/3!$/3!!24PQ+3 W,C ],$0]#0H],$%#:&EC86=O+"!)3" V,#8W, T*
M0412.TA/344Z.SLV-3$@4RX@-W1H.U=E<W0@1'5N9&5E.TE,.S8P,3$X#0I,
M04)%3#M(3TU%.T5.0T]$24Y'/5%53U1%1"U04DE.5$%"3$4Z-C4Q(%,N(#=T
M:#TP1#TP05=E<W0@1'5N9&5E+"!)3" V,#$Q. T*14U!24P[4%)%1CM)3E1%
M4DY%5#IR87EM;VYD7W-U9V5L7W-R0&)A;FMO;F4N8V]M#0I%34%)3#M)3E1%
M4DY%5#IR971M;6- 86UE<FET96-H+FYE= T*4D56.C(P,#0P-S W5#$Y-#@P
/.%H-"D5.1#I60T%21 T*
`
end



Current Thread
  • XSL Problem
    • retmmc - Wed, 7 Jul 2004 14:48:08 -0500 <=

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
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-2011 All Rights Reserved.