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 13491 - Variables in group-by clauses
Summary: Variables in group-by clauses
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 02:59 UTC by Michael Kay
Modified: 2013-06-19 08:26 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2011-08-01 02:59:59 UTC
The description of "group-by" states "The name of each grouping variable must be equal (by the eq operator on expanded QNames) to the name of a bound variable in the input tuple stream; otherwise a static error is raised [err:XQST0094]."

But the definition of XQST0094 states "In the group by clause of a FLWOR expression, it is a static error if the name of a grouping variable is not equal (by the eq operator on expanded QNames) to the name of a variable that is bound by a for or let clause that precedes the group by clause."

This leaves it unclear whether it is permissible for the grouping variable to be one that is bound by a previous count, group-by, or window clause.

(I'm also puzzled by the qualifier "bound" in "bound variable". Is it possible to have unbound variables in the tuple stream?)
Comment 1 Jonathan Robie 2011-09-10 16:21:55 UTC
The wording in the spec changed, and the wording in the error message did not change along with it. I have changed the wording in the error message to match.