Project

Profile

Help

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

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

1
<bib>
2
  {
3
    for $b in doc("bib.xml")//book
4
    where count($b/author) > 0
5
    return
6
        <book>
7
            { $b/title }
8
            {
9
                for $a in $b/author[position()<=2]  
10
                return $a
11
            }
12
            {
13
                if (count($b/author) > 2)
14
                 then <et-al/>
15
                 else ()
16
            }
17
        </book>
18
  }
19
</bib>
(31-31/38)