Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2440

Incorrect serialization of XML output

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 2.7.1
    • None
    • Serialization
    • None
    • Windows XP professional, Intel Celeron M, Xalan-J 2.7.1, JRE 1.4.2_05

    Description

      I think, there is scope of improvement to the Xalan-J 2.7.1 serializer.

      I tried this sample XSLT stylesheet with Xalan-J 2.7.1.

      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      version="1.0">

      <xsl:output method="xml" indent="yes" />

      <xsl:template match="/">
      <x>
      <y/>
      </x>
      </xsl:template>

      </xsl:stylesheet>

      The output produced by Xalan is:

      <?xml version="1.0" encoding="UTF-8"?><x>
      <y/>
      </x>

      Please note that top most element tag, <x> is not indented properly.

      I wish the output in this case should be:

      <?xml version="1.0" encoding="UTF-8"?>
      <x>
      <y/>
      </x>

      This problem seems to happen with any XML output.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mukul_gandhi Mukul Gandhi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: