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

RE: question about transformation

Subject: RE: question about transformation
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Mon, 22 Nov 1999 11:46:24 -0700
RE: question about transformation
Nicolas Yannick wrote:
> > I've written a simple stylesheet to transform an XML document 
> > into another XML document that have a different dtd.
> > I want to include at the begin of the transformed document 
> > the XML reference.

An XSL stylesheet does not transform one XML document into another. It
instructs an XSL processor how to create a result tree (of nodes) from a
source tree that has been derived from an XML document. It also tells the
processor you would prefer that it output that result tree somehow, perhaps
as an XML document.

Marco Mistroni wrote:
> <xsl:template match="/">
> 	<?xml blah blah blah
> </xsl:template>

No. A stylesheet does not construct the output; it constructs the result
tree of nodes from which output may be derived. The XML declaration and the
DTD are not currently part of the source tree and they also cannot be
inserted (as such) into the result tree.

However, you can tell an XSLT 1.0 compliant processor that, when emitting
the result tree as XML, you want a particular XML version and DOCTYPE. This
is explained fully in section 16 of the XSLT 1.0 Recommendation:
http://www.w3.org/TR/xslt#output ... it involves putting an <xsl:output/>
element at the top of your stylesheet, with various attributes.

If you are using IE5, you're out of luck, as the MS XSL processor is, as is
often noted here, quite out of sync with current spec.


 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.