Project

Profile

Help

Bug #1598

closed

(Maybe) wrong handling of empty sequences in fn:min() and fn:max()

Added by Stefan Krause over 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2012-07-29
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

trash.xml (57 Bytes) trash.xml Stefan Krause, 2012-07-29 11:13
trash.xsl (364 Bytes) trash.xsl Stefan Krause, 2012-07-29 11:16
Actions #1

Updated by Stefan Krause over 12 years ago

Sorry, was the wrong file. Find the test stylesheet attached.

Actions #2

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 ().

Actions #3

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

Also available in: Atom PDF