1.1 --- a/vstup/makra/měřák.xsl Sat Jan 14 17:56:59 2012 +0100
1.2 +++ b/vstup/makra/měřák.xsl Sat Jan 14 19:10:26 2012 +0100
1.3 @@ -10,18 +10,18 @@
1.4 xmlns:svg="http://www.w3.org/2000/svg"
1.5 xmlns:xs="http://www.w3.org/2001/XMLSchema"
1.6 exclude-result-prefixes="fn h s k m xs">
1.7 -
1.8 - <!-- Ukázka vlastního „makra“: -->
1.9 - <xsl:template match="m:měřák">
1.10 - <xsl:variable name="hodnota" select="number(@hodnota)"/>
1.11 - <xsl:variable name="šířkaGrafu" select="128"/>
1.12 - <xsl:choose>
1.13 - <xsl:when test="$hodnota >= 0 and $hodnota <= 100">
1.14 - <div style="border: 1px solid black; width: {$šířkaGrafu}px; height: 16px; padding: 0px; text-align: center; background-color: #cfc;">
1.15 +
1.16 + <!-- Ukázka vlastního „makra“: -->
1.17 + <xsl:template match="m:měřák">
1.18 + <xsl:variable name="hodnota" select="number(@hodnota)"/>
1.19 + <xsl:variable name="šířkaGrafu" select="128"/>
1.20 + <xsl:choose>
1.21 + <xsl:when test="$hodnota >= 0 and $hodnota <= 100">
1.22 + <div style="border: 1px solid black; width: {$šířkaGrafu}px; height: 16px; padding: 0px; text-align: center; background-color: #cfc;">
1.23 <div style="margin: 0px; background-color: #A4E666; width: {@hodnota*$šířkaGrafu div 100}px; height: 16px;"><xsl:call-template name="varováníRetardace"/></div>
1.24 <p style="margin: 0px; font-size: 12px; position: relative; top: -15px;">
1.25 <xsl:value-of select="@hodnota"/>/100
1.26 - </p>
1.27 + </p>
1.28 </div>
1.29 </xsl:when>
1.30 <xsl:otherwise>
1.31 @@ -30,4 +30,4 @@
1.32 </xsl:choose>
1.33 </xsl:template>
1.34
1.35 -</xsl:stylesheet>
1.36 \ No newline at end of file
1.37 +</xsl:stylesheet>