changeset 669:ef1ff5fdab5b

Changed the xsl transformation for a parameter/measurement matrix (issue199). gnv/trunk@784 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 16 Mar 2010 10:30:13 +0000
parents ccd47d9887ec
children b89b31293772
files gnv/ChangeLog gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl
diffstat 2 files changed, 25 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Mon Mar 15 13:46:05 2010 +0000
+++ b/gnv/ChangeLog	Tue Mar 16 10:30:13 2010 +0000
@@ -1,3 +1,14 @@
+2010-03-16  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* src/main/webapp/WEB-INF/config/templates/describe-ui.xsl: Changed the
+	  rendering of measurement/parameter matrix. The matrix will now look like 
+	  this:
+
+		              | measurement label | measurement label
+	  -------------------------------------------------------
+	  parameter label | measurement value | measurement value
+	  parameter label | measurement value | measurement value
+
 2010-03-15  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	  Issue198
--- a/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl	Mon Mar 15 13:46:05 2010 +0000
+++ b/gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl	Tue Mar 16 10:30:13 2010 +0000
@@ -89,18 +89,25 @@
                 <table class="static">
                     <tr>
                         <td><!-- nothing here --></td>
-                        <xsl:for-each select="xform:select[1]/xform:item">
-                            <td class="matrixHeader"><xsl:value-of select="position()"/>.</td>
-                        </xsl:for-each>
+                        <!-- take the first select node to render column labels -->
+                        <xsl:apply-templates select="xform:select[1]/xform:item" mode="matrixHeader"/>
                     </tr>
+                    <!-- render matrix' body -->
                     <xsl:apply-templates select="xform:select" mode="matrix" />
                 </table>
-                <xsl:apply-templates select="xform:select[1]" mode="matrixLegend"/>
             </xsl:otherwise>
         </xsl:choose>
     </xsl:template>
 
-    <!-- template for rendering parameter matrix -->
+    <!-- rendering column headers (measurements) -->
+    <xsl:template match="xform:item" mode="matrixHeader">
+        <td class="matrixHeader">
+            <xsl:value-of select="xform:label/text()"/>
+        </td>
+    </xsl:template>
+
+
+    <!-- render the first column with parameter names into matrix -->
     <xsl:template match="xform:select" mode="matrix">
         <tr>
             <td><xsl:value-of select="@label" /></td>
@@ -108,19 +115,9 @@
         </tr>
     </xsl:template>
 
-    <!-- template for rendering parameter matrix -->
-    <xsl:template match="xform:select" mode="matrixLegend">
-        <table>
-            <xsl:for-each select="xform:item">
-                <tr>
-                    <td><xsl:value-of select="position()" />.:</td>
-                    <td><xsl:value-of select="@parameter" /></td>
-                </tr>
-            </xsl:for-each>
-        </table>
-    </xsl:template>
 
-    <!-- template for rendering parameter matrix -->
+    <!-- render checkboxes and disable checkboxes for invalid parameter 
+         measurements -->
     <xsl:template match="xform:item" mode="matrix">
         <xsl:variable name="value" select="xform:value/text()"/>
         <xsl:variable name="name" select="@ref"/>

http://dive4elements.wald.intevation.org