Subject: Re: Référence: RE: question about transformation From: David Carlisle <davidc@xxxxxxxxx> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Référence: RE: question about trans, Yannick Nicolas | Thread | RE: Référence: RE: question about t, Marco . Mistroni |
A slightly pessimistic view?, DPawson | Date | Re: New Zvon tutorial - XPath tutor, David ROBERT |
Month |