blob: e20b41f3c936bbdfe6fe6d58e2878a609959aabc (
plain)
1
2
3
4
5
6
7
8
9
|
let $f := doc("libri.xml")
let $authors := $f//autore
for $author in distinct-values($authors)
let $books := $f//libro[autore=$author]
return <author>
<name>{ $author }</name>
<num>{ count($books) }</num>
</author>
|