- From: <bugzilla@jessica.w3.org>
- Date: Thu, 21 Aug 2014 15:03:18 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26328 --- Comment #6 from Michael Kay <mike@saxonica.com> --- I note also that the definitions of pre-descent and post-descent allow evaluation of accumulators within xsl:if or xsl:choose, whereas the rules for accumulator-before and accumulator-after do not. To implement comment #5, I think we can change the rules for accumulator before as follows: If the context item is a node in a streamed document, then a number of restrictions (called the dynamic pre-conditions) apply: * The accumulator must be declared with streamable="yes" * The call on accumulator-before must be made in the course of evaluating some sequence constructor SC that has the following properties: ** The element E that immediately contains SC must be one of xsl:stream, xsl:template, xsl:for-each, or xsl:iterate. ** The sweep of SC must be consuming or motionless, and its posture must be striding or crawling. ** The context item for evaluation of SC must be the same as the context item for evaluation of the accumulator-before function call. * Every instruction J that has properties that (a) the call on accumulator-before is made in the course of evaluating J, and (b) the context item for evaluating J is the same as the context item for evaluation accumulator-before, must be one of the following: ** an instruction that is not consuming and that has no preceding-sibling instruction that is consuming, or ** a consuming xsl:if instruction, provided that the test expression is not consuming ** a consuming xsl:choose instruction, provided that: *** if the call is in the course of evaluating a test expression, then neither that test expression nor any preceding test expression is consuming; *** if the call is in the course of evaluating an xsl:when sequence constructor, then that neither the test expression on that xsl:when element nor any preceding test instruction is consuming *** if the call is in the course of evaluating an xsl:otherwise sequence constructor, then no test expression on any xsl:when element is consuming The rules for accumulator-after become: If the context item is a node in a streamed document, then a number of restrictions (called the dynamic pre-conditions) apply: * The accumulator must be declared with streamable="yes" * The call on accumulator-after must be made in the course of evaluating some sequence constructor SC that has the following properties: ** The element E that immediately contains SC must be one of xsl:stream, xsl:template, xsl:for-each, or xsl:iterate. ** The sweep of SC must be consuming or motionless, and its posture must be striding or crawling. ** The context item for evaluation of SC must be the same as the context item for evaluation of the accumulator-before function call. * Every instruction J that has the properties that (a) the call on accumulator-after is made in the course of evaluating J, and (b) the context item for evaluating J is the same as the context item for evaluation of accumulator-after, must be one of the following: ** an instruction that is not consuming and that has no following-sibling instruction that is consuming, or ** a consuming xsl:if instruction, provided that the evaluation occurs in the course of evaluating the sequence constructor contained in the xsl:if instruction ** a consuming xsl:choose instruction, provided that one of the following applies: *** the call is in the course of evaluating a test expression, provided that neither that test expression, nor any following test expression, nor the sequence constructor in any subsequent branch of the xsl:choose is consuming; *** the call is in the course of evaluating an xsl:when sequence constructor, provided that no subsequent branch of the xsl:choose has a test expression or contained sequence constructor that is consuming; *** the call is in the course of evaluating an xsl:otherwise sequence constructor. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Thursday, 21 August 2014 15:03:20 UTC