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

NullPointerException when the binding of the xsl namespace prefix is duplicated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.7
    • None
    • Xalan
    • None
    • Windows XP SP2, Java 1.5.0_06
    • fp2

    Description

      Xalan issues a NullPointerException when I try to create a Transformer object for the following XSLT stylesheet:

      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:template match="/">
      <xsl:for-each select="*" >
      <xsl:sort select="a" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
      </xsl:for-each>
      </xsl:template>
      </xsl:stylesheet>

      The NullPointerException can be reproduced with the following command line executed in the Xalan install directory:

      java -jar xalan.jar -XSL ftopic1861-NPE-in-Xalan.xsl

      where ftopic1861-NPE-in-Xalan.xsl contains the above stylesheet. If I remove the xsl:sort/@xmlns:xsl attribute the NPE does not occur any more.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sorin Sorin Ristache
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: