Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-421

omit-xml-declaration ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.8
    • None
    • XalanC
    • None
    • Operating System: Windows XP
      Platform: PC
    • 29545

    Description

      It appears that the omit-xml-declaration attribute on xsl:output has no effect
      in 1.8, though it did in 1.6.

      Here is a sample xml file:

      <?xml version="1.0" encoding="utf-8"?><body>
      <div n="0"><head>VARNEY, THE VAMPYRE;</head>
      </div>
      </body>

      Here is a sample xsl file:

      <?xml version="1.0"?>
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:xaira="http://natcorp.ox.ac.uk/xaira">
      <xsl:output method="xml" omit-xml-declaration="yes"/>
      <!-- Replace the select path by a path from the root of the document to the
      bibliography. -->
      <xsl:template match="div">
      <xaira:bibliography>
      <xsl:copy-of select=".//head"/>
      </xaira:bibliography>
      </xsl:template>

      <!-- Make sure nothing else produces output -->
      <xsl:template match="text()"/>
      </xsl:stylesheet>

      Using XAlanTransform v 1.6 there is no xml declaration. In 1.8 there is one.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tony.dodd@btinternet.com Tony Dodd
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: