Adding an xml declaration to output?
This is an open discussion with 2 replies, filed under XSLT.
Search
<xsl:output method="xml"/>
will add the declaration to the result document by default.
Check that you don't have the omit-xml-declaration
attribute set to yes
.
Thanks Egor! looks like that's done it.
Create an account or sign in to comment.
I'm trying to output pure XML using XSLT -- the output page has to have the <?xml version='1.0' encoding='utf-8'?> declaration. But I can't add it twice in the output (it throws an "XML declaration allowed only at the start of the document" error) Is there a workaround?