Visit Mozilla.org

EXSLT:math:max

From MDC

XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes

This article covers features introduced in Firefox 3

Contents


math:max() returns the maximum value of a node-set.

To compute the maximum value of the node-set, the node set is sorted into descending order as it would be using xsl:sort() with a data type of number. The maximum value is then the first node in the sorted list, converted into a number.

Note: If the node-set is empty or the result of converting any of its string values to numbers is NaN, this function returns NaN.

[edit] Syntax

math:max(nodeSet)

[edit] Arguments

nodeSet
The node-set whose highest value is to be returned.

[edit] Returns

A result tree fragment representing the highest valued node's numeric value as a string.

[edit] Defined

EXSLT - MATH:MAX

[edit] Gecko support

Supported in Gecko 1.9 and later.