comparison gnv/src/main/webapp/WEB-INF/config/templates/describe-ui.xsl @ 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 97d90e314af5
children f3f433053bdd
comparison
equal deleted inserted replaced
668:ccd47d9887ec 669:ef1ff5fdab5b
87 </xsl:when> 87 </xsl:when>
88 <xsl:otherwise> 88 <xsl:otherwise>
89 <table class="static"> 89 <table class="static">
90 <tr> 90 <tr>
91 <td><!-- nothing here --></td> 91 <td><!-- nothing here --></td>
92 <xsl:for-each select="xform:select[1]/xform:item"> 92 <!-- take the first select node to render column labels -->
93 <td class="matrixHeader"><xsl:value-of select="position()"/>.</td> 93 <xsl:apply-templates select="xform:select[1]/xform:item" mode="matrixHeader"/>
94 </xsl:for-each>
95 </tr> 94 </tr>
95 <!-- render matrix' body -->
96 <xsl:apply-templates select="xform:select" mode="matrix" /> 96 <xsl:apply-templates select="xform:select" mode="matrix" />
97 </table> 97 </table>
98 <xsl:apply-templates select="xform:select[1]" mode="matrixLegend"/>
99 </xsl:otherwise> 98 </xsl:otherwise>
100 </xsl:choose> 99 </xsl:choose>
101 </xsl:template> 100 </xsl:template>
102 101
103 <!-- template for rendering parameter matrix --> 102 <!-- rendering column headers (measurements) -->
103 <xsl:template match="xform:item" mode="matrixHeader">
104 <td class="matrixHeader">
105 <xsl:value-of select="xform:label/text()"/>
106 </td>
107 </xsl:template>
108
109
110 <!-- render the first column with parameter names into matrix -->
104 <xsl:template match="xform:select" mode="matrix"> 111 <xsl:template match="xform:select" mode="matrix">
105 <tr> 112 <tr>
106 <td><xsl:value-of select="@label" /></td> 113 <td><xsl:value-of select="@label" /></td>
107 <xsl:apply-templates mode="matrix" /> 114 <xsl:apply-templates mode="matrix" />
108 </tr> 115 </tr>
109 </xsl:template> 116 </xsl:template>
110 117
111 <!-- template for rendering parameter matrix -->
112 <xsl:template match="xform:select" mode="matrixLegend">
113 <table>
114 <xsl:for-each select="xform:item">
115 <tr>
116 <td><xsl:value-of select="position()" />.:</td>
117 <td><xsl:value-of select="@parameter" /></td>
118 </tr>
119 </xsl:for-each>
120 </table>
121 </xsl:template>
122 118
123 <!-- template for rendering parameter matrix --> 119 <!-- render checkboxes and disable checkboxes for invalid parameter
120 measurements -->
124 <xsl:template match="xform:item" mode="matrix"> 121 <xsl:template match="xform:item" mode="matrix">
125 <xsl:variable name="value" select="xform:value/text()"/> 122 <xsl:variable name="value" select="xform:value/text()"/>
126 <xsl:variable name="name" select="@ref"/> 123 <xsl:variable name="name" select="@ref"/>
127 <td> 124 <td>
128 <xsl:choose> 125 <xsl:choose>

http://dive4elements.wald.intevation.org