Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6957215

JDK6u18 XSLT regression: xsl:copy-of failing to copy generated attributes

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b01
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        The upgrade of JAXP in JDK6u18 has introduced an XSLT regression which prevents us from building our project (OpenDS). I have managed to narrow down the problem to a simple test case which shows that in some circumstances the xsl:copy-of instruction does not fully copy the content of a variable containing attributes created using xsl:attribute instructions.

        To reproduce:

        Compile the attached Java program, BasicXsl.java, which I ripped from CR 6940416.

        Run it as follows:

        java -cp <classpath> BasicXsl test.xml output.xml test.xsl

        The application should generate two identical elements as follows:

        <?xml version="1.0" encoding="UTF-8"?>
        <aaa name="aaa-name" package="aaa-package">
        <bbb name="bbb-name">
        <aaa-ref name="aaa-name" package="aaa-package"/>
        </bbb>
        </aaa>
        <aaa name="aaa-name" package="aaa-package">
        <bbb name="bbb-name">
        <aaa-ref name="aaa-name" package="aaa-package"/>
        </bbb>
        </aaa>

        This is the case for JDK6u17, Xalan-J 2.7.1, and GNOME libxslt (via xsltproc).

        However with JDK6u18 and above (I have been using JDK6u20 and JDK7) the following is output:

        <?xml version="1.0" encoding="UTF-8"?>
        <aaa name="aaa-name" package="aaa-package">
        <bbb name="bbb-name">
        <aaa-ref/>
        </bbb>
        </aaa>
        <aaa name="aaa-name" package="aaa-package">
        <bbb name="bbb-name">
        <aaa-ref name="aaa-name" package="aaa-package"/>
        </bbb>
        </aaa>

        Note that the attributes are missing from the first aaa-ref element. They do not seem to be copied via the xsl:copy-of instruction.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  asaha Abhijit Saha
                  Reporter:
                  duke J. Duke (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: