- Existential and Universal quantifiers
Find titles of books in which both sailing and windsurfing are mentioned
in the same paragraph.
for $b in //book
where some $p in $b//para satisfies
contains($p, "sailing") and contains($p, "windsurfing")
return $b/title
Find titles of books in which sailing is mentioned in every paragraph.
for $b in //book
where every $p in $b//para satisfies
contains($p, "sailing")
return $b/title