diff artifacts/doc/conf/meta-data.xml @ 7348:59bfda45262b

(issue1474) Add sqrelation user data and disable filtering for it
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 16 Oct 2013 11:45:23 +0200
parents 93a1e63f5644
children 463cbda8c6e7
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Wed Oct 16 11:42:53 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Wed Oct 16 11:45:23 2013 +0200
@@ -407,6 +407,9 @@
                       <dc:call-macro name="waterlevels-fix"/>
                       <dc:call-macro name="delta-wt-ls"/>
                     </dc:when>
+                    <dc:when test="starts-with($out, 'sq_relation')">
+                      <dc:call-macro name="sqrelations_user"/>
+                    </dc:when>
                   </dc:choose>
                 </dc:iterate>
               </dc:otherwise>
@@ -1063,6 +1066,35 @@
       </dc:filter>
     </dc:macro>
 
+    <dc:macro name="sqrelations_user">
+      <dc:filter expr="
+        ($out = 'sq_relation_a' and starts-with($facet_name, 'sq_a')) or
+        ($out = 'sq_relation_b' and starts-with($facet_name, 'sq_b')) or
+        ($out = 'sq_relation_c' and starts-with($facet_name, 'sq_c')) or
+        ($out = 'sq_relation_d' and starts-with($facet_name, 'sq_d')) or
+        ($out = 'sq_relation_e' and starts-with($facet_name, 'sq_e')) or
+        ($out = 'sq_relation_f' and starts-with($facet_name, 'sq_f'))">
+        <dc:if test="dc:has-result()">
+          <sq_relations>
+            <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)">
+              <sqrel description="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:element name="${facet_name}">
+                    <dc:attribute name="factory" value="minfo"/>
+                    <dc:attribute name="target_out" value="${out}"/>
+                    <dc:attribute name="description" value="${facet_description}"/>
+                    <dc:attribute name="ids" value="${facet_num}"/>
+                    <dc:attribute name="artifact-id" value="${a_gid}"/>
+                    <dc:attribute name="out" value="${out_name}"/>
+                  </dc:element>
+                </dc:for-each>
+              </sqrel>
+            </dc:group>
+          </sq_relations>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
+
     <dc:macro name="waterlevels-discharge">
       <dc:filter expr="$out_name = 'discharge_longitudinal_section' and $facet_name = 'discharge_longitudinal_section.w'">
         <dc:if test="dc:has-result()">
@@ -2854,7 +2886,12 @@
     </dc:macro>
 
     <dc:macro name="km-filtered-user-artifacts">
-      <dc:filter expr="not($deffrom &gt; $tokm or $defto &lt; $fromkm)">
+      <dc:comment>
+        Apply KM Filtering but pass
+        sq_ facets with no regard about their location.
+      </dc:comment>
+      <dc:filter expr="not($deffrom &gt; $tokm or $defto &lt; $fromkm) or
+        starts-with($facet_name, 'sq_')">
         <dc:macro-body/>
       </dc:filter>
     </dc:macro>

http://dive4elements.wald.intevation.org