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

NullPointerException thrown for AVT in descendant of a literal result element that has a namespace declaration

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7
    • XSLTC
    • None
    • PatchAvailable

    Description

      If the "name" attribute of an xsl:element or xsl:attribute is calculated, and the instruction has an ancestor that is a literal result element that has a namespace declaration, a NulPointerException is thrown. The traceback is as follows:

      java.lang.NullPointerException
      at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.getXSLTC(SyntaxTreeNode.java:397)
      at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.getNodeIDForStylesheetNSLookup(SyntaxTreeNode.java:772)
      at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.getNodeIDForStylesheetNSLookup(SyntaxTreeNode.java:760)
      at org.apache.xalan.xsltc.compiler.XslElement.translate(XslElement.java:264)
      at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:515)
      at org.apache.xalan.xsltc.compiler.LiteralElement.translate(LiteralElement.java:403)
      at org.apache.xalan.xsltc.compiler.SyntaxTreeNode.translateContents(SyntaxTreeNode.java:515)
      at org.apache.xalan.xsltc.compiler.Template.translate(Template.java:337)
      at org.apache.xalan.xsltc.compiler.TopLevelElement.compile(TopLevelElement.java:66)
      at org.apache.xalan.xsltc.compiler.Mode.compileNamedTemplate(Mode.java:551)
      at org.apache.xalan.xsltc.compiler.Mode.compileTemplates(Mode.java:564)
      at org.apache.xalan.xsltc.compiler.Mode.compileApplyTemplates(Mode.java:826)
      at org.apache.xalan.xsltc.compiler.Stylesheet.compileModes(Stylesheet.java:614)
      at org.apache.xalan.xsltc.compiler.Stylesheet.translate(Stylesheet.java:729)
      at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:364)
      at org.apache.xalan.xsltc.compiler.XSLTC.compile(XSLTC.java:439)
      at org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:790)
      at org.apache.xalan.xslt.Process.main(Process.java:752)

      Attachments

        1. j2402.xsl
          0.3 kB
          Henry Zongaro
        2. patch.j2402.txt
          0.6 kB
          Henry Zongaro

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            zongaro@ca.ibm.com Henry Zongaro
            zongaro@ca.ibm.com Henry Zongaro
            Christine Li Christine Li
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment