Actions
Bug #1927
closedSpurious error optimising void filter expression
Start date:
2013-10-28
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
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
Please register to edit this issue
Actions