Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

fn:boolean

Compute effective Boolean value of a sequence of items.


Syntax

fn:boolean(item* $srcval) => boolean

Top of page

Description

This function returns the effective Boolean value of a sequence of items. If the sequence is empty, the function returns "false". If $srcval is an atomic value, this function returns the same value as the constructor function xs:boolean. In the following cases the function returns "false":

Top of page

Argument

$srcval

any item

Top of page

Example

boolean(24-24)
boolean("24-24")

The first query returns "false", since the argument is a numerical expression that evaluates to zero. In the second query the argument is a non-empty string value, and therefore the function returns "true".

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page