Project

Profile

Help

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

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

1
<bib>
2
{
3
    for $book1 in doc("bib.xml")//book,
4
        $book2 in doc("bib.xml")//book
5
    let $aut1 := for $a in $book1/author 
6
                 order by $a/last, $a/first
7
                 return $a
8
    let $aut2 := for $a in $book2/author 
9
                 order by $a/last, $a/first
10
                 return $a
11
    where $book1 << $book2
12
    and not($book1/title = $book2/title)
13
    and deep-equal($aut1, $aut2) 
14
    return
15
        <book-pair>
16
            { $book1/title }
17
            { $book2/title }
18
        </book-pair>
19
}
20
</bib>
(21-21/38)