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

xsl:copy adds a newline to processing instructions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.7.1
    • None
    • Operating System: Other
      Platform: Other
    • 19306
    • PatchAvailable

    Description

      <xsl:copy> produces a node AND a linefeed for processing-instruction nodes in
      the "root" of the document.

      Example:

      The following template faithfully reproduces an XML document:

      <xsl:template match="node() | @*">
      <xsl:copy>
      <xsl:apply-templates select="node() | @*"/>
      </xsl:copy>
      </xsl:template>

      ...EXCEPT when the document contains processing instruction nodes in the
      "root" (ie. before the "document" element). There doesn't seem to be a problem
      for nodes that are descendants of the "document" element.

      Attachments

        1. xalanj-1497.xsl
          0.8 kB
          Brian Minchau
        2. xalanj-1497.out
          0.3 kB
          Brian Minchau
        3. patch.txt
          4 kB
          Brian Minchau
        4. ASF.LICENSE.NOT.GRANTED--d19306.xsl
          0.2 kB
          Henry Zongaro
        5. ASF.LICENSE.NOT.GRANTED--d19306.xml
          0.1 kB
          Henry Zongaro

        Issue Links

          Activity

            People

              minchau@ca.ibm.com Brian Minchau
              dcaveney@the-wire.com dcaveney
              Henry Zongaro Henry Zongaro
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: