Mercurial > dive4elements > river
annotate flys-artifacts/contrib/fixoverview2html.xsl @ 3429:3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
flys-artifacts/trunk@5088 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 20 Jul 2012 13:51:36 +0000 |
parents | 5f47e68a1130 |
children | 0568ffd29bb2 |
rev | line source |
---|---|
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 <?xml version="1.0" encoding="UTF-8"?> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 <xsl:stylesheet |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 version="1.0" |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 |
2632
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
6 <xsl:output method="xml" encoding="UTF-8" |
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
7 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" |
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
8 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes"/> |
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
9 |
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
10 <xsl:param name="project-uuid">de3f3307-3429-4ff9-8f43-3fb2fcf21b27</xsl:param> |
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
11 <xsl:param name="render-checkboxes" select="true()"/> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
12 <xsl:param name="callback"/> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
13 |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
14 <xsl:template match="@*" mode="min"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
15 <xsl:if test="position() = 1"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
16 <xsl:value-of select="number(.)"/> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
17 </xsl:if> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
18 </xsl:template> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
19 |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
20 <xsl:template match="@*" mode="max"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
21 <xsl:if test="position() = last()"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
22 <xsl:value-of select="number(.)"/> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
23 </xsl:if> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
24 </xsl:template> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
25 |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
26 <xsl:variable name="global-min"> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
27 <xsl:choose> |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
28 <xsl:when test="count(/fixings/events/event) > 0"> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
29 <xsl:apply-templates mode="min" select="/fixings/events/event/sector/@from"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
30 <xsl:sort data-type="number" select="."/> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
31 </xsl:apply-templates> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
32 </xsl:when> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
33 <xsl:otherwise> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
34 <xsl:value-of select="number(/fixings/river/@from)"/> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
35 </xsl:otherwise> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
36 </xsl:choose> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
37 </xsl:variable> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
38 |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
39 <xsl:variable name="global-max"> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
40 <xsl:choose> |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
41 <xsl:when test="count(/fixings/events/event) > 0"> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
42 <xsl:apply-templates mode="max" select="/fixings/events/event/sector/@to"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
43 <xsl:sort data-type="number" select="."/> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
44 </xsl:apply-templates> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
45 </xsl:when> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
46 <xsl:otherwise> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
47 <xsl:value-of select="number(/fixings/river/@to)"/> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
48 </xsl:otherwise> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
49 </xsl:choose> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
50 </xsl:variable> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 <xsl:template name="percent"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 <xsl:param name="sector"/> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
55 <xsl:variable name="start"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
56 <xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
57 <xsl:when test="number($sector/@from) < $global-min"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
58 <xsl:value-of select="$global-min"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
59 </xsl:when> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
60 <xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
61 <xsl:value-of select="number($sector/@from)"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
62 </xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
63 </xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
64 </xsl:variable> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
65 |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
66 <xsl:variable name="end"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
67 <xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
68 <xsl:when test="number($sector/@to) > $global-max"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
69 <xsl:value-of select="$global-max"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
70 </xsl:when> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
71 <xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
72 <xsl:value-of select="number($sector/@to)"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
73 </xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
74 </xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
75 </xsl:variable> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
76 |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
77 <xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
78 <xsl:when test="$end < $start"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
79 <xsl:value-of select="number(0)"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
80 </xsl:when> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
81 <xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
82 <xsl:value-of select="100.0 * (($end - $start) div ($global-max - $global-min))"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
83 </xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
84 </xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
85 </xsl:template> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
86 |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
87 <xsl:template name="emit-gap-gauge"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
88 <xsl:param name="gauge"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
89 <xsl:call-template name="internal-emit-gap"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
90 <xsl:with-param name="sector" select="$gauge"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
91 <xsl:with-param name="preds" select="$gauge/preceding-sibling::gauge"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
92 </xsl:call-template> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 </xsl:template> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 <xsl:template name="emit-gap"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 <xsl:param name="sector"/> |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
97 <xsl:call-template name="internal-emit-gap"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
98 <xsl:with-param name="sector" select="$sector"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
99 <xsl:with-param name="preds" select="$sector/preceding-sibling::sector"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
100 </xsl:call-template> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
101 </xsl:template> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
102 |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
103 <xsl:template name="internal-emit-gap"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
104 <xsl:param name="sector"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
105 <xsl:param name="preds"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
106 |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
107 <xsl:variable name="start"> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
108 <xsl:choose> |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
109 <xsl:when test="number($sector/@from) < $global-min"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
110 <xsl:value-of select="$global-min"/> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 </xsl:when> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 <xsl:otherwise> |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
113 <xsl:value-of select="$sector/@from"/> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
114 </xsl:otherwise> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
115 </xsl:choose> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
116 </xsl:variable> |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
117 |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
118 <xsl:if test="$start < $global-max"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
119 <xsl:variable name="num-preds" select="count($preds)"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
120 <xsl:variable name="prev-end"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
121 <xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
122 <xsl:when test="count($preds) < 1"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
123 <xsl:value-of select="$global-min"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
124 </xsl:when> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
125 <xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
126 <xsl:value-of select="number($preds[last()]/@to)"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
127 </xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
128 </xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
129 </xsl:variable> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
130 |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
131 <xsl:if test="$prev-end < $global-max"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
132 <xsl:variable name="gap-len" select="$start - $prev-end"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
133 <xsl:if test="$gap-len > 0.005"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
134 <div> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
135 <xsl:attribute name="style"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
136 <xsl:text>width:</xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
137 <xsl:value-of select="100.0 * ($gap-len div ($global-max - $global-min))"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
138 <xsl:text>%;float:left</xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
139 </xsl:attribute> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
140 <xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
141 </div> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
142 </xsl:if> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
143 </xsl:if> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
144 </xsl:if> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
145 </xsl:template> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
146 |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
147 <xsl:template match="sector" mode="sectors"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
148 <xsl:call-template name="emit-gap"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
149 <xsl:with-param name="sector" select="."/> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
150 </xsl:call-template> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
151 <div> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
152 <xsl:attribute name="style"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
153 <xsl:text>background:</xsl:text> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
154 <xsl:choose> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
155 <xsl:when test="@class = '0'">green</xsl:when> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
156 <xsl:when test="@class = '1'">blue</xsl:when> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
157 <xsl:when test="@class = '2'">magenta</xsl:when> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
158 <xsl:when test="@class = '3'">red</xsl:when> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
159 <xsl:otherwise>black</xsl:otherwise> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
160 </xsl:choose> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
161 <xsl:text>;width:</xsl:text> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
162 <xsl:call-template name="percent"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
163 <xsl:with-param name="sector" select="."/> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
164 </xsl:call-template> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
165 <xsl:text>%</xsl:text> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
166 <xsl:text>;float:left</xsl:text> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
167 </xsl:attribute> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
168 <xsl:attribute name="title"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
169 <xsl:text>km </xsl:text> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
170 <xsl:value-of select="@from"/> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
171 <xsl:text> - </xsl:text> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
172 <xsl:value-of select="@to"/> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
173 <xsl:choose> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
174 <xsl:when test="@class = '0'"> / Q um MNQ</xsl:when> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
175 <xsl:when test="@class = '1'"> / Q um MQ</xsl:when> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
176 <xsl:when test="@class = '2'"> / Q um MHQ</xsl:when> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
177 <xsl:when test="@class = '3'"> / Q über HQ5</xsl:when> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
178 </xsl:choose> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
179 </xsl:attribute> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
180 <xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
181 </div> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
182 </xsl:template> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
183 |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
184 <xsl:template match="event"> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
185 <tr id="{@cid}"> |
2632
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
186 <xsl:if test="$render-checkboxes"> |
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
187 <td> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
188 <input type="checkbox" name="{$project-uuid}:{@cid}" checked="true" onclick="{$callback}"/> |
2632
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
189 </td> |
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
190 </xsl:if> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
191 <td> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
192 <xsl:apply-templates mode="sectors"/> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
193 </td> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
194 <td align="center"> |
2707
d6e32ae72da6
Deliver description on events instead of names in fixing overview.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2632
diff
changeset
|
195 <xsl:attribute name="title"><xsl:value-of select="@description"/></xsl:attribute> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
196 <xsl:value-of select="@date"/> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
197 </td> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
198 </tr> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
199 </xsl:template> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
200 |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
201 <xsl:template match="gauge" mode="gauges"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
202 <xsl:call-template name="emit-gap-gauge"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
203 <xsl:with-param name="gauge" select="."/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
204 </xsl:call-template> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
205 <div> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
206 <xsl:attribute name="style"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
207 <xsl:text>overflow:hidden;background:</xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
208 <xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
209 <xsl:when test="(count(preceding::*) mod 2) = 0">#ada96e</xsl:when> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
210 <xsl:otherwise>gray</xsl:otherwise> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
211 </xsl:choose> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
212 <xsl:text>;width:</xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
213 <xsl:call-template name="percent"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
214 <xsl:with-param name="sector" select="."/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
215 </xsl:call-template> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
216 <xsl:text>%</xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
217 <xsl:text>;float:left</xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
218 </xsl:attribute> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
219 <xsl:attribute name="title"> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
220 <xsl:value-of select="@name"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
221 <xsl:text>: km </xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
222 <xsl:value-of select="@from"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
223 <xsl:text> - </xsl:text> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
224 <xsl:value-of select="@to"/> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
225 </xsl:attribute> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
226 <nobr><xsl:value-of select="@name"/></nobr> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
227 </div> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
228 </xsl:template> |
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
229 |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
230 <xsl:template match="events"> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
231 <table width="97%" border="1" cellspacing="0" cellpadding="0" |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
232 style="font-size: 10pt;font-family:Arial;Verdana,sans-serif"> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
233 <colgroup> |
2632
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
234 <xsl:if test="$render-checkboxes"> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
235 <col width="20px"/> |
2632
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
236 </xsl:if> |
7d163c2c6e6d
Improve XSL transformation for fixings overview output.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2565
diff
changeset
|
237 <col width="*"/> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
238 <col width="75px"/> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
239 </colgroup> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
240 <tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
241 <xsl:if test="$render-checkboxes"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
242 <th> </th> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
243 </xsl:if> |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
244 <th><xsl:apply-templates mode="gauges" select="/fixings/gauges"/></th> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
245 <th>Ereignis</th> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
246 </tr> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
247 <xsl:apply-templates/> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
248 </table> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
249 </xsl:template> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
250 |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
251 <xsl:template match="/"> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
252 <html> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
253 <head> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
254 <title>Fixierungen:</title> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
255 </head> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
256 <body> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
257 <xsl:apply-templates/> |
3427
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
258 <hr/> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
259 <table border="1" cellspacing="0" cellpadding="0"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
260 <caption>Legende</caption> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
261 <tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
262 <th>Farbe</th> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
263 <th colspan="2">Bedeutung</th> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
264 </tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
265 <xsl:if test="count(/fixings/events/event/sector[@class = '0']) > 0"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
266 <tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
267 <td style="background: green"> </td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
268 <td>um MNQ</td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
269 <td>Q ∈ [0, (MNQ+MQ)/2)</td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
270 </tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
271 </xsl:if> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
272 <xsl:if test="count(/fixings/events/event/sector[@class = '1']) > 0"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
273 <tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
274 <td style="background: blue"> </td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
275 <td>um MQ</td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
276 <td>Q ∈ [(MNQ+MQ)/2, (MQ+MHQ)/2)</td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
277 </tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
278 </xsl:if> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
279 <xsl:if test="count(/fixings/events/event/sector[@class = '2']) > 0"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
280 <tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
281 <td style="background: magenta"> </td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
282 <td>um MHQ</td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
283 <td>Q ∈ [(MQ+MHQ)/2, HQ5)</td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
284 </tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
285 </xsl:if> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
286 <xsl:if test="count(/fixings/events/event/sector[@class = '3']) > 0"> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
287 <tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
288 <td style="background: red"> </td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
289 <td>über HQ5</td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
290 <td>Q ∈ [HQ5, ∞)</td> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
291 </tr> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
292 </xsl:if> |
5f47e68a1130
FixA: Bring XSLT in sync with flys-client to ease development.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2707
diff
changeset
|
293 </table> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
294 </body> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
295 </html> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
296 </xsl:template> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
297 |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
298 <xsl:template match="text()"/> |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
299 <xsl:template match="text()" mode="sectors"/> |
3429
3353672f9ba2
FixA: XSL overview transform renders the names of the gauges into the head line.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3427
diff
changeset
|
300 <xsl:template match="text()" mode="gauges"/> |
2565
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
301 |
72f77b2210c2
FixingsOverview: Added XSL transformation which directly converts the output of the fixings overview service into an HTML representation.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
302 </xsl:stylesheet> |