W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2005

[Bug 1249] [XQuery] Is it too restrictive to only allow last path step to return atomic values?

From: <bugzilla@wiggum.w3.org>
Date: Thu, 14 Apr 2005 20:23:34 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1DMAsA-0007fO-B5@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1249





------- Additional Comments From mike@saxonica.com  2005-04-14 20:23 -------
As Michael Rys responded, the WGs spent a lot of time on this issue. A number of
people felt that there was a need for a "simple mapping operator" equivalent to

for . in SEQ1 return SEQ2

One syntax that was proposed was SEQ1!SEQ2. Overloading "/" to perform this
function is difficult because of the rule that "/" causes nodes to be delivered
in document order with duplicates eliminated. Allowing atomic values on the left
would also have the effect that the value of 10/5 is 5, which some WG members
found abhorrent. Hence the suggestion to use a different operator; but others
thought the very subtle distinction between the two operators would be too
confusing, and in any case, the new operator would offer insufficient usability
benefit over writing "for $x in S1 return S2($x)". The decision to allow atomic
values on the right of "/" while still requiring nodes on the left is something
of a compromise but it happened to be the solution that got the most support.

Michael Kay
Received on Thursday, 14 April 2005 20:23:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:37 GMT