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

Re: where does one stick the doctype?

Subject: Re: where does one stick the doctype?
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 21 Mar 2003 08:57:25 +0000
tennison sticks
Chris Loschen wrote:
> My sense was that XSLT automatically puts the root element of your
> output document in your DOCTYPE line as you specified it in your
> stylesheet, so y ou don't have to do it yourself. That seems to have
> happened with all of my XSLT scripts to date. However, I'm not
> positive that's exactly what's happening -- does anyone know the
> real technical details?

Chris is correct, though since the result trees generated by XSLT can
have more than one top-level element, technically you get the name of
the *first* top-level element. The full details at
http://www.w3.org/TR/xslt#section-XML-Output-Method say:

  If the doctype-system attribute is specified, the xml output method
  should output a document type declaration immediately before the
  first element. The name following <!DOCTYPE should be the name of
  the first element. If doctype-public attribute is also specified,
  then the xml output method should output PUBLIC followed by the
  public identifier and then the system identifier; otherwise, it
  should output SYSTEM followed by the system identifier. The internal
  subset should be empty. The doctype-public attribute should be
  ignored unless the doctype-system attribute is specified.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.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.