Project

Profile

Help

Bug #1927

Spurious error optimising void filter expression

Added by Michael Kay almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2013-10-28
Due date:
% Done:

100%

Spent time:
-
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
9.5
Fixed in version:
9.5.1.4

Description

The Saxon-EE optimizer may produce a spurious static error when optimising a filter expression of the form

$x/a/b[c=d]

in the case where $x is statically known to be an empty sequence. The error message is:

Leading '/' cannot select the root node of the tree containing the context item

The cause of the error is that the static type of $x is computed as xs:error, and xs:error is a subtype of document-node(), so the optimizer decides that $x is a document node, and therefore the filter expression can be converted to a call on key() with a system-generated key definition.

A patch is being committed on the 9.5 and 9.6 branches.


Related issues

Related to Saxon - Bug #1954: Problem with some predicates when xsl:fallback is in use Duplicate 2013-12-11

History

#1 Updated by O'Neil Delpratt over 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.5.1.4

Bug fix applied in Saxon maintenance release 9.5.1.4

Also available in: Atom PDF