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

RE: Is there a reusable DTD for XSL?

Subject: RE: Is there a reusable DTD for XSL?
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Wed, 3 Nov 1999 12:54:05 -0700
to determine the xhtml dtd
Tangi Vass wrote:
> The XSL Transformations Working Draft (13/08)

Please note that XSLT is now a Proposed Recommendation as of 08-Oct-1999.
The Working Draft of 13-Aug-1999 is obsolete. http://www.w3.org/TR/xslt is
where to find the latest version.

> gives a fragment of DTD for XSLT. Has someone tried to
> complete it for XML/HTML generation?

In the spec, the text immediately preceding the DTD fragment explains the
reasoning behind its incompleteness, and what kind of combination you could
do.

Take this, for example:

<xsl:template name="head">
   <head>
      <xsl:call-template name="body">
   </head>
</xsl:template>
<xsl:template name="body">
   <body>
      <xsl:if test="foo">
         <p>hi</p>
      </xsl:if>
      <xsl:if test="bar">
         <html>what the?</html>
      </xsl:if>
   </body>
</xsl:template>

If you put XHTML element declarations in your DTD, and list all those
elements in the result-elements parameter entity, then the XSLT DTD fragment
should be sufficient to allow <head> or <body> as literal result elements in
the content of <xsl:template>. So, you could verify that there are no result
elements where they shouldn't be with respect to the stylesheet, and that
the result elements are among those that you consider valid.

But there's no way to make use of the XHTML DTD's declarations of
containment relationships between XHTML elements. You could not compare this
stylesheet against a combination of XSLT and XHTML DTDs in order to
determine that this stylesheet produces invalid XHTML and is therefore an
"invalid" stylesheet. If DTDs could deal with namespaces and express
descendant containment rules rather than just parent-child relationships,
you could probably do it.

I think. :)


 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.