Project

Profile

Help

Bug #3319

Updated by Michael Kay about 7 years ago

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

Back