[Bug 24534] Streamability of the following-sibling axis with numbered predicates

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24534

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
While I agree that we could theoretically extend our streaming model to permit
the "sibling recursion" pattern, I think this would be a significant extension
of the model and we should not attempt it.

Given a template that does

<xsl:apply-templates select="foo"/>

then if the template that matches "foo" attempts to process its following
siblings, those following siblings are going to be processed more than once, so
there is "overlap". This doesn't necessarily make it impossible (we could
manage the overlap using output buffering) but it needs careful thought.
Equally, we could eliminate the overlap if we constrain the apply-templates to
only select the first child; a mode would then be streamable if either (a) all
templates satisfy the current streamability rules, allowing selection of all
children, or (b) all templates follow the sibling-recursion pattern by
selecting only the first child and/or the first following sibling. That's
possible but a big extension to our current scope.

I think the Saxon reference is probably a mis-remembering. Saxon does currently
retain not only the stack of ancestors and their attributes, but positional
information about the position of the ancestors among their siblings. This is
something we once proposed in the WG but which has disappeared from the spec.
Saxon currently uses it primarily to permit positional patterns of the form
match="para[1]". Theoretically it could also be used to support some simple
forms of xsl:number, but Saxon doesn't currently do that. Supporting streamed
sibling recursion seems a different matter entirely, and is certainly something
Saxon has never attempted.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 6 February 2014 10:54:09 UTC