Share via


boolean Function (Compact 2013)

3/26/2014

Converts the argument to a Boolean.

Syntax

boolean boolean(object)

Parameters

  • object
    Object to be converted to a Boolean.

Return Value

Converts its argument to a Boolean as shown in the following list:

A number is True if and only if it is neither a positive or negative zero, nor NaN.

  • A node-set is True if and only if it is non-empty.
  • A string is True if and only if its length is non-zero.
  • An object of a type other than the four basic XPath types (node set, Boolean, number, and string) is converted to a Boolean in a way that is dependent on that type.

See Also

Reference

XPath Boolean Functions