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

RE: Declaring internal entities in an xsl-file

Subject: RE: Declaring internal entities in an xsl-file
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Fri, 04 Feb 2000 16:39:20 -0500
xslt declaring entities
At 09:41 PM 02/04/2000 +0100, Mattias Beermann wrote:
I would also like to use CSS, but this thing must work with old browsers as
well. You example works but produces the same error as before when I set the
parser to ValidateOnParse = True, I'm using the MSXML2.DOMDocument parser.
The error I get is:

Line: 6 - The element 'xsl:stylesheet' is used but not declared in the
DTD/Schema. error '80004005'

Should I just ignore this error and use ValidateOnParse = False, or should I
try to find a dtd for xhtml and for xsl? What is the recommended way of
doing it? Is it bad practice to create documents that aren't valid?

The MS parser does all kinds of what I think are strange things.


But yes, in this case I'd go ahead and shut off validation. Per the thread on XSL-List earlier this week (I know, the archive is down), validation and XSLT processing do not generally play well together, even with other (non-MS) parsers. That's because the XSLT elements and variables are in a different vocabulary than the result tree's (XHTML's, in your case), and it can be quite tricky to "merge" them into one vocab, with one DTD.

I don't think it's necessarily "bad practice" to create documents that haven't been validated, especially in the case of XSLT where it can actually be bad practice (as you're finding) to *force* validation. If your source document is valid, that's the important thing -- let the well-formed XSLT be checked for XSLT syntax errors by whatever XSLT processor you're using, of course, but otherwise don't think about validation in a core-XML sense. (Just my opinion, others undoubtedly feel differently.)

====================================================================
John E. Simpson            |  My girlfriend asked me, "Did you sleep
simpson@xxxxxxxxxxx        |  good?" I said, "No, I made a few
http://www.flixml.org      |  mistakes." (Stephen Wright)


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.