W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2009

[Bug 6737] New: example error

From: <bugzilla@wiggum.w3.org>
Date: Wed, 25 Mar 2009 12:43:15 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-6737-523@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6737

           Summary: example error
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
               URL: http://www.w3.org/TR/xquery/
        OS/Version: Windows XP
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: XQuery
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: radim.baca@vsb.cz
         QAContact: public-qt-comments@w3.org


I guess the example XQuery at the end:
for $pn in fn:distinct-values(
      fn:doc("catalog.xml")/items/item/partno)
let $i := fn:doc("catalog.xml")/items/item[partno = $pn]
where fn:count($i) >= 3
order by $pn
return 
   <well-supplied-item>
      <partno> {$p} </partno>
      <avgprice> {fn:avg($i/price)} </avgprice>
   </well-supplied-item>



should be:
for $pn in fn:distinct-values(
      fn:doc("catalog.xml")/items/item/partno)
let $i := fn:doc("catalog.xml")/items/item[partno = $pn]
where fn:count($i) >= 3
order by $pn
return 
   <well-supplied-item>
      <partno> {$pn} </partno>
      <avgprice> {fn:avg($i/price)} </avgprice>
   </well-supplied-item>


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 25 March 2009 12:43:26 GMT

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