Incorrect filter optimization in Saxon-SA
The Saxon XSLT and XQuery processor, developed by Saxonica
Brought to you by:
mhkay
When the Saxon-SA optimizer decides that a filter
expression applied to a variable, such as
$idElements[@id=$hrefs]
would benefit from construction of an index, the result
of the indexed retrieval is not (always) sorted and
deduplicated, which means that items from the sequence
$idElements can appear more than once and in the wrong
order.
(For my reference: source fix is in
IndexedClosure.findItems)