# fn:boolean

fn:boolean(item* $srcval) → boolean

Function signature

$srcval | item() *
Result | xs:boolean

Obtains the effective boolean value of the supplied argument. The result is true if the argument value is a sequence starting with a node, or the singleton boolean true(), a singleton non-zero number, or a singleton non-zero-length string (or untypedAtomic). The result is false if the argument is an empty sequence, the singleton boolean false, a singleton number zero or NaN, or a singleton zero-length string (or untypedAtomic). In all other cases the result is an error.

XPath 2.0 Specification

Next