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

Re: Référence: RE: question about transformation

Subject: Re: Référence: RE: question about transformation
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 23 Nov 1999 09:28:11 GMT
Re: Référence: RE: question about transformation
You have stated here exactly the cause of your problem:

] Since my transformation stylesheet is an XML document,

An XSL stylesheet is an XML document, thus this:

]  <xsl:template match="/">
] 	<?xml blah blah blah

is an XML error and will generate a parse error from the XML parser
before the XSL system even gets started. <? is the XML syntax for
a text declaration, an XML declaration or a processing instruction.
PI's are not allowed to begin with `xml' and declarations are not
allowed to be inside XML elements, so the above is not a well formed XML
document. 

The output of XSLT is the tree representing your document.
If that tree is linearised into a file, and XML declaration will be
added by the system if it is needed. Then declaration is not part of the
tree itself, and so does not need to be in a template (even if that was
allowed by XML rules) The declaration just tells a parser how to convert
the linearoised form in the file back to the parse tree that corresponds
to your output. In particular if you specify an encoding other than utf8
or utf16 using xsl:output then an XML declaration will be added by the
system (if it supports the encoding you ask for).

David


 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.