diff options
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/commonTemplates.xsl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xslt/commonTemplates.xsl b/xslt/commonTemplates.xsl index cd4ee993e..ba649970a 100644 --- a/xslt/commonTemplates.xsl +++ b/xslt/commonTemplates.xsl @@ -112,9 +112,16 @@ <xsl:variable name="value" select="substring-before($values[1], ' ')"/> <xsl:choose> + + <!-- No input --> + <xsl:when test="count($values) = 0"/> + + <!-- Handling last value --> <xsl:when test="count($values) = 1"> <xsl:value-of select="format-number($value + $sum, '#.#')"/> </xsl:when> + + <!-- More than one value to sum --> <xsl:otherwise> <xsl:call-template name="sum"> <xsl:with-param name="values" select="$values[position() > 1]"/> |