Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QXMLQuery with no xml declaration
Forum Updated to NodeBB v4.3 + New Features

QXMLQuery with no xml declaration

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 718 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Orione
    wrote on last edited by
    #1

    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>@

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved