Tamino XML Server Version 9.7
 —  X-Query Reference Guide  —

max

Return largest value of the argument's numeric value.


Syntax

max (nodeset[, nodeset])

Top of page

Description

This function returns the maximum numeric value of the nodes of one or more node sets. If you specify a node set that contains more than one node, all nodes of the set are taken for evaluation.

If necessary, node values are converted to numerical values. If a node value cannot be converted, then NaN is used. This function returns NaN, if at least one argument is NaN.

Top of page

Compatibility

There is no max function in XPath.

Top of page

Example

Retrieve the year of birth of the youngest patient (aggregate all /patient/born nodes and determine the maximum numerical value):

max(/patient/born)

Top of page