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

Re: Where can I find the XSLT DTD?

Subject: Re: Where can I find the XSLT DTD?
From: Joe English <jenglish@xxxxxxxxxxxxx>
Date: Thu, 03 Feb 2000 13:28:33 -0800
xslt dtd
David Carlisle <davidc@xxxxxxxxx> wrote:
>
> It is _impossible_ to write a dtd that covers every xsl stylesheet as
> they may include arbitrary elements from the target DTD. So you have
> to define the result-elements entity to list any result elements
> that may appear inside an xsl element and then add all possible result
> elements to the dtd. Normally it isn't worth the bother, noone uses
> validating parsers to read xsl stylesheets do they?


Not while processing them, no, but to validate them
beforehand, sure!

Validators usually give better error messages than XSLT processors,
which is helpful for catching gross structural errors.

Plus, in cases where the stylesheet makes heavy use of literal
result elements, this can go a long way towards semantically
validating the stylesheet (that is, making sure that the
stylesheet produces valid result documents).

However, constructing a DTD against which to validate the
stylesheet in this case can be a bit tricky.  It's usually
not hard to customize the XSLT DTD fragment:

    <!ENTITY % xsl.dtd SYSTEM "xslt.dtd">
    <!ENTITY % html.dtd PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "/dev/null">
    %html.dtd;
    <!ENTITY % result-elements "%inline; |  %block;" >
    %xsl.dtd;

but the target DTD *also* has to be parameterized in order to allow
XSL instructions inside literal result elements!  This isn't
difficult either if you "cheat" and use an SGML parser for
validation; inclusion exceptions fit the bill nicely here.


--Joe English

  jenglish@xxxxxxxxxxxxx


 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.