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

Test case attribset29 is incorrect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.7
    • None
    • TestHarness-TestCase
    • None

    Description

      This test case uses the use-attribute-sets attribute of xsl:copy to create attribute nodes in the result tree:

      <xsl:template match="/">
      <out>
      <xsl:copy use-attribute-sets="set1"/>
      </out>
      </xsl:template>

      However, the XSLT recommendation is clear that this attribute is only considered when copying element nodes:

      http://www.w3.org/TR/xslt#copying

      "The xsl:copy element may have a use-attribute-sets attribute (see [7.1.4 Named Attribute Sets]). This is used only when copying element nodes."

      This indicates a bug in Xalan-J. See the analogous but in Xalan-C: http://issues.apache.org/jira/browse/XALANC-632

      The easiest way to fix this would be to put the use-attribute-sets attribute on the literal result element:

      <xsl:template match="/">
      <out xsl:use-attribute-sets="set1">
      <xsl:copy/>
      </out>
      </xsl:template>

      However, that subverts the original intent of the test case, according to the comments.

      At any rate, this needs to be fixed, as I've just fixed the analogous bug in Xalan-C, and this creates another spurious failure.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dbertoni David N Bertoni
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: