W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2014

[Bug 24651] Streamability rules of accumulator-before/after do not help with dependency on current node

From: <bugzilla@jessica.w3.org>
Date: Fri, 21 Mar 2014 11:31:47 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-24651-523-ltUgY9Zm2m@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24651

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
The WG examined this problem on 2014-03-20.

Section 18.2.7 establishes that accumulator-before can only be called in a
pre-descent instruction, and accumulator-after can only be called in a
post-descent instruction. This rule has the consequence that the argument to
these two functions cannot be consuming. However, there is no intrinsic reason
why it should not be climbing.

I propose therefore to:

(a) reclassify the argument as having usage absorption

(b) point out in 19.8.8.1 and 19.8.8.2 that it is a consequence of 18.2.7 that
the argument cannot be consuming

(c) fix the error in 18.2.7 which suggests that accumulator-before and
accumulator-after can only be called in streamable template rules. They can
also be called within xsl:stream, and in fact I see no reason to disallow their
use within xsl:for-each or xsl:iterate. 

Specifically, in 18.2.7

(i) Delete the paragraph

The pre-descent accumulator function accumulator-before can only be invoked in
the course of evaluating a pre-descent instruction in a template rule that
matches the context item, and the post-descent accumulator function
accumulator-after can only be invoked in the course of evaluating a
post-descent instruction in such a template rule. The concepts "pre-descent
instruction" and "post-descent instruction" are defined in 19.8.3 Classifying
Sequence Constructors.

(ii) delete the paragraph (and sub-paras)

If a call on accumulator-before or accumulator-after is evaluated for a
streamable accumulator then:

The evaluation must occur in the course of evaluating a pre-descent or
post-descent instruction in some streamed template rule T, respectively
The context item at the point of invocation of the accumulator function must be
the same as the context node for T.

and replace the first of these with:

It is a dynamic error if accumulator-before or accumulator-after is evaluated
when the context item is not a node.

When accumulator-before or accumulator-after is evaluated, at least one of the
following conditions must be true, otherwise a dynamic error [TBA] is signaled:

* The context node is grounded

* The accumulator is declared with streamable=yes, and one of the following is
true:

** The function is accumulator-before and the call is evaluated in the course
of evaluating a *pre-descent instruction* whose context item is the same as the
context node for evaluation of the function

** The function is accumulator-after and the call is evaluated in the course of
evaluating a *post-descent instruction* whose context item is the same as the
context node for evaluation of the function

Change the definitions of pre-descent and post-descent instructions slightly in
19.8.3 so that an instruction is classified as pre-descent or post-descent only
if it is a descendant of an xsl:template element with streamable=yes, or an
xsl:stream instruction.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 21 March 2014 11:31:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:46 UTC