Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

fn:max

Return object with maximum value from item sequence.


Syntax

fn:max(sequence $sequence) => anySimpleType?
fn:max(sequence $sequence, string $collation) => anySimpleType?

Top of page

Description

This aggregate function returns the maximum value of all values in a sequence that are of a single type or one of its subtypes, for which the gt operator is defined. For numeric values type promotion is used to coerce all values to a single common type. If the argument is the empty sequence, the function returns the empty sequence.

Top of page

Argument

$sequence

a sequence of items

$collation

optional valid collation string literal

$flags

modifiers for patternmatching

Top of page

Example

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page