[Bug 25160] [XSLT 3.0] a//c with striding CP is roaming by the rules, though we strove to make it streamable

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

--- Comment #4 from Michael Kay <mike@saxonica.com> ---
I failed to capture in the forgoing rules the constraint that the matching
operation must occur within the subtree of the context node. I now recall this
constraint causing us sime difficulty in Prague.

One approach to this might be to take the definition of the semantics of
selection patterns:

<quote>
Specifically, an item N matches a pattern P if the following applies, where EE
is the equivalent expression to P:

N is a node, and the result of evaluating the expression root(.)//(EE) with a
singleton focus based on N is a sequence that includes the node N
</quote>

and modify it to say:

<new>
an item N matches a pattern P within a (sub)tree rooted at $A if the following
applies, where EE is the equivalent expression to P:

N is a node, and the result of evaluating the expression $A//(EE) is a sequence
that includes the node N

When $A is not otherwise specified, it is taken as root(N).
</new>

The matcher function M<P> then becomes M<P>(N, A), returning true if the
pattern matches a node N within a subtree rooted at A, and the rewrite of a
scanning expression  becomes 

let $A := . return $A/descendant::node[M<P>(., $A)]

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

Received on Thursday, 27 March 2014 20:39:02 UTC