XalanJ2
  1. XalanJ2
  2. XALANJ-2058

Illegal local variable number in Xalan 2.6 and incorrect output with latest from CVS

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.7
    • Component/s: XSLTC
    • Labels:
      None
    • Environment:
      Windows 2000 Eclipse 2.1.3

      Description

      When importing a stylesheet using xsl:import element, incorrect behavior is seen.

      Input.xml
      --------------------------
      <?xml version="1.0"?>
      <count>
      <ONE/>
      <TWO/>
      <THREE/>
      </count>
      --------------------------
      Apply_Imports.xsl
      --------------------------
      <?xml version="1.0"?>
      <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
      <xsl:import href="apply_imports_adnl.xsl"/>
      <xsl:template match="//">
      <EM>
      <xsl:apply-imports/>
      </EM>
      </xsl:template>
      </xsl:stylesheet>
      --------------------------
      Apply_imports_adnl.xsl
      --------------------------
      <?xml version="1.0"?>
      <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
      <xsl:template match="//">
      <DIV style="color:blue">
      <xsl:value-of select="name()"/>
      </DIV>
      </xsl:template>
      </xsl:stylesheet>
      --------------------------

      +++++++++++++
      When using Xalan Interpretive, the following output is seen. This is correct output.

      <?xml version="1.0" encoding="UTF-8"?>
      <EM><DIV style="color:blue">ONE</DIV></EM>
      <EM><DIV style="color:blue">TWO</DIV></EM>
      <EM><DIV style="color:blue">THREE</DIV></EM>

      +++++++++++++
      When using XSLTC, (Xalan 2.6.0), the following error occurs:

      (Location of error unknown)XSLT Error (java.lang.VerifyError): (class: apply_imports, method: applyTemplates_2 signature: (Lorg/apache/xalan/xsltc/DOM;Lorg/apache/xml/dtm/DTMAxisIterator;Lorg/apache/xml/serializer/SerializationHandler;)V) Illegal local variable number
      java.lang.RuntimeException: (class: apply_imports, method: applyTemplates_2 signature: (Lorg/apache/xalan/xsltc/DOM;Lorg/apache/xml/dtm/DTMAxisIterator;Lorg/apache/xml/serializer/SerializationHandler;)V) Illegal local variable number
      at org.apache.xalan.xslt.Process.doExit(Process.java:1099)
      at org.apache.xalan.xslt.Process.main(Process.java:1072)
      Exception in thread "main"

      +++++++++++++
      When using XSLTC (Xalan CurrentCVS), the following output is seen. This is incorrect output.

      <?xml version="1.0" encoding="UTF-8"?>
      <EM><DIV style="color:blue">count</DIV></EM>
      <EM><DIV style="color:blue">count</DIV></EM>
      <EM><DIV style="color:blue">count</DIV></EM>

      +++++++++++++
      It appears that problem is partialy fixed in CurrentCVS version. A complete fix is needed. The output from XSLTC must be identical to the output seen in Xalan Interpretive.

      Yash Talwar.

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12571829 ] jira [ 12594090 ]
        Mark Thomas made changes -
        Workflow jira [ 40086 ] Default workflow, editable Closed status [ 12571829 ]
        Brian Minchau made changes -
        Affects Version/s 2.7 [ 11080 ]
        Affects Version/s 2.7.1 [ 10863 ]
        Affects Version/s 2.6 [ 10871 ]
        Hide
        Brian Minchau added a comment -

        This issue is no longer relevant for 2.7.1, it is fixed in 2.7.1.
        Changing the affected version to 2.7.

        Show
        Brian Minchau added a comment - This issue is no longer relevant for 2.7.1, it is fixed in 2.7.1. Changing the affected version to 2.7.
        Brian Minchau made changes -
        Fix Version/s CurrentCVS [ 10863 ]
        Fix Version/s 2.7 [ 11080 ]
        Yash Talwar made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Yash Talwar added a comment -

        Patch submitted to CVS

        Show
        Yash Talwar added a comment - Patch submitted to CVS
        Hide
        Henry Zongaro added a comment -

        I have reviewed Yash's patch, and I believe that it correctly resolves the problem.

        Show
        Henry Zongaro added a comment - I have reviewed Yash's patch, and I believe that it correctly resolves the problem.
        Yash Talwar made changes -
        Attachment XalanJ2058_Patch.txt [ 18943 ]
        Hide
        Yash Talwar added a comment -

        Here is a patch to address this issue.

        Show
        Yash Talwar added a comment - Here is a patch to address this issue.
        Yash Talwar made changes -
        Field Original Value New Value
        Assignee Yash Talwar [ ytalwar@ca.ibm.com ]
        Hide
        Yash Talwar added a comment -

        Assigning this bug to myself.
        Yash

        Show
        Yash Talwar added a comment - Assigning this bug to myself. Yash
        Yash Talwar created issue -

          People

          • Assignee:
            Yash Talwar
            Reporter:
            Yash Talwar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development