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.
Arguments and Return Type| Name | Type | Description |
$value |
xs:anyAtomicType? |
the value to be tested |
$minValue |
xs:anyAtomicType |
the minimum value |
$maxValue |
xs:anyAtomicType |
the maximum value |
| return value |
xs:boolean |
XQuery Function Declaration| See XSLT definition. | | XQuery Syntax for January 2007 (1.0): |
|---|
declare namespace functx = "http://www.functx.com";
declare function functx:between-exclusive
( $value as xs:anyAtomicType? ,
$minValue as xs:anyAtomicType ,
$maxValue as xs:anyAtomicType ) as xs:boolean {
$value > $minValue and $value < $maxValue
} ; | | XQuery Syntax for July 2004 - November 2005 (CR): |
|---|
declare namespace functx = "http://www.functx.com";
declare function functx:between-exclusive
( $value as xdt:anyAtomicType? ,
$minValue as xdt:anyAtomicType ,
$maxValue as xdt:anyAtomicType ) as xs:boolean {
$value > $minValue and $value < $maxValue
} ; | | XQuery Syntax for May 2003: |
|---|
declare namespace functx = "http://www.functx.com"
define function between-exclusive
( $value as xdt:anyAtomicType? ,
$minValue as xdt:anyAtomicType ,
$maxValue as xdt:anyAtomicType ) as xs:boolean {
$value > $minValue and $value < $maxValue
} |
Examples| XQuery Example | 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 AlsoHistory |
|