functx:between-exclusive

Whether a value is between two provided values

Description

The functx:between-exclusive function returns true if the $value is between $minValue and $maxValue, exclusive. If the values are of incomparable types, an error will be raised. If $value is the empty sequence, the function returns false.

Parameters

Description

value:string()

the value to be tested

minValue:string()

the minimum value

maxValue:string()

the maximum value

Examples

XPath

Results

Explanation

functx:between-exclusive(55, 1, 1000)

true

functx:between-exclusive(1, 1, 1000)

false

functx:between-exclusive(1200, 1, 1000)

false

functx:between-exclusive(‘b’, ‘a’, ‘c’)

true

functx:between-exclusive(xs:date(‘2004-10-31’), xs:date(‘2004-10-15’), xs:date(‘2004-11-01’))

true

functx:between-exclusive(‘a’, 1, 1000)

Error

Strings cannot be compared to integers.

See Also