Mercurial > dive4elements > river
annotate flys-client/src/main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl @ 2912:329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
flys-client/trunk@4733 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 20 Jun 2012 17:30:42 +0000 |
parents | 7715324132bf |
children | 6d96443ed6e6 |
rev | line source |
---|---|
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 <?xml version="1.0" encoding="UTF-8"?> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 <xsl:stylesheet |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 version="1.0" |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 <xsl:output method="html" encoding="UTF-8"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 <xsl:param name="project-uuid">de3f3307-3429-4ff9-8f43-3fb2fcf21b27</xsl:param> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 <xsl:param name="render-checkboxes" select="true()"/> |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2493
diff
changeset
|
10 <xsl:param name="callback"/> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 |
2912
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
12 <xsl:template match="@*" mode="min"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
13 <xsl:if test="position() = 1"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
14 <xsl:value-of select="number(.)"/> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
15 </xsl:if> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
16 </xsl:template> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
17 |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
18 <xsl:template match="@*" mode="max"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
19 <xsl:if test="position() = last()"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
20 <xsl:value-of select="number(.)"/> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
21 </xsl:if> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
22 </xsl:template> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
23 |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
24 <xsl:variable name="events-min"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
25 <xsl:choose> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
26 <xsl:when test="count(/fixings/events/event/sector) > 0"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
27 <xsl:apply-templates mode="min" select="/fixings/events/event/sector/@from"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
28 <xsl:sort data-type="number" select="."/> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
29 </xsl:apply-templates> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
30 </xsl:when> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
31 <xsl:otherwise> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
32 <xsl:value-of select="number(/fixings/river/@from)"/> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
33 </xsl:otherwise> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
34 </xsl:choose> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
35 </xsl:variable> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
36 |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
37 <xsl:variable name="events-max"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
38 <xsl:choose> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
39 <xsl:when test="count(/fixings/events/event/sector) > 0"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
40 <xsl:apply-templates mode="max" select="/fixings/events/event/sector/@to"> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
41 <xsl:sort data-type="number" select="."/> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
42 </xsl:apply-templates> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
43 </xsl:when> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
44 <xsl:otherwise> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
45 <xsl:value-of select="number(/fixings/river/@to)"/> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
46 </xsl:otherwise> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
47 </xsl:choose> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
48 </xsl:variable> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
49 |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 <xsl:template name="percent"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 <xsl:param name="sector"/> |
2912
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
52 <xsl:variable name="rfrom" select="number($events-min)"/> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
53 <xsl:variable name="rto" select="number($events-max)"/> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 <xsl:variable name="rlength" select="$rto - $rfrom"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 <xsl:variable name="sfrom" select="number($sector/@from)"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 <xsl:variable name="sto" select="number($sector/@to)"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
58 <xsl:variable name="slength" select="$sto - $sfrom"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 <xsl:value-of select="100.0 * ($slength div $rlength)"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 </xsl:template> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 <xsl:template name="emit-gap"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 <xsl:param name="sector"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
64 <xsl:variable name="preds" select="$sector/preceding-sibling::sector"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 <xsl:variable name="num-preds" select="count($preds)"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 <xsl:variable name="glength"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 <xsl:choose> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 <xsl:when test="$num-preds < 1"> |
2912
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
69 <xsl:variable name="rfrom" select="number($events-min)"/> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 <xsl:value-of select="number($sector/@from) - $rfrom"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
71 </xsl:when> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
72 <xsl:otherwise> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
73 <xsl:variable name="bend" select="number($preds[last()]/@to)"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
74 <xsl:value-of select="number($sector/@from) - $bend"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
75 </xsl:otherwise> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
76 </xsl:choose> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
77 </xsl:variable> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 <xsl:choose> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 <xsl:when test="number($glength) < 0.05 "/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
80 <xsl:otherwise> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
81 <div> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
82 <xsl:attribute name="style"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 <xsl:text>width:</xsl:text> |
2912
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
84 <xsl:variable name="rfrom" select="number($events-min)"/> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
85 <xsl:variable name="rto" select="number($events-max)"/> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
86 <xsl:variable name="rlength" select="$rto - $rfrom"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
87 <xsl:value-of select="100.0 * ($glength div $rlength)"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
88 <xsl:text>%;float:left</xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
89 </xsl:attribute> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
90 <xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 </div> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 </xsl:otherwise> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 </xsl:choose> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 </xsl:template> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 <xsl:template match="sector" mode="sectors"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 <xsl:call-template name="emit-gap"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 <xsl:with-param name="sector" select="."/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
99 </xsl:call-template> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 <div> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 <xsl:attribute name="style"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 <xsl:text>background:</xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 <xsl:choose> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 <xsl:when test="@class = '0'">green</xsl:when> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 <xsl:when test="@class = '1'">blue</xsl:when> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 <xsl:when test="@class = '2'">magenta</xsl:when> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
107 <xsl:when test="@class = '3'">red</xsl:when> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
108 <xsl:otherwise>black</xsl:otherwise> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
109 </xsl:choose> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
110 <xsl:text>;width:</xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 <xsl:call-template name="percent"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 <xsl:with-param name="sector" select="."/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
113 </xsl:call-template> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
114 <xsl:text>%</xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
115 <xsl:text>;float:left</xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
116 </xsl:attribute> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
117 <xsl:attribute name="title"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
118 <xsl:text>km </xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
119 <xsl:value-of select="@from"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
120 <xsl:text> - </xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
121 <xsl:value-of select="@to"/> |
2531
180a500d7ddb
Fixing overview: Render the Q class to the title of the sectors of the events.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2530
diff
changeset
|
122 <xsl:choose> |
180a500d7ddb
Fixing overview: Render the Q class to the title of the sectors of the events.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2530
diff
changeset
|
123 <xsl:when test="@class = '0'"> / Q ∈ [0, (MNQ+MQ)/2) </xsl:when> |
180a500d7ddb
Fixing overview: Render the Q class to the title of the sectors of the events.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2530
diff
changeset
|
124 <xsl:when test="@class = '1'"> / Q ∈ [(MNQ+MQ)/2, (MQ+MHQ)/2)</xsl:when> |
180a500d7ddb
Fixing overview: Render the Q class to the title of the sectors of the events.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2530
diff
changeset
|
125 <xsl:when test="@class = '2'"> / Q ∈ [(MQ+MHQ)/2, HQ5)</xsl:when> |
180a500d7ddb
Fixing overview: Render the Q class to the title of the sectors of the events.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2530
diff
changeset
|
126 <xsl:when test="@class = '3'"> / Q ∈ [HQ5, ∞)</xsl:when> |
180a500d7ddb
Fixing overview: Render the Q class to the title of the sectors of the events.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2530
diff
changeset
|
127 </xsl:choose> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
128 </xsl:attribute> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
129 <xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
130 </div> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
131 </xsl:template> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
132 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
133 <xsl:template match="event"> |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2493
diff
changeset
|
134 <tr id="{@cid}"> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
135 <xsl:if test="$render-checkboxes"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
136 <td> |
2900
7715324132bf
Render checked checkboxes in html event overview.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2531
diff
changeset
|
137 <input type="checkbox" name="{$project-uuid}:{@cid}" checked="true" onclick="{$callback}"/> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
138 </td> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
139 </xsl:if> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
140 <td> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
141 <xsl:apply-templates mode="sectors"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
142 </td> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
143 <td align="center"> |
2530
1b6270b00c91
Fixing overview XSLT: Make the description of the event the title of the date column cells.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2505
diff
changeset
|
144 <xsl:attribute name="title"><xsl:value-of select="@description"/></xsl:attribute> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
145 <xsl:value-of select="@date"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
146 </td> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
147 </tr> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
148 </xsl:template> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
149 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
150 <xsl:template match="events"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
151 <table width="95%" border="1" cellspacing="0" cellpadding="0" |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
152 style="font-size: 11pt;font-family:Arial;Verdana,sans-serif"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
153 <colgroup> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
154 <xsl:if test="$render-checkboxes"> |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2493
diff
changeset
|
155 <col width="20px"/> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
156 </xsl:if> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
157 <col width="*"/> |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2493
diff
changeset
|
158 <col width="90px"/> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
159 </colgroup> |
2912
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
160 <tr> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
161 <th>km <xsl:value-of select="$events-min"/> - <xsl:value-of select="$events-max"/></th> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
162 <th>Ereignis</th> |
329db21372ba
FixA: Extent of overview is determined by min/max km of sectors.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2900
diff
changeset
|
163 </tr> |
2493
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
164 <xsl:apply-templates/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
165 </table> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
166 </xsl:template> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
167 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
168 <xsl:template match="/"> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
169 <xsl:apply-templates/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
170 </xsl:template> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
171 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
172 <xsl:template match="text()"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
173 <xsl:template match="text()" mode="sectors"/> |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
174 |
f905c936ffff
Added the XSL transformation to generate the fixings overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
175 </xsl:stylesheet> |