Wrox Programmer Forums
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 2nd, 2007, 11:23 AM
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML/XSLT Transform Error in ASP

I'm in the process of migrating my site from classic ASP to ASP.NET 2.0, but I need to use some of the classic ASP apps until this process is complete. I'm trying to use a XML/XSLT transformation within an ASP doc (w/JScript syntax), but I'm getting an error. This setup works fine in my ASP.NET page, and I know that the XSLT doc is proper, so I'm thoroughly confused. I've included code for all of the referenced pages below, and all of these files are located in the same directory on my machine. If anyone can let me know what I'm doing wrong, that would be great. Thanks.

<?xml version="1.0" encoding="UTF-8"?>

        <title>Page 1</title>

        <title>Page 2</title>


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
            <xsl:for-each select="xmldoc/section">
                <li><a href="{url}"><xsl:value-of select="title" /></a></li>

aspdoc.asp (JScript syntax):
//Load XML
var xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false

//Load XSL
var xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false

//Transform file

HTML output wanted:[list]
    <li><a href="page1.asp">Page 1</a></li>
    <li><a href="page2.asp">Page 2</a></li>

Error message:
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.

Old August 22nd, 2007, 09:57 PM
Registered User
Join Date: Aug 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Hi KWilliams,

I know this is off topic, but did you ever find a solution to your "CSS 100% Height DIV Problem" located at:

Old October 9th, 2007, 02:26 AM
Authorized User
Join Date: Oct 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts

Try using the following code: (note the use of Server.MapPath())

set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false

set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false


set xsl = nothing
set xml = nothing

//Load XML
var xml = Server.CreateObject("Microsoft.XMLDOM");
xml.async = false;

//Load XSL
var xsl = Server.CreateObject("Microsoft.XMLDOM");
xsl.async = false;

//Transform file

xsl = null;
xml = null;

Hope that helps. :)

-Charles Forsyth

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transform SQL server 2005 XML with xslt bonekrusher XSLT 0 July 11th, 2007 07:45 PM
How do I transform XSLT without the <?xml?> tag? nadavvin XSLT 4 June 10th, 2007 09:25 AM
Can 1 xslt transform an xml doc into 2 text files Raju Sarode XSLT 7 November 3rd, 2006 04:10 PM
Transform XML with XSLT in JavaScript Mozilla Spankmaster79 Javascript 3 January 18th, 2006 07:31 AM
XSLT read through XML to transform another XML dendenx2 XSLT 8 July 7th, 2005 08:18 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.