EXSLT - math:max - Developer Page

Version: 1
Status: new
Function Package: math.max.zip

Function Syntax

number math:max(node-set)

Template Syntax

<xsl:call-template name="math:max">
   <xsl:with-param name="nodes" select="node-set" />
</xsl:call-template>

The math:max function returns the maximum, for each node in the argument node-set, of the result of converting the string-values of the node to a number using the number function. The numbers are compared as with the > operator. If the node set is empty, NaN is returned.

The math:max template returns a result tree fragment whose string value is the result of turning the number returned by the function into a string.

An implementation of this extension function in the EXSLT math namespace must conform to the behaviour described in this document.

Implementations

The following implementations of math:max are available:

LanguageImplemented VersionCreatorDateDownload
EXSLT Function1math.max.function.xsl
XSLT Template1math.max.template.xsl

Use Cases

Use Case Package: math.max.use-cases.zip

The following use cases illustrate the functionality of math:max.

DetailsCalling StylesheetXML DataExpected ResultCategoryTemplate
1math.max.1.xslmath.max.data.1.xmlmath.max.result.1.xmlexampleN
2math.max.2.xslmath.max.data.1.xmlmath.max.result.1.xmlexampleY
3math.max.1.xslmath.max.data.2.xmlmath.max.result.2.xmlboundaryN
4math.max.2.xslmath.max.data.2.xmlmath.max.result.2.xmlboundaryY
5math.max.3.xslmath.max.data.1.xml-errorN
6math.max.4.xslmath.max.data.1.xml-errorY

Change History

Submitted: 2001-03-28
Creator: Jeni Tennison(http://www.jenitennison.com)

Returns the maximum value from a node-set.

Copyright

http://www.exslt.org/math.max.html last modified 2001-03-28