[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: What is the correct DTD for XSL?


Subject: Re: What is the correct DTD for XSL?
From: "Paul W. Abrahams" <abrahams@xxxxxxxxxxx>
Date: Mon, 02 Aug 1999 21:15:12 -0400

Earlier I wrote:

> That raises the question: what is the correct DTD for XSL?  Would it explicitly
> include all the attributes of an <fo:block> in an <fo:inline-sequence> (plus a
> great multitude of similarly situated attributes)?  Or is the question of
> validating an XSLT stylesheet as an XML document simply uninteresting to most
> members of this community?

James Tauber replied:

> The DTD for an XSL stylesheet is completely dependent on the result tree
> vocabulary. A stylesheet that results in XHTML would have one DTD, a
> stylesheet that results in FOs would have another DTD, a stylesheet that
> results in FOs with diagrams in SVG would have yet another DTD.
>
> The DTD for a FO result tree is less useful because you wouldn't normally
> serialise the result tree. Your transformation engine would just give the
> result tree to the formatter without serialising and having the formatter
> have to reparse.

John Simpson replied:

> It's not uninteresting, simply or otherwise :), but the notion of
> "validating an XSLT stylesheet" makes sense only if the result tree uses
> XSL formatting objects. An overall DTD for XSL -- covering XSLT and the
> formatting objects -- is possible, but the question is complicated by the
> ability of XSLT to produce result trees in *non*-XSL vocabularies. What you
> end up with in such a stylesheet contains elements and attributes from two
> different DTDs. About the best you can do with this stylesheet is to test
> it for well-formedness. (To my knowledge, there's not yet a validating
> parser that's capable of validating against more than one DTD at a time.
> For starters, what do you put in the document-type declaration?)
>
> So the answer isn't that it's uninteresting. The answer is that since many
> (probably most) XSLT spreadsheets generate (X)HTML result trees, at least
> so far, validation isn't even possible.

I should have been clearer about what I meant by ``uninteresting'', namely, ``something you would
hardly ever want to do''.   As John said, ``validation isn't even possible''; as James said, ``The
DTD for an XSL stylesheet is completely dependent on the result tree vocabulary''.  That's what I
had guessed, but I was hoping that someone would show me that validation in the XML sense is indeed
possible and useful, i.e., there is a Santa Claus after all <s>.

Paul Abrahams



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



Current Thread
Keywords