[PATCH 2 of 2] (issue965) Add a comment to explain what we do here

Wald Commits scm-commit at wald.intevation.org
Tue Oct 22 10:13:35 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1382375141 -7200
# Node ID 91ff42699f5867e0cd3b2fcd4b6c4d999a877ffe
# Parent  350057df635b6e72926bde9beda642250454e6c9
(issue965) Add a comment to explain what we do here

diff -r 350057df635b -r 91ff42699f58 artifacts/doc/conf/meta-data.xml
--- 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(


More information about the Dive4elements-commits mailing list