[PATCH 2 of 5] issue1345: Show fraction and year for sediment load dc subtree

Wald Commits scm-commit at wald.intevation.org
Thu Oct 10 11:16:57 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1381396250 -7200
# Node ID 0ba4c4fbd410af916b9ec87ab24e4f12b3092535
# Parent  c9d448b959acee338dd77b60699660e6c866fe72
issue1345: Show fraction and year for sediment load dc subtree.

diff -r c9d448b959ac -r 0ba4c4fbd410 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Thu Oct 10 09:49:01 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Thu Oct 10 11:10:50 2013 +0200
@@ -1295,7 +1295,17 @@
       </densities>
     </dc:macro>
 
-
+    <dc:macro name="one-load">
+      <dc:for-each>
+          <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $year)"/>
+          <year description="{$syear}"
+                 factory="sedimentyield"
+                 target_out="{$out}"
+                 info="{$description}"
+                ids="{$syid}" />
+      </dc:for-each>
+    </dc:macro>
+      
     <dc:macro name="yields">
       <yields>
       <years>
@@ -1317,14 +1327,48 @@
             ORDER BY fraction
         </dc:statement>
         <dc:if test="dc:has-result()">
-          <dc:for-each>
-            <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $year)"/>
-            <year description="{$syear} - {$description}"
-                   factory="sedimentyield"
-                   target_out="{$out}"
-                   info="{$syear}-{$fraction}"
-                  ids="{$syid}" />
-          </dc:for-each>
+          <dc:filter expr="$fraction='sand'">
+            <dc:if test="dc:has-result()">
+              <sand>
+                <dc:call-macro name="one-load"/>
+              </sand>
+            </dc:if>
+          </dc:filter>
+          <dc:filter expr="$fraction='fine_middle'">
+            <dc:if test="dc:has-result()">
+              <fine_middle>
+                <dc:call-macro name="one-load"/>
+              </fine_middle>
+            </dc:if>
+          </dc:filter>
+          <dc:filter expr="$fraction='coarse'">
+            <dc:if test="dc:has-result()">
+              <coarse>
+                <dc:call-macro name="one-load"/>
+              </coarse>
+            </dc:if>
+          </dc:filter>
+          <dc:filter expr="$fraction='suspended_sediment'">
+            <dc:if test="dc:has-result()">
+              <susp_sediment>
+                <dc:call-macro name="one-load"/>
+              </susp_sediment>
+            </dc:if>
+          </dc:filter>
+          <dc:filter expr="$fraction='susp_sand'">
+            <dc:if test="dc:has-result()">
+              <susp_sand>
+               <dc:call-macro name="one-load"/>
+              </susp_sand>
+            </dc:if>
+          </dc:filter>
+          <dc:filter expr="$fraction='susp_sand_bed'">
+            <dc:if test="dc:has-result()">
+              <susp_sand_bed>
+                <dc:call-macro name="one-load"/>
+              </susp_sand_bed>
+            </dc:if>
+          </dc:filter>
         </dc:if>
       </dc:context>
       </years>


More information about the Dive4elements-commits mailing list