Type: Function

How to get evaluateXPathToBoolean?


import evaluateXPathToBoolean from 'fontoxml-selectors/src/evaluateXPathToBoolean.js'

Evaluate an XQuery script to a boolean (using the effective boolean value property in the XPath 3.1 spec). You can also use functions defined in XQuery modules. Refer to the concept page of XQuery for details. While XQuery update facility is allowed, mutating existing nodes is not allowed. Use the execute-update-script operation to mutate the document using XQUF.


  1. xquery


    The XPath to evaluate

  2. contextNode


    Type: Node | NULL

    The initial context of the query. If context is absent, it is still possible to evaluate some queries, like '1+1', or queries using only variables.

  3. domFacade


    Type: Blueprint

    The blueprint (or blueprint compatible interface) to use for this query.

  4. variables


    Type: Object<String, any>

    Any variables to use for this query. They will be prefixed with a '$' sign

    Default value

  5. options


    Type: Object<String, any>

    See https://github.com/FontoXML/fontoxpath for more info on this parameter.


    Default value


Type: Boolean

The result of the query.