[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: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Fri, 21 Mar 2003 10:19:09 -0500
one stick
[ Chris Loschen]
>
> >I understand that a DOCTYPE declaration can contain any 
> valid element in
> >the DTD.  But I'm wondering if there's a way that XSL can insert this
> >element name when it creates the declaration via xsl:output or
> >xsl:document.
> 
> 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?
> 
> 

You do not need a "sense".  The xslt 1.0 Rec tells you (section 16.1,
for the xml output method)  -

"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."

So the serializer will create a DOCTYPE declaration that names the
document element, exactly as desired.  There are no facilities to create
anything different from this, but this is generally what you want.

Because this is a requirement levied on the serialized output, you will
not get it if you use non-serialized results, like a DOM that you hand
off for further processing.

Cheers,

Tom P

 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.