When two or more sort keys evaluate to the empty
sequence, the result should be in document order. It is
currently in random order.
Afffects Saxon 7.4 only.
Test case: sort107
Logged In: YES
Source code fixed.
Line 181 in SortedIterator.java was:
return (nodeKeys[b1+i]==null ? 0 : -1);
comp = (nodeKeys[b1+i]==null ? 0 : -1);
In fact the problem is more severe that originally
described; if one sort key is null for both items, then
subsequent sort keys are not being examined.