Project

Profile

Help

How to connect?
Download (483 Bytes) Statistics
| Branch: | Revision:

he / src / use-cases / xmp / q4.xq @ a31dd97a

1
<results>
2
  {
3
    let $a := doc("bib.xml")//author
4
    for $last in distinct-values($a/last),
5
        $first in distinct-values($a[last=$last]/first)
6
    return
7
        <result>
8
            { $last, $first }
9
            {
10
                for $b in doc("bib.xml")/bib/book
11
                where some $ba in $b/author 
12
                      satisfies ($ba/last = $last and $ba/first=$first)
13
                return $b/title
14
            }
15
        </result>
16
  }
17
</results>
(27-27/38)