EXSLT - Math

Implementer Page: math.html
Module Package: math.zip

EXSLT - Math covers extension elements and functions that provide facilities to do with maths.

XSLT processors may support any number of the extension elements and functions given in this module.

Using EXSLT will only make your stylesheet portable amongst the implementations that support EXSLT. Note that there is no requirement for XSLT processors that are compliant to XSLT to support the extensions described within EXSLT.


The namespace for EXSLT - Math is:


Throughout this document, the prefix math is used to refer to this namespace. Any other prefix can be used within a particular stylesheet (though a prefix must be specified to enable the extension functions to be recognised as extensions).

To use these extensions, you need to declare this namespace as an extension namespace in your stylesheet. If your processor supports this module, then that's all you need to do, but if it doesn't, then you need to use a specific third-party implementation or the module stylesheet. Typically, your stylesheet will look like:

<xsl:stylesheet version="1.0"

<xsl:import href="math.xsl" />



Core Functions

The following extension functions are considered stable and are core to EXSLT - Math. Processors that claim support of EXSLT - Math support these functions.

math:minnumber math:min(node-set)math.min.zip
math:maxnumber math:max(node-set)math.max.zip
math:highestnode-set math:highest(node-set)math.highest.zip
math:lowestnode-set math:lowest(node-set)math.lowest.zip

Other Functions

The following extension functions are not considered stable and are not part of the core of EXSLT - Math. Processors that claim support of EXSLT - Math might not support these functions.

math:absnumber math:abs(number)math.abs.zip
math:sqrtnumber math:sqrt(number)math.sqrt.zip
math:powernumber math:power(number, number)math.power.zip
math:constantnumber math:constant(string, number)math.constant.zip
math:lognumber math:log(number)math.log.zip
math:randomnumber math:random()math.random.zip
math:sinnumber math:sin(number)math.sin.zip
math:cosnumber math:cos(number)math.cos.zip
math:tannumber math:tan(number)math.tan.zip
math:asinnumber math:asin(number)math.asin.zip
math:acosnumber math:acos(number)math.acos.zip
math:atannumber math:atan(number)math.atan.zip
math:atan2number math:atan2(number, number)math.atan2.zip
math:expnumber math:exp(number)math.exp.zip

http://www.exslt.org/math/index.html last modified 2001-05-22