W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2010

[XQuery]

From: (wrong string) Геннадий Берман <genberm@gmail.com>
Date: Wed, 10 Nov 2010 22:27:28 +0300
Message-ID: <AANLkTikuojXFgLzkUh2mn5VXHVxV9FbVHP2=+McM9pe_@mail.gmail.com>
To: public-qt-comments@w3.org
Hi.
XQuery 1.0: An XML Query Language (
http://www.w3.org/TR/2007/REC-xquery-20070123/),
appendice J1 Joins.
I guess the second example XQuery (line 10):

for $s in fn:doc("suppliers.xml")/suppliers/supplier
order by $s/suppname
return
   <supplier>
      {
        $s/suppname,
        for $i in fn:doc("catalog.xml")/items/item
                 [suppno = $s/suppno],
            $p in fn:doc("parts.xml")/parts/part
                * [partno = $i/pno]*
        order by $p/description
        return $p/description
      }
   </supplier>

should be:

for $s in fn:doc("suppliers.xml")/suppliers/supplier
order by $s/suppname
return
   <supplier>
      {
        $s/suppname,
        for $i in fn:doc("catalog.xml")/items/item
                 [suppno = $s/suppno],
            $p in fn:doc("parts.xml")/parts/part
                * [partno = $i/partno]*
        order by $p/description
        return $p/description
      }
   </supplier>

All the best,
Gennady Berman.
Received on Wednesday, 10 November 2010 22:48:26 GMT

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