functx:max-string

The maximum of a sequence of values, treating them like strings

Description

The functx:max-string function returns the maximum of the values in $strings. It differs from the built-in fn:max function only in treats values of all types like strings. The built-in fn:max function, by contrast, treats untyped and numeric values like numbers (and an error is raised if they are not numbers).

Parameters

Description

strings:string()

the sequence of values

Examples

XPath

Results

Explanation

functx:max-string( $in-xml/* )

c

Calling the fn:max function instead would have raised an error.

functx:max-string( (100,25,3) )

3

XPath

Results

functx:max-string( $in-xml/* )

c

functx:max-string( (100,25,3) )

3

See Also