Project

Profile

Help

Bug #4614

Updated by Michael Kay almost 4 years ago

Encountered while converting some xslt3extra tests to qt3extra. Test case highest-003 does 

 ~~~ 
 saxon:highest(doc('highest/highest-003.xml')/*/*) 
 ~~~ 

 and selects an element whose string value is non-numeric ("cat"), this results in a stack trace 

 ~~~ 
 -s:saxon-highest -t:highest-004 
 java.lang.NumberFormatException: For input string: "cat" 
	 at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) 
	 at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) 
	 at java.lang.Double.parseDouble(Double.java:538) 
	 at net.sf.saxon.type.StringToDouble.stringToNumber(StringToDouble.java:168) 
	 at com.saxonica.functions.extfn.HighestOrLowest.call(HighestOrLowest.java:87) 
 ~~~ 

 The test is flawed, because the spec says that untypedAtomic values are compared after casting to xs:double (as with fn:min and fn:max); but it shouldn't crash.

Back