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

Re: Doubt regarding content model of <xsl:template>

Subject: Re: Doubt regarding content model of <xsl:template>
From: Don Day <donday@xxxxxxx>
Date: Tue, 17 Nov 1998 00:52:36 +0100
don day
> Amit Rekhi wrote:
(snip)
> After having looked at the DTD defination of <xsl:template>
> given in the XSL specification, I wonder whether it is syntactically
> correct to be including elements like <HTML> etc
> to the content of <xsl:template>.

If you validate a stylesheet against the DTD as given in the 1.0 draft,
xsl:template can contain only markup defined in the "result-elements"
parameter entity in the DTD.  In the first working draft this is defined
as formatting objects.

The key principle you are looking for is in the overview of the 1.0
working draft: "XSL does not require result trees to use the formatting
vocabulary and thus can be used for general XML transformations.  For
example, XSL can be used to transform XML to "well-formed" HTML, that
is, XML that uses the element types and attributes defined by HTML."

So, for example, if you change the content of the "result-elements"
parameter entity to HTML elements or another XML, you could continue to
run validating applications to achieve those result transformations. 
Why bother with XSL DTDs, though?  In practice, a well-formed stylesheet
containing well-formed XML/HTML elements can be used with a
non-validating parser without the DTD.

> * Is this pattern rule syntactically correct according to the
> content model defination of <xsl:template>?

Not according to the given DTD, but...

> * Is it syntactically correct to have <HTML>,<HEAD>
> as content of <xsl:template> without having their mention
> in the content model defination of <xsl:template>?

Quite okay, if your XSL application parses the stylesheet as
well-formed, if it is indeed well-formed to begin with.  In general,
once a stylesheet has been validated prior to use, it need not be
validated each time it is served with a document.

> Thanks for any answers ,
> 
> AMIT

I hope this helps.  This is only how I grok the issue, not any official
statement of the XSL Working Group.

Regards,
--
Don Day
<donday at bga.com>
<dond at us.ibm.com>


 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.