Return largest value of the argument's numeric value.
max (nodeset[, nodeset])
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.
There is no max
function in XPath.
Retrieve the year of birth of the youngest patient (aggregate all
/patient/born
nodes and determine the maximum numerical
value):
max(/patient/born)