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

Re: Copy DocType

Subject: Re: Copy DocType
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 14 Jun 2001 14:20:21 -0600 (MDT)
xslt copy doctype
Kevin_Gutch@xxxxxxxxxxx wrote:
> Is it possible to include a DocType Declaration in an XSLT pass thru?

You don't have access to it because it is not in the XPath/XSLT tree
model, which doesn't have anything in it that wouldn't be reported by
a SAX parser (document type declaration being one of those things).

XSLT does have a provision for emitting a new declaration, though its
functionality is limited. You cannot specify an internal subset, and
you must hard-code the string used for the SYSTEM or PUBLIC identifier.

Also, you don't put it in the result tree; you just tell the processor
to add it to the output when it serializes the result tree in XML
syntax. See section 16.1 of the XSLT 1.0 rec.

<xsl:output method="xml" doctype-system="http://external/dtd/location" />

   - Mike
_____________________________________________________________________________
mike j. brown, software engineer at  |  xml/xslt: http://skew.org/xml/
webb.net in denver, colorado, USA    |  personal: http://hyperreal.org/~mike/

 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.