-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjunta.xq
43 lines (38 loc) · 828 Bytes
/
junta.xq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
declare variable $DATE as xs:date external ;
<root>
<date>
{
$DATE
}
</date>
<table>
{
for $a in doc("xml/fdc-eventos-2012.xml")/EVENTOS/EVENT[ DATE = $DATE]
let $play := doc("xml/fdc-obras-2012.xml")/PLAYS/PLAY[./ID_PLAY = $a/ID_PLAY]
let $place := doc("xml/fdc-sedes-2012.xml")/PLACES/PLACE[./ID_PLACE = $a/ID_PLACE]
let $artist := doc("xml/fdc-artistas-2012.xml")/ARTISTS/ARTIST[./ID_ARTIST = $a/ID_ARTIST1]
return
<row>
{
$play/TITLE
}
{
$play/SYNOPSIS_ES
}
<PLACE>
<NAME>{$place/TITLE/text()}</NAME>
<ADDRESS>{$place/ADDRESS/text()}</ADDRESS>
</PLACE>
{
$a/TIME
}
<ARTIST>
{$artist/NAME}
</ARTIST>
{
$artist/BIO_ES
}
</row>
}
</table>
</root>