[Bug 27648] [xslt 3.0] Dynamic Component References

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

--- Comment #2 from Michael Kay <mike@saxonica.com> ---
Commenting on my own proposal, the difficulty with wrapping accumulator calls
in functions is making the functions streamable; we can't replicate the static
analysis we do on accumulator-after() if the call is hidden within a
user-defined function.

So I would like to explore b(2): replacing the functions accumulator-before()
and accumulator-after() with a pair of instructions <xsl:accumulator-before
name="a"/> and <xsl:accumulator-after name="a"/> (or a single instruction with
an extra attribute if people prefer).

Of course, there's a usability disadvantage, we all know how awkward it is to
call xsl:number in any context except where you want to output the value
directly into the result tree. But people know how to live with that.

The advantages would be (a) the normal static binding rules can be used to
handle overrides, (b) there's more scope for optimization and static error
checking if the accumulator is identified statically (e.g. the type of the
result is always statically known), (c) it slightly simplifies the
streamability rules, e.g. rules 6 and 7 of 19.8.8.1 disappear.

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

Received on Thursday, 18 December 2014 10:01:49 UTC