|
[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: "Dale Asberry" <rdasberry@xxxxxxxxxxx>
Date: Tue, 23 Nov 1999 05:28:05 PST
|
Oops on my previous post... that's right, not well-formed.
From: David Carlisle <davidc@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: Référence: RE: question about transformation
Date: Tue, 23 Nov 1999 09:28:11 GMT
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
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|