[Bug 24510] Absence of bind-group and bind-grouping-key need not be free-ranging

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

--- Comment #5 from Michael Kay <mike@saxonica.com> ---
This is a proposal to drop the bind-XX variables introduced for grouping and
merging in XSLT 3.0, and revert to the use of current-XX() functions.

The reason the bind-XX variables were introduced was because variables are
statically scoped while the current-XX() functions were dynamically scoped,
which means they cannot be analyzed for streamability across template rule
boundaries. However, the problem they introduce is that they break the usual
rule that variable references cannot be bound to streamed nodes. In addition,
having two ways of doing things complicates the specification and
implementations unnecessarily, as this bug report indicates.

This proposal suggests that we revert to use of the functions, and make them
statically scoped in the streaming case. In particular, any use of
xsl:apply-templates, xsl:call-template, xsl:apply-imports, xsl:next-match, or
[xsl:]use-attribute-sets appearing as a descendant of xsl:stream, xsl:template
in a streamable mode, or xsl:merge, clears the values of current group and
current grouping key.

To handle the bind-source attribute of xsl:merge-source, we re-introduce the
name attribute of xsl:merge-source, and a new function
current-source-group(name) that returns the same result as the existing
bind-source variable. The name attribute is optional; if no name is supplied,
current-source-group() is not available.

I suggest we drop the overloading of current-group() to handle both grouping
and merging. For the merging case, use a new function current-merge-group().

The streamability rules for current-group() and current-source-group() are
taken from the current rules for the corresponding variable references.

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

Received on Tuesday, 18 February 2014 20:25:36 UTC