changeset 7406:91ff42699f58

(issue965) Add a comment to explain what we do here
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 21 Oct 2013 19:05:41 +0200
parents 350057df635b
children 8be4eb02b432
files artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 19 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Mon Oct 21 18:57:30 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Mon Oct 21 19:05:41 2013 +0200
@@ -1668,12 +1668,27 @@
     </dc:macro>
 
     <dc:macro name="minfo-heights">
+      <dc:commment>
+        The input here is a list differenc ids noted in the
+        form:
+        [2726deb8-e71f-4acc-bc57-c7ae6062df2e;bedheight;0;FP-Mai2006vHW]#
+        [df79ba16-7e2a-43d6-b15b-34dca1fd9bff;bedheight;0;FP-2007_0-286]#
+        [027ba0ac-5453-4e63-a99b-1feeb82a4e06;bedheight;0;QP-2002nHW]#
+        [26b9b6eb-1ce5-4011-83c7-b88e15e99870;bedheight;0;FP-Nov2008]
+
+        (Linebreaks inserted for readability)
+
+        We take this string and look for all 4 digit numbers (\d{4}) after
+        we have removed the uuids from the input string (dc:replace all).
+        On this list of numbers we use the dc:min/max-number functions to
+        get the extreme values and interpret the result as a number.
+      </dc:comment>
       <dc:variable name="year_from" expr="
         dc:min-number(
-        dc:find-all(
-          '\d{4}',
-            dc:replace-all(
-              $diffids, '[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', '')))"
+          dc:find-all(
+            '\d{4}',
+              dc:replace-all(
+                $diffids, '[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', '')))"
         type="number"/>
       <dc:variable name="year_to" expr="
         dc:max-number(

http://dive4elements.wald.intevation.org