Re: XPath 2.0 little question on draft (`for' statement)

Hello Bernard,
Yes, your formulation of the example in XPath Section 3.7 is equivalent 
and simpler. I'll discuss it with the other editors and consider using 
your version in the next edition. (One possible advantage of retaining the 
current version is to illustrate the nesting of for-expressions.)
Thanks for your comment!
Best regards,
--Don Chamberlin





Bernard van Gastel <bernardg@sci.kun.nl>
Sent by: public-qt-comments-request@w3.org
11/19/2003 07:21 AM
 
        To:     public-qt-comments@w3.org
        cc:     is1@bitpowder.com
        Subject:        XPath 2.0 little question on draft (`for' 
statement)



Hello XPath 2.0 Working Group,

In Section 3.7 of the XPath 2.0 draft of 22 August 2003 the following
example is included.

                 for $a in distinct-values(//author)
                 return ($a,
                         for $b in //book[author = $a]
                         return $b/title)

I think it can be replaced by the following sniplet.

                 for $a in distinct-values(//author)
                 return ($a, //book[author = $a]/title)

Is this correct? Why is chosen for the first version (if the second
version is correct) instead of the second? Thank you in advance,

                 Bernard van Gastel
                 - Student Computer Science,
                                 University of Nijmegen,
                                 The Netherlands

Received on Wednesday, 19 November 2003 14:47:24 UTC