comparison flys-artifacts/doc/conf/meta-data.xml @ 4894:5741970e2c58

meta-data.xml: Replace wst_columns queries by macro call.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 28 Jan 2013 17:16:00 +0100
parents e05568393eb4
children 065a78d65007
comparison
equal deleted inserted replaced
4893:54762b8ef016 4894:5741970e2c58
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> 2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage">
3 <datacage> 3 <datacage>
4 <dc:macro name="SQL-wst_columns_statement">
5 <dc:statement>
6 SELECT wst_columns.id AS prot_column_id,
7 wst_columns.name AS prot_column_name,
8 wst_columns.position AS prot_rel_pos,
9 wst_columns.description AS info
10 FROM wst_columns WHERE wst_columns.wst_id = ${prot_id}
11 ORDER by wst_columns.position
12 </dc:statement>
13 </dc:macro>
4 <dc:macro name="load-system"> 14 <dc:macro name="load-system">
5 <dc:context connection="system"> 15 <dc:context connection="system">
6 <dc:statement> 16 <dc:statement>
7 SELECT id AS river_id, name as river_name FROM rivers 17 SELECT id AS river_id, name as river_name FROM rivers
8 WHERE lower(name) LIKE lower(${river}) 18 WHERE lower(name) LIKE lower(${river})
22 </dc:statement> 32 </dc:statement>
23 <dc:elements> 33 <dc:elements>
24 <basedata> 34 <basedata>
25 <dc:attribute name="name" value="${prot_description}"/> 35 <dc:attribute name="name" value="${prot_description}"/>
26 <dc:context> 36 <dc:context>
27 <dc:statement> 37 <dc:call-macro name="SQL-wst_columns_statement"/>
28 SELECT id AS prot_column_id,
29 name AS prot_column_name,
30 position AS prot_rel_pos,
31 description AS info
32 FROM wst_columns WHERE wst_id = ${prot_id}
33 ORDER by position
34 </dc:statement>
35 <dc:elements> 38 <dc:elements>
36 <column> 39 <column>
37 <dc:attribute name="name" value="${prot_column_name}"/> 40 <dc:attribute name="name" value="${prot_column_name}"/>
38 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> 41 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/>
39 <dc:attribute name="factory" value="staticwkms"/> 42 <dc:attribute name="factory" value="staticwkms"/>
57 </dc:statement> 60 </dc:statement>
58 <dc:elements> 61 <dc:elements>
59 <basedata> 62 <basedata>
60 <dc:attribute name="name" value="${prot_description}"/> 63 <dc:attribute name="name" value="${prot_description}"/>
61 <dc:context> 64 <dc:context>
62 <dc:statement> 65 <dc:call-macro name="SQL-wst_columns_statement"/>
63 SELECT wst_columns.id AS prot_column_id,
64 wst_columns.name AS prot_column_name,
65 wst_columns.position AS prot_rel_pos,
66 wst_columns.description AS info
67 FROM wst_columns WHERE wst_columns.wst_id = ${prot_id}
68 ORDER by wst_columns.position
69 </dc:statement>
70 <dc:elements> 66 <dc:elements>
71 <column> 67 <column>
72 <dc:attribute name="name" value="${prot_column_name}"/> 68 <dc:attribute name="name" value="${prot_column_name}"/>
73 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> 69 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/>
74 <dc:attribute name="factory" value="wqinterpol"/> 70 <dc:attribute name="factory" value="wqinterpol"/>
93 </dc:statement> 89 </dc:statement>
94 <dc:elements> 90 <dc:elements>
95 <additional> 91 <additional>
96 <dc:attribute name="name" value="${prot_description}"/> 92 <dc:attribute name="name" value="${prot_description}"/>
97 <dc:context> 93 <dc:context>
98 <dc:statement> 94 <dc:call-macro name="SQL-wst_columns_statement"/>
99 SELECT id AS prot_column_id,
100 name AS prot_column_name,
101 position AS prot_rel_pos,
102 description AS info
103 FROM wst_columns WHERE wst_id = ${prot_id}
104 ORDER by position
105 </dc:statement>
106 <dc:elements> 95 <dc:elements>
107 <column> 96 <column>
108 <dc:attribute name="name" value="${prot_column_name}"/> 97 <dc:attribute name="name" value="${prot_column_name}"/>
109 <dc:attribute name="ids" value="additionalsmarks-wstv-${prot_rel_pos}-${prot_id}"/> 98 <dc:attribute name="ids" value="additionalsmarks-wstv-${prot_rel_pos}-${prot_id}"/>
110 <dc:attribute name="factory" value="staticwkms"/> 99 <dc:attribute name="factory" value="staticwkms"/>
129 </dc:statement> 118 </dc:statement>
130 <dc:elements> 119 <dc:elements>
131 <additional> 120 <additional>
132 <dc:attribute name="name" value="${prot_description}"/> 121 <dc:attribute name="name" value="${prot_description}"/>
133 <dc:context> 122 <dc:context>
134 <dc:statement> 123 <dc:call-macro name="SQL-wst_columns_statement"/>
135 SELECT id AS prot_column_id,
136 name AS prot_column_name,
137 position AS prot_rel_pos,
138 description AS info
139 FROM wst_columns WHERE wst_id = ${prot_id}
140 ORDER by position
141 </dc:statement>
142 <dc:elements> 124 <dc:elements>
143 <column> 125 <column>
144 <dc:attribute name="name" value="${prot_column_name}"/> 126 <dc:attribute name="name" value="${prot_column_name}"/>
145 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> 127 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/>
146 <dc:attribute name="factory" value="staticwkms"/> 128 <dc:attribute name="factory" value="staticwkms"/>
165 </dc:statement> 147 </dc:statement>
166 <dc:elements> 148 <dc:elements>
167 <relativepoint> 149 <relativepoint>
168 <dc:attribute name="name" value="${prot_description}"/> 150 <dc:attribute name="name" value="${prot_description}"/>
169 <dc:context> 151 <dc:context>
170 <dc:statement> 152 <dc:call-macro name="SQL-wst_columns_statement"/>
171 SELECT id AS prot_column_id,
172 name AS prot_column_name,
173 position AS prot_rel_pos,
174 description AS info
175 FROM wst_columns WHERE wst_id = ${prot_id}
176 ORDER by position
177 </dc:statement>
178 <dc:elements> 153 <dc:elements>
179 <column> 154 <column>
180 <dc:attribute name="name" value="${prot_column_name}"/> 155 <dc:attribute name="name" value="${prot_column_name}"/>
181 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> 156 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/>
182 <dc:attribute name="factory" value="staticwkms"/> 157 <dc:attribute name="factory" value="staticwkms"/>
201 <dc:elements> 176 <dc:elements>
202 <fixation> 177 <fixation>
203 <dc:attribute name="name" value="${prot_description}"/> 178 <dc:attribute name="name" value="${prot_description}"/>
204 <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/--> 179 <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/-->
205 <dc:context> 180 <dc:context>
206 <dc:statement> 181 <dc:call-macro name="SQL-wst_columns_statement"/>
207 SELECT id AS prot_column_id,
208 name AS prot_column_name,
209 position AS prot_rel_pos,
210 description AS info
211 FROM wst_columns WHERE wst_id = ${prot_id}
212 ORDER by position
213 </dc:statement>
214 <dc:elements> 182 <dc:elements>
215 <column> 183 <column>
216 <dc:attribute name="name" value="${prot_column_name}"/> 184 <dc:attribute name="name" value="${prot_column_name}"/>
217 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 185 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
218 <dc:attribute name="factory" value="wqinterpol"/> 186 <dc:attribute name="factory" value="wqinterpol"/>
236 </dc:statement> 204 </dc:statement>
237 <dc:elements> 205 <dc:elements>
238 <fixation> 206 <fixation>
239 <dc:attribute name="name" value="${prot_description}"/> 207 <dc:attribute name="name" value="${prot_description}"/>
240 <dc:context> 208 <dc:context>
241 <dc:statement> 209 <dc:call-macro name="SQL-wst_columns_statement"/>
242 SELECT id AS prot_column_id,
243 name AS prot_column_name,
244 position AS prot_rel_pos,
245 description AS info
246 FROM wst_columns WHERE wst_id = ${prot_id}
247 ORDER by position
248 </dc:statement>
249 <dc:elements> 210 <dc:elements>
250 <column> 211 <column>
251 <dc:attribute name="name" value="${prot_column_name}"/> 212 <dc:attribute name="name" value="${prot_column_name}"/>
252 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 213 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
253 <dc:attribute name="factory" value="wqinterpol"/> 214 <dc:attribute name="factory" value="wqinterpol"/>
271 </dc:statement> 232 </dc:statement>
272 <dc:elements> 233 <dc:elements>
273 <fixation> 234 <fixation>
274 <dc:attribute name="name" value="${prot_description}"/> 235 <dc:attribute name="name" value="${prot_description}"/>
275 <dc:context> 236 <dc:context>
276 <dc:statement> 237 <dc:call-macro name="SQL-wst_columns_statement"/>
277 SELECT id AS prot_column_id,
278 name AS prot_column_name,
279 position AS prot_rel_pos,
280 description AS info
281 FROM wst_columns WHERE wst_id = ${prot_id}
282 ORDER by position
283 </dc:statement>
284 <dc:elements> 238 <dc:elements>
285 <column> 239 <column>
286 <dc:attribute name="name" value="${prot_column_name}"/> 240 <dc:attribute name="name" value="${prot_column_name}"/>
287 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 241 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
288 <dc:attribute name="factory" value="staticwkms"/> 242 <dc:attribute name="factory" value="staticwkms"/>
306 </dc:statement> 260 </dc:statement>
307 <dc:elements> 261 <dc:elements>
308 <relativepoint> 262 <relativepoint>
309 <dc:attribute name="name" value="${prot_description}"/> 263 <dc:attribute name="name" value="${prot_description}"/>
310 <dc:context> 264 <dc:context>
311 <dc:statement> 265 <dc:call-macro name="SQL-wst_columns_statement"/>
312 SELECT id AS prot_column_id,
313 name AS prot_column_name,
314 position AS prot_rel_pos,
315 description AS info
316 FROM wst_columns WHERE wst_id = ${prot_id}
317 ORDER by position
318 </dc:statement>
319 <dc:elements> 266 <dc:elements>
320 <column> 267 <column>
321 <dc:attribute name="name" value="${prot_column_name}"/> 268 <dc:attribute name="name" value="${prot_column_name}"/>
322 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 269 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
323 <dc:attribute name="factory" value="staticwkms"/> 270 <dc:attribute name="factory" value="staticwkms"/>
342 </dc:statement> 289 </dc:statement>
343 <dc:elements> 290 <dc:elements>
344 <official> 291 <official>
345 <dc:attribute name="name" value="${prot_description}"/> 292 <dc:attribute name="name" value="${prot_description}"/>
346 <dc:context> 293 <dc:context>
347 <dc:statement> 294 <dc:call-macro name="SQL-wst_columns_statement"/>
348 SELECT id AS prot_column_id,
349 name AS prot_column_name,
350 position AS prot_rel_pos,
351 description AS info
352 FROM wst_columns WHERE wst_id = ${prot_id}
353 ORDER by position
354 </dc:statement>
355 <dc:elements> 295 <dc:elements>
356 <column> 296 <column>
357 <dc:attribute name="name" value="${prot_column_name}"/> 297 <dc:attribute name="name" value="${prot_column_name}"/>
358 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> 298 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/>
359 <dc:attribute name="factory" value="staticwqkms"/> 299 <dc:attribute name="factory" value="staticwqkms"/>
377 </dc:statement> 317 </dc:statement>
378 <dc:elements> 318 <dc:elements>
379 <relativepoint> 319 <relativepoint>
380 <dc:attribute name="name" value="${prot_description}"/> 320 <dc:attribute name="name" value="${prot_description}"/>
381 <dc:context> 321 <dc:context>
382 <dc:statement> 322 <dc:call-macro name="SQL-wst_columns_statement"/>
383 SELECT id AS prot_column_id,
384 name AS prot_column_name,
385 position AS prot_rel_pos,
386 description AS info
387 FROM wst_columns WHERE wst_id = ${prot_id}
388 ORDER by position
389 </dc:statement>
390 <dc:elements> 323 <dc:elements>
391 <column> 324 <column>
392 <dc:attribute name="name" value="${prot_column_name}"/> 325 <dc:attribute name="name" value="${prot_column_name}"/>
393 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> 326 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/>
394 <dc:attribute name="factory" value="staticwkms"/> 327 <dc:attribute name="factory" value="staticwkms"/>
412 </dc:statement> 345 </dc:statement>
413 <dc:elements> 346 <dc:elements>
414 <heightmark> 347 <heightmark>
415 <dc:attribute name="name" value="${prot_description}"/> 348 <dc:attribute name="name" value="${prot_description}"/>
416 <dc:context> 349 <dc:context>
417 <dc:statement> 350 <dc:call-macro name="SQL-wst_columns_statement"/>
418 SELECT id AS prot_column_id,
419 name AS prot_column_name,
420 position AS prot_rel_pos,
421 description AS info
422 FROM wst_columns WHERE wst_id = ${prot_id}
423 ORDER by position
424 </dc:statement>
425 <dc:elements> 351 <dc:elements>
426 <column> 352 <column>
427 <dc:attribute name="name" value="${prot_column_name}"/> 353 <dc:attribute name="name" value="${prot_column_name}"/>
428 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> 354 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/>
429 <dc:attribute name="factory" value="staticwkms"/> 355 <dc:attribute name="factory" value="staticwkms"/>
447 </dc:statement> 373 </dc:statement>
448 <dc:elements> 374 <dc:elements>
449 <heightmark> 375 <heightmark>
450 <dc:attribute name="name" value="${prot_description}"/> 376 <dc:attribute name="name" value="${prot_description}"/>
451 <dc:context> 377 <dc:context>
452 <dc:statement> 378 <dc:call-macro name="SQL-wst_columns_statement"/>
453 SELECT id AS prot_column_id,
454 name AS prot_column_name,
455 position AS prot_rel_pos,
456 description AS info
457 FROM wst_columns WHERE wst_id = ${prot_id}
458 ORDER by position
459 </dc:statement>
460 <dc:elements> 379 <dc:elements>
461 <column> 380 <column>
462 <dc:attribute name="name" value="${prot_column_name}"/> 381 <dc:attribute name="name" value="${prot_column_name}"/>
463 <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/> 382 <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/>
464 <dc:attribute name="factory" value="wqinterpol"/> 383 <dc:attribute name="factory" value="wqinterpol"/>
486 <dc:attribute name="name" value="${prot_description}"/> 405 <dc:attribute name="name" value="${prot_description}"/>
487 <dc:attribute name="db-id" value="${prot_id}"/> 406 <dc:attribute name="db-id" value="${prot_id}"/>
488 <dc:attribute name="factory" value="staticwkms"/> 407 <dc:attribute name="factory" value="staticwkms"/>
489 <columns> 408 <columns>
490 <dc:context> 409 <dc:context>
491 <dc:statement> 410 <dc:call-macro name="SQL-wst_columns_statement"/>
492 SELECT id AS prot_column_id,
493 name AS prot_column_name,
494 position AS prot_rel_pos,
495 description AS info
496 FROM wst_columns WHERE wst_id = ${prot_id}
497 ORDER by position
498 </dc:statement>
499 <dc:elements> 411 <dc:elements>
500 <column> 412 <column>
501 <dc:attribute name="name" value="${prot_column_name}"/> 413 <dc:attribute name="name" value="${prot_column_name}"/>
502 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> 414 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
503 <dc:attribute name="factory" value="staticwkms"/> 415 <dc:attribute name="factory" value="staticwkms"/>
525 <flood_protection> 437 <flood_protection>
526 <dc:attribute name="name" value="${prot_description}"/> 438 <dc:attribute name="name" value="${prot_description}"/>
527 <dc:attribute name="db-id" value="${prot_id}"/> 439 <dc:attribute name="db-id" value="${prot_id}"/>
528 <dc:attribute name="factory" value="staticwkms"/> 440 <dc:attribute name="factory" value="staticwkms"/>
529 <dc:context> 441 <dc:context>
530 <dc:statement> 442 <dc:call-macro name="SQL-wst_columns_statement"/>
531 SELECT id AS prot_column_id,
532 name AS prot_column_name,
533 position AS prot_rel_pos
534 FROM wst_columns WHERE wst_id = ${prot_id}
535 ORDER by position
536 </dc:statement>
537 <dc:elements> 443 <dc:elements>
538 <column> 444 <column>
539 <dc:attribute name="name" value="${prot_column_name}"/> 445 <dc:attribute name="name" value="${prot_column_name}"/>
540 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> 446 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
541 <dc:attribute name="factory" value="staticwkms"/> 447 <dc:attribute name="factory" value="staticwkms"/>
448 <dc:attribute name="info" value="${info}"/>
542 </column> 449 </column>
543 </dc:elements> 450 </dc:elements>
544 </dc:context> 451 </dc:context>
545 </flood_protection> 452 </flood_protection>
546 </dc:elements> 453 </dc:elements>

http://dive4elements.wald.intevation.org