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 4541 - [UPD] Section 2.5.1 FLWOR Expression
Summary: [UPD] Section 2.5.1 FLWOR Expression
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-04 23:40 UTC by Michael Rys
Modified: 2008-05-15 19:48 UTC (History)
0 users

See Also:


Attachments

Description Michael Rys 2007-05-04 23:40:06 UTC
Do not overload "return" with updating semantics. "return do" just sounds weird. use "modify" (also makes it consistent with transform) for updating and require "return" to be non-updating.
Comment 1 Don Chamberlin 2007-05-14 04:40:32 UTC
I agree that "return do" is not pretty. But I don't think it would be wise to have two forms of FLWOR, one that requires an updating expression and one that requires a non-updating expression. This will get us into trouble later if we allow updating expressions and non-updating expressions to be mixed, as in the XQueryP proposal. I think it is wiser to keep the FLWOR expression fully orthogonal (independent of what kind of expression is in the return clause).

Note that this issue (relationship between FLWOR and updating expressions) was discussed at great length at the St. Petersburg meeting of the working group in January 2006. The current design was agreed upon by the working group after considering several proposals. One of the things that slows down our progress is repeatedly revisiting decisions that were made explicitly many months ago.

--Don C.
Comment 2 Don Chamberlin 2007-08-01 17:24:21 UTC
Michael,
The Query working group discussed the syntax of the Update Facility in its meetings on June 29 and July 31, 2007. The working group did not agree to split the FLWOR expression into updating and non-updating versions as requested by this Bugzilla item. However, the working group agrees with your observation that the use of "do" in the update syntax is unappealing. 

As you know, the XQuery grammar uses double keywords in certain positions as an aid to lexing the language in the absence of reserved words. That is the reason for constructs like "do insert". On July 31, the working group decided to replace "do insert" by "insert nodes" (with similar changes in the delete, replace, and rename expressions). Although this is not exactly the change you requested, we believe that this change addresses the underlying issue you have raised. Details of the grammar change will appear in the next draft of the Update specification.

This change does not affect the semantics of the Update facility. The change is pending confirmation that it can be successfully integrated into our reference parser.

Regards,
Don Chamberlin (for the Query Working Group)
Comment 3 Michael Rys 2008-05-15 19:48:23 UTC
Using return when nothing gets returned is still strange, but the new syntax is already progress.