This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24342 - Non-grouping variable references are not streamable anymore
Summary: Non-grouping variable references are not streamable anymore
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows NT
: P2 major
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
: 24507 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-21 11:52 UTC by Abel Braaksma
Modified: 2014-05-15 14:00 UTC (History)
1 user (show)

See Also:


Attachments

Description Abel Braaksma 2014-01-21 11:52:54 UTC
This bug was first raised on the xsl-wg mailing list [1]. I copy most of that mail here for convenience of tracking the details:

It seems that in the current Draft variable references of any kind, except when bound to bind-group/-source, are not allowed anymore under the guaranteed streaming rules. I.e.

let $a := 1
return $a

for $i in 1 to 20 return $i

<xsl:variable name="b" select="copy-of(foo)" />
<xsl:sequence select="$b/bar" />

are all disallowed now. The reason is that under [1], we now have a list of rules "first of the following that apply" that have 1, 2 and 3 talk about bind-group/-source and 4 being "otherwise roaming and free-ranging". Just beneath that, there's a line outside the list that says "otherwise, the sweep of the expression is motionless".

[1] https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Jan/0014.html
Comment 1 Abel Braaksma 2014-01-21 11:53:57 UTC
Response in the xsl-wg mailing list from Michael Kay [1] was as follows:

Yes, something has clearly gone wrong here.

I suspect that the intent was that the "Otherwise" in rule 4 was intended to handle the case where one of (1a, 2a, or 3a) apply, while the "Otherwise" outside the list was intended to handle the case where none of these apply. There was probably some refactoring that went wrong.

[1] https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Jan/0015.html
Comment 2 Michael Kay 2014-02-05 10:50:12 UTC
*** Bug 24507 has been marked as a duplicate of this bug. ***
Comment 3 C. M. Sperberg-McQueen 2014-02-10 15:19:56 UTC
The WG discussed this during the Prague face-to-face meeting.

Editorial cleanup needed.
Comment 4 Michael Kay 2014-02-17 13:48:10 UTC
The rules have been refactored to remove the inconsistencies.
Comment 5 Abel Braaksma 2014-03-04 18:12:59 UTC
Reopening the bug, because the change mentioned in bug 24535, which itself refers to this bug for its resolution, was not applied: 

Rule #4 does not mention the posture (which should be grounded).
Comment 6 Michael Kay 2014-04-16 08:25:03 UTC
I am marking this as resolved because I believe it has disappeared as an issue as a consequence to the changes that eliminating grouping variables. Please reopen if this is not the case.
Comment 7 Abel Braaksma 2014-04-17 11:06:21 UTC
I concur. It now says "variable references are grounded and motionless", period. As simple as that.