[Bug 20981] Why accumulators are not passed to xsl:evaluate?

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

--- Comment #2 from Michael Kay <mike@saxonica.com> ---
We've generally had a rule that streamability must be determinable statically.
If we relax the rules disallowing dynamic calls on accumulator functions, we
lose this property. However, I think it may be worth doing.

Defining the dynamic rules is not entirely trivial, but I think it can be done
using the concepts of pre-descent instructions and post-descent instructions in
19.3.3. Something like this:

If an accumulator function is called and the context item is a node in a
streamed input document, then a dynamic error occurs if neither of the
following conditions is true:

* the function is a pre-descent function and it is being invoked in the course
of evaluating a pre-descent instruction in a template rule that matches the
context item

* the function is a post-descent function and it is being invoked in the course
of evaluating a post-descent instruction in a template rule that matches the
context item

I think this approach would allow us to be a bit more flexible about evaluating
accumulator functions while processing leaf nodes such as text nodes.

While we are about it, I'm wondering if we need any special rules to prevent a
reference to a streamed node appearing in the closure of a context-dependent
function item.

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

Received on Monday, 25 February 2013 15:41:09 UTC