Project

Profile

Help

Bug #3319

closed

<xsl:sequence select="accumulator-after()"/>

Added by Michael Kay about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Streaming
Sprint/Milestone:
-
Start date:
2017-06-28
Due date:
% Done:

100%

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

Description

The rules for accumulator-after() say (ยง19.8.9.1, rule 8): If no enclosing node N of the function call has a preceding sibling node P such that (a) N and P are part of the same sequence constructor, and (b) the sweep of P is consuming, then the function call is consuming. (The term enclosing node is defined above.)

But Saxon normally carries out streamability assessment after simplifying and optimizing the expression tree, and this process collapses <xsl:sequence select="accumulator-after()"/> into a single node on the tree. In evaluating this rule we are looking only for preceding-siblings of ancestors (in the expression tree) of the call on accumulator-after(); but in this case, after the above rewrites, the consuming instruction is a preceding-sibling of the function call itself, not of any parent instruction.

Originally raised here: https://saxonica.plan.io/boards/3/topics/6837?r=6842

Please register to edit this issue

Also available in: Atom PDF