Building Queries and Data Views
|
Boolean Functions
Boolean functions return true (1) or false(0) values. The following boolean functions are available:
xf:false
Returns the boolean value false.
Data Types
- Input data type: No input data required.
- Returned data type: xs:boolean
XQuery Specification Compliance
Conforms to the current specification.
Examples
- xf:false() returns false.
- xf:false(34) generates a compile-time error because the function does not accept any parameters.
xf:not
Returns true if the value of the source value is false and false if the value of the source value is true.
Data Types
- Input data type: xs:boolean?
- Returned data type: xs:boolean?
XQuery Specification Compliance
- Liquid Data accepts an optional boolean value instead of a sequence as input.
- Liquid Data returns a true value if the input is an empty list.
- Liquid Data returns an optional boolean value instead of one boolean value.
Examples
- xf:not(xf:false()) returns the boolean value true.
- xf:not(xf:true()) returns the boolean value false.
- xf:not(32) generates a compile-time error because the input value is not boolean.
- xf:not(()) returns the boolean value true.
xf:true
Returns the boolean value true.
Data Types
- Input data type: No input data required.
- Returned data type: xs:boolean
XQuery Specification Compliance
Conforms to the current specification.
Examples
- xf:true() returns true.
- xf:true("34") generates a compile-time error because the function does not accept any parameters.