Nominate our 2022 Qt Champions!

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'?>

    @<?xml version='1.0' encoding='UTF-8'?>
    <xsl:stylesheet xmlns:xsl='' 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:apply-templates select='


Log in to reply