W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > May 2002

Incomplete explanation of the effect of unordered() in "2.9 FLWR Expressions"

From: Ivan Mikhailov <iv_an_ru@yahoo.com>
Date: Fri, 3 May 2002 06:38:08 -0400 (EDT)
Message-ID: <20020503103748.92828.qmail@web20501.mail.yahoo.com>
To: www-xml-query-comments@w3c.org
The spec states that...

The following query returns the same results as
"for $i in (1, 2), $j in (3, 4)...", but the tuples may occur in any order

for $i in unordered((1, 2)),
    $j in unordered((3, 4))
return
    <tuple>
      <i>{ $i }</i>
      <j>{ $j }</j>
    </tuple>

Can it return the following result?

<tuple>
   <i>1</i>
   <j>3</j>
</tuple>
<tuple>
   <i>2</i>
   <j>3</j>
</tuple>
<tuple>
   <i>1</i>
   <j>4</j>
</tuple>
<tuple>
   <i>2</i>
   <j>4</j>
</tuple>

I think it can't. At lease it would be better if it can't, because I want to have guaranteed
grouping by $i even if I have unordered() on $i.

Similarly, I hope that
for $i in unordered((1, 2)), $j in (3, 4) ...
and
for $i in (1, 2), $j in unordered((3, 4)) ...
preserves the order of 'ordered' sequences.

Best Regards,
IvAn Mikhailov


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
Received on Saturday, 4 May 2002 16:12:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 2 February 2007 00:13:05 GMT