You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/03/04 18:39:07 UTC
DO NOT REPLY [Bug 6851] New: -
XSLTC: java.lang.ArrayIndexOutOfBoundsException
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: xalan-dev@xml.apache.org
ReportedBy: derek.sayeau@cognos.com
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>