Bug #1598
closed(Maybe) wrong handling of empty sequences in fn:min() and fn:max()
100%
Description
The xpath expression "min( (for $i in () return . )[.] )" fails with "net.sf.saxon.pattern.EmptySequenceTest cannot be cast to net.sf.saxon.type.BuiltInAtomicType" at net.sf.saxon.functions.Minimax.typeCheck(Minimax.java:113). Same applies to "max( (for $i in () return . )[.] )".
Files
Updated by Stefan Krause over 12 years ago
Sorry, was the wrong file. Find the test stylesheet attached.
Updated by Michael Kay over 12 years ago
- Category set to XPath conformance
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Found in version changed from 9.4.0.3J to 9.4
Thanks for reporting it. The problem occurs in rather specialized circumstances: the argument to min() or max() is a filter expression A[B] where A is determined during static typechecking (and not before) to be an empty sequence. A patch is being committed to module FilterExpression.java whose effect is that during typechecking of A[B], if A is an empty sequence then the expression is rewritten as ().
Updated by O'Neil Delpratt about 12 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.4.0.6
Please register to edit this issue