Project

Profile

Help

Bug #2628

closed

Streamed grouping fails: "The current-group() function is evaluated repeatedly"

Added by Michael Kay almost 9 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Streaming
Sprint/Milestone:
-
Start date:
2016-02-18
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Reported here: https://saxonica.plan.io/boards/3/topics/6282

Submitted as an XSLT 3.0 test case si-group-031

Actions #1

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.

Actions #2

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.

Actions #3

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.

Actions #4

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

Also available in: Atom PDF