bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Building Queries and Data Views

Logical Operators

XQuery has operators that are specific to logical operations. The following logical operators are available:

- and

- or

and

The result is true if both values are true, and false if one of the values is false.

Data Types

- Parameter1 data type: xs:boolean?

- Parameter2 data type: xs:boolean?

- Returned data type: xs:boolean?

Notes

This is a boolean operator that you can use as a function to return a true or false result.

The arguments and return type are all boolean.

The following table shows how Liquid Data determines the result. The leftmost column contains the possible values of the first parameter; the top row contains the possible values of the second parameter.

XQuery Specification Compliance

- Liquid Data does not support error values.

- Liquid Data does not support a list of nodes as an input parameter to a boolean operator.

Examples

- xf:true() and xf:true() returns the boolean value true.

- xf:true() and xf:false() returns the boolean value false.

- xf:false() and xf:false() returns the boolean value false.

- xf:true() and (<a/>, <b/>) generates a compile-time error because lists are not supported as input parameters to boolean operators.

- xf:false() and "false" generates a compile-time error because the second parameter is not a boolean value.

or

The result is false if both values are false and true if at least one of the values is true. Parameter2 is not evaluated if Parameter1 is true.

Data Types

- Parameter1 data type: xs:boolean?

- Parameter2 data type: xs:boolean?

- Returned data type: xs:boolean?

Notes

This is a boolean operator that you can use as a function to return a true or false result.

The arguments and return type are all boolean.

The following table shows how Liquid Data determines the result. The leftmost column contains the possible values of the first parameter; the top row contains the possible values of the second parameter

XQuery Specification Compliance

- Liquid Data does not support error values.

- Liquid Data does not support a list of nodes as an input parameter to a boolean operator.

Examples

- xf:true() or xf:true() returns the boolean value true.

- xf:true() or xf:false() returns the boolean value true.

- xf:false() or xf:false() returns the boolean value false.

- xf:true() or (<a/>, <b/>) generates a compile-time error because lists are not supported as parameters to boolean operators.

- xf:false() or "false" generates a compile-time error because the second parameter is not a boolean value.