EXSLT - math:min - Developer Page

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

Function Syntax

number math:min(node-set)

Template Syntax

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

The math:min function returns the minimum, 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:min 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:min are available:

LanguageImplemented VersionCreatorDateDownload
EXSLT Function1math.min.function.xsl
XSLT Template1math.min.template.xsl
Javascript1math.min.js

Use Cases

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

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

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

Change History

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

Returns the minimum value from a node-set.

Copyright

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