Mercurial > dive4elements > river
changeset 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 (2013-01-28) |
parents | 54762b8ef016 |
children | 065a78d65007 |
files | flys-artifacts/doc/conf/meta-data.xml |
diffstat | 1 files changed, 26 insertions(+), 119 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml Mon Jan 28 14:43:53 2013 +0100 +++ b/flys-artifacts/doc/conf/meta-data.xml Mon Jan 28 17:16:00 2013 +0100 @@ -1,6 +1,16 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> <datacage> +<dc:macro name="SQL-wst_columns_statement"> + <dc:statement> + SELECT wst_columns.id AS prot_column_id, + wst_columns.name AS prot_column_name, + wst_columns.position AS prot_rel_pos, + wst_columns.description AS info + FROM wst_columns WHERE wst_columns.wst_id = ${prot_id} + ORDER by wst_columns.position + </dc:statement> +</dc:macro> <dc:macro name="load-system"> <dc:context connection="system"> <dc:statement> @@ -24,14 +34,7 @@ <basedata> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -59,14 +62,7 @@ <basedata> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT wst_columns.id AS prot_column_id, - wst_columns.name AS prot_column_name, - wst_columns.position AS prot_rel_pos, - wst_columns.description AS info - FROM wst_columns WHERE wst_columns.wst_id = ${prot_id} - ORDER by wst_columns.position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -95,14 +91,7 @@ <additional> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -131,14 +120,7 @@ <additional> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -167,14 +149,7 @@ <relativepoint> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -203,14 +178,7 @@ <dc:attribute name="name" value="${prot_description}"/> <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/--> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -238,14 +206,7 @@ <fixation> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -273,14 +234,7 @@ <fixation> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -308,14 +262,7 @@ <relativepoint> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -344,14 +291,7 @@ <official> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -379,14 +319,7 @@ <relativepoint> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -414,14 +347,7 @@ <heightmark> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -449,14 +375,7 @@ <heightmark> <dc:attribute name="name" value="${prot_description}"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -488,14 +407,7 @@ <dc:attribute name="factory" value="staticwkms"/> <columns> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos, - description AS info - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> @@ -527,18 +439,13 @@ <dc:attribute name="db-id" value="${prot_id}"/> <dc:attribute name="factory" value="staticwkms"/> <dc:context> - <dc:statement> - SELECT id AS prot_column_id, - name AS prot_column_name, - position AS prot_rel_pos - FROM wst_columns WHERE wst_id = ${prot_id} - ORDER by position - </dc:statement> + <dc:call-macro name="SQL-wst_columns_statement"/> <dc:elements> <column> <dc:attribute name="name" value="${prot_column_name}"/> <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> <dc:attribute name="factory" value="staticwkms"/> + <dc:attribute name="info" value="${info}"/> </column> </dc:elements> </dc:context>