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@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 |