cee75ae5da0f4b71a732a1518e604c05920b2a94
[quandoparte] / application / resources / stations / generateunclassifiedlist.xq
1 <stations>
2 {
3 for $doc in ('nord.osm',
4              'nordovest.osm', 
5              'nordest.osm',
6              'liguria.osm',
7              'centronord.osm', 
8              'centrosud.osm', 
9              'sud.osm', 
10              'sicilia.osm', 
11              'puglia.osm', 
12              'sardegna.osm')
13 for $node in doc($doc)//node
14 where $node/tag[@k='name'] and empty($node/tag[@k='operator']) 
15 return 
16 <station>
17 <pos>{
18 data($node/@lon)
19 },{
20 data($node/@lat)
21 }
22 </pos>
23 <name>
24 {
25 data($node//tag[@k='name']/@v)
26 }
27 </name>
28 <id>
29 {
30 data($node/@id)
31 }
32 </id>
33 </station>
34 }
35 </stations>