- From: Michael Kay <mhk@mhk.me.uk>
- Date: Sun, 28 Feb 2016 15:09:23 +0000
- To: Public XSLWG <public-xsl-wg@w3.org>
> >> >> So I'm inclined to the approach which involves minimum change to the spec: mixed-posture expressions such as ((/books/book, $moreBooks) / title) are guaranteed streamable, and we just have to put the burden on implementors to make it happen. > > I've implemented this solution in Saxon, at least for this test case. > > For information, the logic is essentially: > > (a) for simplicity, streamed nodes always come before unstreamed nodes in document order. Relative order across different trees is implementation-dependent, so we're allowed to do that. > > (b) if there's a sort-into-doc-order node on the expression tree (after optimisation), and the operand is striding, then we provide a streamed implementation of this expression which operates as follows: if an item arrives that is a streamed node, then emit it immediately in the result; if an item arrives that is grounded, then save it in a buffer. On completion, sort the buffer containing grounded nodes into document order, and then emit them in order to the result. > > Michael Kay > Saxonica
Received on Sunday, 28 February 2016 15:09:49 UTC