boolean

The effective boolean value of a sequence

Description

The fn:boolean function calculates the effective boolean value of a sequence. In most cases it is unnecessary to call this function because the effective boolean value is calculated automatically in many expressions, including conditional and logical expressions, where clauses, and predicates.

Parameters

Description

arg:boolean()

Examples

XPath

Results

boolean( () )

false

boolean(‘’)

false

boolean(0)

false

boolean(‘0’)

true

boolean(‘false’)

true

boolean(xs:float(‘NaN’))

false

boolean((false(), false(), false()))

Error FORG0006

boolean($ordDoc/order[1])

true

boolean($ordDoc/noSuchChild)

false

boolean(<a>false</a>)

true

See Also