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.

boolean($arg as item()*) ➔ xs:boolean

Arguments

 

$arg

item()*

The sequence whose effective boolean value is required

Result

xs:boolean

Links to W3C specifications

Namespace: http://www.w3.org/2005/xpath-functions

Applies to: XPath 2.0, XSLT 2.0, XQuery 1.0 and later versions

XPath 2.0 Functions and Operators

XPath 3.0 Functions and Operators

Notes on the Saxon implementation

The function is fully implemented according to the W3C specifications.