Issue Details (XML | Word | Printable)

Key: XALANJ-2108
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Santiago Pericas-Geertsen
Reporter: arnaud
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XalanJ2

incorrect use of xsl:key cause NullPointerException

Created: 20/Apr/05 09:05 PM   Updated: 11/Dec/07 04:57 PM
Return to search
Component/s: XSLTC
Affects Version/s: 2.6
Fix Version/s: 2.7.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works patch-2108-6401137.txt 2006-04-07 06:42 AM Santiago Pericas-Geertsen 21 kB
Text File Licensed for inclusion in ASF works patch-2108-patch2.txt 2006-11-16 05:58 AM Brian Minchau 20 kB
XML File Licensed for inclusion in ASF works xalanj-2108.xml 2006-11-16 06:13 AM Brian Minchau 0.0 kB
Environment: windows jdk 1.42.06

Reviewer: Henry Zongaro
Resolution Date: 18/Nov/06 08:37 AM


 Description  « Hide
my stylesheet
-------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method = "html" encoding="iso-8859-1" />

<xsl:variable name = "x" select = "'1'" />
<xsl:variable name = "y" select = "'4'" />
<xsl:key name = "key_test" match ="test" use = "substring(date, $x, $y)" />

<xsl:template match="/">

</xsl:template>
</xsl:stylesheet>

xml file
<test><date>2004-01-01</date></test>


java.lang.NullPointerException
at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:980)
at java.lang.Double.valueOf(Double.java:202)
at org.apache.xalan.xsltc.runtime.BasisLibrary.stringToReal(BasisLibrary.java:838)
at ent_recherche_simple.buildKeys()
at ent_recherche_simple.transform()
at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:580)

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order