QXMLQuery with no xml declaration
-
I'm trying to use QXmlQuery::XSLT20 with following xml file and xsl file, Qt version is 4.6.
It keeps omitting the xml declaration in the output file, as shown in last lines of this post.
Any suggestion on what could be wrong?@<?xml version='1.0' encoding='UTF-8'?>
<test>
</test>@@<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='2.0'>
<xsl:output method='xml' version='1.0' encoding='UTF-8' omit-xml-declaration='no' /><!-- Identity template, provides default behavior that copies all content into the output -->
<xsl:template match=''>
xsl:copy
<xsl:apply-templates select=''/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>@Output:
@<test>
</test>@