.. _boolean: ======= 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. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - arg:boolean() - Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **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(false) - true See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`true`. * :ref:`false`. * :ref:`not`. * :ref:`exists`. * :ref:`empty`.