math:max()

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.

Syntax

math:max(nodeSet)

Parameters

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

Returns

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

Specifications

EXSLT - MATH:MAX

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
math:max()Chrome ? Edge ? Firefox Full support 3IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android Full support 4Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown