comparison gnv/src/main/webapp/WEB-INF/config/templates/describe-ui-static.xsl @ 388:6e16dc005704

Removed for-each statements and replaced them with templates. gnv/trunk@507 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 05 Jan 2010 08:52:49 +0000
parents 6de60d996475
children 416ff31f6273
comparison
equal deleted inserted replaced
387:6de60d996475 388:6e16dc005704
12 <table> 12 <table>
13 <tr> 13 <tr>
14 <th class="parameter"><xsl:value-of select="*[local-name() = 'label']"/>:</th> 14 <th class="parameter"><xsl:value-of select="*[local-name() = 'label']"/>:</th>
15 <td> 15 <td>
16 <table> 16 <table>
17 <xsl:for-each select="./choices/item"> 17 <xsl:apply-templates select="choices/item" mode="table"/>
18 <xsl:if test="@selected = 'true'">
19 <tr><td class="value"><xsl:value-of select="./label"/></td></tr>
20 </xsl:if>
21 </xsl:for-each>
22 </table> 18 </table>
23 </td> 19 </td>
24 </tr> 20 </tr>
25 </table> 21 </table>
26 </div>  22 </div> 
27 </xsl:template> 23 </xsl:template>
24
25
26 <xsl:template match="*[local-name() = 'item']" mode="table">
27 <xsl:if test="@selected = 'true'">
28 <tr>
29 <td class="value"><xsl:value-of select="./label"/></td>
30 </tr>
31 </xsl:if>
32 </xsl:template>
33
34
28 <xsl:template match="*[local-name() = 'select1']"> 35 <xsl:template match="*[local-name() = 'select1']">
29 <xsl:variable name="selectName" select="@ref"/> 36 <xsl:variable name="selectName" select="@ref"/>
30 <div id="timeseriesfilter"> 37 <div id="timeseriesfilter">
31 <table> 38 <table>
32 <tr> 39 <tr>
35 </tr> 42 </tr>
36 </table> 43 </table>
37 </div> 44 </div>
38 </xsl:template> 45 </xsl:template>
39 46
47
40 <xsl:template match="*[local-name() = 'group']"> 48 <xsl:template match="*[local-name() = 'group']">
41 <xsl:variable name="inputName" select="*[local-name() = 'label']"/> 49 <xsl:variable name="inputName" select="*[local-name() = 'label']"/>
42 <div id="timeseriesfilter"> 50 <div id="timeseriesfilter">
43 <table> 51 <table>
44 <tr> 52 <tr>
45 <th class="parameter"><xsl:value-of select="*[local-name() = 'label']"/>:</th> 53 <th class="parameter"><xsl:value-of select="*[local-name() = 'label']"/>:</th>
46 <td> 54 <td>
47 <table> 55 <table>
48 <xsl:for-each select="./input"> 56 <xsl:apply-templates select="input" mode="table"/>
49 <tr><td class="value">
50 <xsl:value-of select="./label"/>&#160;<xsl:value-of select="./value"/>
51 </td></tr>
52 </xsl:for-each>
53 </table> 57 </table>
54 </td> 58 </td>
55 </tr> 59 </tr>
56 </table> 60 </table>
57 </div> 61 </div>
58 </xsl:template> 62 </xsl:template>
59 63
60 <xsl:template match="*[local-name() = 'input']"> 64
61 <xsl:variable name="inputValue" select="*[local-name() = 'value']"/> 65 <xsl:template match="*[local-name() = 'input']" mode="table">
62 <xsl:variable name="inputName" select="*[local-name() = 'label']"/> 66 <tr>
63 <xsl:choose> 67 <td class="value">
64 <xsl:when test="*[local-name() = 'label']!= ''"> 68 <xsl:value-of select="./label"/>&#160;<xsl:value-of select="./value"/>
65 <xsl:value-of select="*[local-name() = 'label']"/>: 69 </td>
66 </xsl:when> 70 </tr>
67 </xsl:choose>
68 <xsl:value-of select="*[local-name() = 'value']"/>
69 </xsl:template> 71 </xsl:template>
70 72
71 <xsl:template match="*[local-name() = 'label']"> 73
72 </xsl:template>
73 </xsl:stylesheet> 74 </xsl:stylesheet>

http://dive4elements.wald.intevation.org