Bug #2628
closedStreamed grouping fails: "The current-group() function is evaluated repeatedly"
0%
Description
Reported here: https://saxonica.plan.io/boards/3/topics/6282
Submitted as an XSLT 3.0 test case si-group-031
Updated by Michael Kay almost 9 years ago
- Status changed from New to In Progress
The problem is that this:
<xsl:copy select="$root">
<xsl:copy-of select="current-group()"/>
</xsl:copy>
is rewritten internally as
<xsl:for-each select="$root">
<xsl:copy>
<xsl:copy-of select="current-group()"/>
</xsl:copy>
</xsl:for-each>
giving the impression that the current-group() instruction is evaluated repeatedly.
Updated by Michael Kay almost 9 years ago
I think Saxon may actually be conformant with the streamability rules in the spec here.
19.8.9.4 says current-group() is not streamable if: The path in the construct tree that connects C to the sequence constructor forming the body of F is such that no child construct is a higher-order operand of its parent
But the sequence constructor within xsl:copy[@select] is a higher-order operand of the xsl:copy instruction, because:
The context item for evaluation of O is different from the context item for evaluation of C.
Updated by Michael Kay over 8 years ago
- Status changed from In Progress to AwaitingInfo
Marking this as "AwaitingInfo" since it is dependent on resolution of W3C bug 29482.
Updated by Michael Kay almost 8 years ago
- Status changed from AwaitingInfo to Closed
- Assignee set to Michael Kay
The XSL WG resolved bug 29482 by deciding that this case was not streamable; so there is no bug here.
Please register to edit this issue