comparison flys-artifacts/contrib/fixoverview2html.xsl @ 3433:c3fb41e73ffb

FixA: Overview: Clip the displayed from/to ranges of the gauges to the max extent of the events. flys-artifacts/trunk@5094 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sat, 21 Jul 2012 17:59:13 +0000
parents 9c39a25aa849
children
comparison
equal deleted inserted replaced
3432:9c39a25aa849 3433:c3fb41e73ffb
274 <xsl:template match="gauge" mode="gauges"> 274 <xsl:template match="gauge" mode="gauges">
275 <xsl:call-template name="emit-gap-gauge"> 275 <xsl:call-template name="emit-gap-gauge">
276 <xsl:with-param name="gauge" select="."/> 276 <xsl:with-param name="gauge" select="."/>
277 </xsl:call-template> 277 </xsl:call-template>
278 <div> 278 <div>
279 <xsl:variable name="start">
280 <xsl:choose>
281 <xsl:when test="number(@from) &lt; $global-min">
282 <xsl:value-of select="$global-min"/>
283 </xsl:when>
284 <xsl:otherwise>
285 <xsl:value-of select="number(@from)"/>
286 </xsl:otherwise>
287 </xsl:choose>
288 </xsl:variable>
289
290 <xsl:variable name="end">
291 <xsl:choose>
292 <xsl:when test="number(@to) &gt; $global-max">
293 <xsl:value-of select="$global-max"/>
294 </xsl:when>
295 <xsl:otherwise>
296 <xsl:value-of select="number(@to)"/>
297 </xsl:otherwise>
298 </xsl:choose>
299 </xsl:variable>
300
279 <xsl:attribute name="style"> 301 <xsl:attribute name="style">
280 <xsl:text>overflow:hidden;background:</xsl:text> 302 <xsl:text>overflow:hidden;background:</xsl:text>
281 <xsl:choose> 303 <xsl:choose>
282 <xsl:when test="(count(preceding::*) mod 2) = 0">#ada96e</xsl:when> 304 <xsl:when test="(count(preceding::*) mod 2) = 0">#ada96e</xsl:when>
283 <xsl:otherwise>silver</xsl:otherwise> 305 <xsl:otherwise>silver</xsl:otherwise>
284 </xsl:choose> 306 </xsl:choose>
285 <xsl:text>;width:</xsl:text> 307 <xsl:text>;width:</xsl:text>
286 <xsl:call-template name="percent"> 308 <xsl:call-template name="percent">
287 <xsl:with-param name="sector" select="."/> 309 <xsl:with-param name="sector" select="."/>
290 <xsl:text>;float:left</xsl:text> 312 <xsl:text>;float:left</xsl:text>
291 </xsl:attribute> 313 </xsl:attribute>
292 <xsl:attribute name="title"> 314 <xsl:attribute name="title">
293 <xsl:value-of select="@name"/> 315 <xsl:value-of select="@name"/>
294 <xsl:text>: km </xsl:text> 316 <xsl:text>: km </xsl:text>
295 <xsl:value-of select="format-number(@from, $km-pattern, $locale)"/> 317 <xsl:value-of select="format-number($start, $km-pattern, $locale)"/>
296 <xsl:text> - </xsl:text> 318 <xsl:text> - </xsl:text>
297 <xsl:value-of select="format-number(@to, $km-pattern, $locale)"/> 319 <xsl:value-of select="format-number($end, $km-pattern, $locale)"/>
298 </xsl:attribute> 320 </xsl:attribute>
299 <nobr><xsl:value-of select="@name"/></nobr> 321 <nobr><xsl:value-of select="@name"/></nobr>
300 </div> 322 </div>
301 </xsl:template> 323 </xsl:template>
302 324

http://dive4elements.wald.intevation.org