XSLT Function Plus

Computes number1 + number2. Works in decimal arithmetics.

NAMESPACE

xmlns:AS="http://schema.advantages.cz/AsapFunctions"

SYNTAX

decimal Plus(decimal number1, decimal number2)

PARAMETERS

Name Description
number1 Addend
number2 Addend

EXAMPLE

This example show the difference between floating poing and decimal arithmetics addition.
Stylesheet

<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
    xmlns:AS="http://schema.advantages.cz/AsapFunctions" 
    xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="AS date"> 
    <xsl:template match="/"> 
        <ROOT> 
            <xsl:value-of select="0.1+0.1+0.1"/> 
            <xsl:value-of select="AS:Plus(AS:Plus(0.1,0.1),0.1)"/> 
        </ROOT> 
    </xsl:template> 
</xsl:stylesheet>