evaluateXPathToString

Type: Function

How to get evaluateXPathToString?

JavaScript

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

Evaluate any XQuery script to the only string of the result, optionally casting if need-be. You can also use functions defined in XQuery modules. Refer to the concept page of XQuery

Arguments

  1. xquery

    (Required)

    The XPath to evaluate

  2. contextNode

    (Required)

    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

    (Required)

    Type: Blueprint

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

  4. variables

    (Required)

    Type: Object<String, any>

    Any variables to use for this query. They will be prefixed with a '$' sign See https://github.com/FontoXML/fontoxpath for more info on this parameter.

    Default value

  5. options

    (Required)

    Type: Object<String, any>

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

    Properties

    Default value

Returns

Type: String

The result of the query.