[Monetdb-developers] Get xquery timing, Error when running examples, etc

Stefan Manegold Stefan.Manegold at cwi.nl
Thu Jul 6 12:48:08 CEST 2006


> > 3. voc2.xq and voc5.xq give the following error:
> >  
> > type error: [err:XPTY0004] Orderspec requires at most one atomic item
> > (given: string*).
> 
> I don't know what the issue is here.  Somebody else should comment.

The queries on the web have unfortunately not yet been updated to match the
latest typing requirements of MonetDB/XQuery. Sorry for the inconvenience,
and thanks for notifying us!

The correct queries are:
========
voc2.xq:
  for $t in doc("voc.xml")//voyage[leftpage/boatname="ZEELANDIA"]
  let $l := $t/leftpage
  order by zero-or-one($l/departure)
  (:       ^^^^^^^^^^^^            ^ :)
  return 
     {
      $l/departure/text(), text { ", " }, $l/harbour/text()
    } 
========
voc5.xq:
  for $t in doc("voc.xml")//voyage
  let $p := zero-or-one($t/rightpage/particulars/text())
  where not($t//destination/arrival)
          and (contains($p,"wrecked")
          or contains($p,"sunk"))
  order by zero-or-one($t/leftpage/boatname/text())
  (:       ^^^^^^^^^^^^                           ^ :)
  return 
    element { "boat" } { 
      element { "name" } { $t/leftpage/boatname/text() }, 
      text { ": " },
      element { "description" } { $t/rightpage/particulars/text() } 
    } 
========

We will update the website as soon as possible.

Stefan

-- 
| Dr. Stefan Manegold | mailto:Stefan.Manegold at cwi.nl |
| CWI,  P.O.Box 94079 | http://www.cwi.nl/~manegold/  |
| 1090 GB Amsterdam   | Tel.: +31 (20) 592-4212       |
| The Netherlands     | Fax : +31 (20) 592-4312       |




More information about the developers-list mailing list