EXSLT - dyn:min - Version 1

Version: 1
Status: new
User Page: index.html
XML Definition: dyn.min.xml
Function Package: dyn.min.zip

Function Syntax

number dyn:min(node-set, string)

The dyn:min function calculates the minimum value for the nodes passed as the first argument, where the value of each node is calculated dynamically using an XPath expression passed as a string as the second argument.

The expressions are evaluated relative to the nodes passed as the first argument. In other words, the value for each node is calculated by evaluating the XPath expression with all context information being the same as that for the call to the dyn:min function itself, except for the following:

  • the context node is the node whose value is being calculated
  • the context position is the position of the node within the node set passed as the first argument to the dyn:min function, arranged in document order
  • the context size is the number of nodes passed as the first argument to the dyn:min function

The dyn:min function returns the minimum of these values, calculated in exactly the same way as for math:min.

If the expression string passed as the second argument is an invalid XPath expression (including an empty string), this function returns NaN.

This function must take a second argument. To calculate the minimum of a set of nodes based on their string values, you should use the math:min function.

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

Implementations

No XSLT processors that we know of have built-in support for dyn:min.

There are currently no third-party implementations of dyn:min.

Change History

Submitted: 2001-11-25
Creator: Jeni Tennison(http://www.jenitennison.com)

Returns the minimum value from a set of nodes, when that value is calculated dynamically based on an XPath expression.

http://www.exslt.org/dyn/functions/min/dyn.min.1.html last modified 2001-11-25