summaryrefslogtreecommitdiff
path: root/Year_2/Databases/verbale_ex1.xquery
blob: 2be6f065ea180a35d33a94759dcc99e8b1cb7c13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<ex1>
{
let $f := doc("verbale.xml")
for $verbale in $f//verbale
where $verbale/studente[@cdl="667"] and $verbale/esame/materia/text()="Reti di Calcolatori"
return <voto>
    <valore>
    {
    $verbale/esame/voto/text()
    }
    </valore>
    {if ($verbale/esame/lode) then (
    <lode>Y</lode>
    ) else () }
    </voto>

}
</ex1>