The max() Function
Release 2.0 - ...
Syntax
Copy Code | |
---|---|
number min(node-set) |
Description
Function max() returns the maximum value of the result of converting the string-values of each node in the argument node-set to a number. "Maximum" is determined with the > operator. If the parameter is an empty node-set, or if any of the nodes evaluate to NaN, the return value is NaN.
Example
XML | Copy Code |
---|---|
<xforms:model> <xforms:instance xmlns:ex="http://example.org">> <ex:root> <ex:value>2</ex:value> <ex:value>6</ex:value> </ex:root> </xforms:instance> </xforms:model> ... <xforms:group> <xforms:output value="max(ex:value)"> <xforms:label>Maximum : </xforms:label> </xforms:output> </xforms:group> |
The above example will return 6.
Specification
Link to the XForms specification: the max() function.