DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6851>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6851

XSLTC: java.lang.ArrayIndexOutOfBoundsException

           Summary: XSLTC: java.lang.ArrayIndexOutOfBoundsException
           Product: XalanJ2
           Version: 2.3
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The following simple example generates a 
java.lang.ArrayIndexOutOfBoundsException exception. If you remove the variable 
reference in the predicate all works as expected.

Example stylesheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
        <xsl:output method="html"/>
        <xsl:template match="/">
                <xsl:element name="img">
                        <xsl:attribute name="src">
                                <xsl:if test="false()">
                                        <xsl:variable name="var1" select="'m'"/>
                                        <xsl:value-of select="/root/env/param
[@name = $var1]"/>
                                </xsl:if>
                        </xsl:attribute>
                </xsl:element>
        </xsl:template>
</xsl:stylesheet>

Example input doc:
<root>
        <env>
                <param name="m">123</param>
                <param name="n">321</param>
        </env>
</root>

Reply via email to