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

Re: Entities within my stylesheet.

Subject: Re: Entities within my stylesheet.
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Tue, 24 Sep 2002 12:34:55 -0400
Re:  Entities within my stylesheet.
At 4:50 PM +0100 9/24/02, Jeni Tennison wrote:

That's because the name that you specify in a DOCTYPE declaration
must exactly match the (qualified) name that you use for the document
element in the XML document. In your case, you have:

<!DOCTYPE stylesheet ...>

and:

<xsl:stylesheet ...>...</xsl:stylesheet>

"stylesheet" and "xsl:stylesheet" aren't the same, so any XML parser
should object.


No, I don't think so. A *validating* parser should object but a non-validating parser should be just fine with this. There is no good reason an XSLT processor should be using a validating parser. There isn't even a DTD for XSLT, and creating one would be a pointless exercise since it would depend heavily on the output vocabulary.


That said, I've noticed that a lot of parsers can't distinguish between validating and merely reading the external DTD subset for purposes of entity resolution and attribute defaulting. Even more wrongly, some parsers can't distinguish between validating and merely reading the internal DTD subset for purposes of entity resolution and attribute defaulting. So possibly, the parser the XSLT processor is using is turning on validation as soon as it sees your document type declaration. On the other hand, I don't see why it would complain about the root element name mismatch and not complain about the failure to declare various elements. This just really looks like a processor bug.

The work around others have suggested (using xsl:stylesheet instead of stylesheet) should suffice until the vendor can fix the bug.
--


+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

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


Current Thread

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