Re: [xsl] IE Error Message

Subject: Re: [xsl] IE Error Message
From: Greg Faron <gfaron@xxxxxxxxxxxxxxxxxx>
Date: Mon, 13 May 2002 16:28:37 -0600
At 04:00 PM 5/13/2002, you wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

When I try to view my XML document in IE6, I get the following error:

"The stylesheet does not contain a document element. The stylesheet
may be empty, or it may not be a well-formed XML document."

The first part of my XSL document is:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  <xsl:output method = "xml" doctype-public = "-//W3C//DTD XHTML
1.1//EN" doctype-system =
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/>
  <xsl:template match="article">
    <?xml version="1.0"?>

I'm guessing that this is the problem zone. You essentially have two XML declarations in the same XML file. Remove the line above, and try it again. I think the XSLT engine will provide one for you resultant XHTML document, so you do not need to (nor should you) do it manually.



Greg Faron Integre Technical Publishing Co.



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread