The max() function returns the maximum value in a sequence. The input sequence may contain any items that can be compared using the «lt » and «gt » operators. Untyped values are compared as numbers . For example, «max((3, 4, 5)) » returns 5 .
Argument | Data Type | Meaning |
---|---|---|
sequence | xdt:anyAtomicType* | The input sequence |
Collation (optional) | xs:string | Collation used for comparing strings |
Result | xdt:anyAtomicType? | The maximum value found in the input sequence |