Josh Campbell
01-15-2003, 03:41 AM
I am an XML newbie although I have been using ASP for a while now. I am trying to figure this stuff out so I put together a little sample to test it out and it's not working. The Asp is:
<%
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = false
objXML.load "document.xml"
Set objXSL = Server.CreateObject("Microsoft.XMLDOM")
objXSL.async = false
objXSL.load "document.xsl"
Response.Write(objXML.transformNode(objXSL))
Set objXSL = Nothing
Set objXML = Nothing
%>
The stylesheet looks like:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/2001/XSL/Transform" version="1.1">
<xsl:output method="html" />
<xsl:template match="/">
<xsl:apply-templates select="document" />
</xsl:template>
<xsl:template match="document">
<html>
<body>
<p>
Hi
</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
And the XML is:
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE document SYSTEM "document.dtd">
<document>
This text doesn't matter since it doesn't get displays this is just test text.
</document>
Whenever i run the script it says:
msxml3.dll error '80004005'
The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document.
I ran it thru Xalan and it came out like it was supposed to (Said Hi) so I know that there's a problem with the ASP. Thanks for any help.
<%
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = false
objXML.load "document.xml"
Set objXSL = Server.CreateObject("Microsoft.XMLDOM")
objXSL.async = false
objXSL.load "document.xsl"
Response.Write(objXML.transformNode(objXSL))
Set objXSL = Nothing
Set objXML = Nothing
%>
The stylesheet looks like:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/2001/XSL/Transform" version="1.1">
<xsl:output method="html" />
<xsl:template match="/">
<xsl:apply-templates select="document" />
</xsl:template>
<xsl:template match="document">
<html>
<body>
<p>
Hi
</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
And the XML is:
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE document SYSTEM "document.dtd">
<document>
This text doesn't matter since it doesn't get displays this is just test text.
</document>
Whenever i run the script it says:
msxml3.dll error '80004005'
The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document.
I ran it thru Xalan and it came out like it was supposed to (Said Hi) so I know that there's a problem with the ASP. Thanks for any help.