[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 #2 from Michael Kay <mike@saxonica.com> ---
The problem arises because in the absence of bind-group and bind-grouping-key,
the functions current-group() and current-grouping-key() are permitted. We ban
their use within the body of the xsl:for-each-group itself, but not in a called
template. For example:

<xsl:for-each-group select="emps" group-adjacent="@dept">
  <xsl:apply-templates select="doc('abc.xml')/lookup" mode="non-streaming"/>
</xsl:for-each-group>

<xsl:template match="lookup" mode="non-streaming">
  <xsl:for-each select="current-group()"/>
</xsl:template>

It's possible that there is a better solution to the problem. For example, we
could say that if an xsl:for-each-group instruction appears within a streamable
template or within xsl:stream, then any calls to xsl:apply-templates etc
appearing within the xsl:for-each-group clear the values of current-group and
current-grouping-key; thus in a streaming context, the scope of current-group()
and current-grouping-key() becomes static, and the need for bind-group and
binding-grouping-key disappears, which would be a significant simplification.

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

Received on Wednesday, 5 February 2014 11:07:08 UTC