Fw: Splitting XSL

Subject: Fw: Splitting XSL
From: "Oren Ben-Kiki" <oren@xxxxxxxxxxxxx>
Date: Wed, 10 Feb 1999 11:04:53 +0200
From: David Carlisle <davidc@xxxxxxxxx> wrote:
>You can't really use DTD for a general XSL can you?
>You'd need a different DTD for each result namespace as the elements of
>the result tree appear within the templates.

I also thought so. But it turns out there's a solution.

Assume for a moment that the XST stylesheet writer has limited himself to
using <xsl:element> and <xsl:attribute>, never writing <FOO BAR="BLOOP">
directly. I claim that it is possible to write a DTD which covers all such
stylesheets. Agreed?

Now, how hard is it to convert an XSL stylesheet which doesn't obey this
restriction into one which does? Not hard at all, it turns out. It would be
a simple SAX filter, for example. Or you could write an XSL stylesheet which
does that :-)

So, combining the two, you could easily write an XSL verifier which would
verify _any_ XSL stylesheet under two DTDs.

>But yes being able to verify that valid input will aways produce valid
>output would be nice (but likely to get harder to do as more features
>are added to the language)

This point was made several times in discussion of particular features, such
as scripting. Of course, partial verification is better then none. Also,
adding some directives to the verifier - "believe me that the script
function 'foo' always returns a valid 'bar' element" - would help.

Share & Enjoy,

    Oren Ben-Kiki

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

Current Thread