Streaming: mixing striding and grounded posture
See spec bug 29507.
Saxon isn't able to stream expressions of the form
(/books/book, $extraBooks) / price
It complains that the expression needs sorting into document order. But it is streamable according to the spec, and there is a feasible strategy for evaluating the expression that doesn't involve buffering the streamed nodes (because these will always be in document order).
Updated by Michael Kay over 6 years ago
A patch is being committed that fixes this test case. It does so by means of a custom streamed implementation of document-sort expressions where the posture mixes striding and grounded nodes.
As part of the change, the rules for document order have been changed so streamed nodes always precede unstreamed nodes (this is possible because the spec leaves document order across different trees implementation-dependent). To achieve this, streamed documents are allocated negative document numbers.
More work is needed to see if this can be extended to crawling expressions.
Please register to edit this issue