Skip to main content

Module eval

Module eval 

Source
Expand description

XPath AST evaluation phase.

This module provides the eval_node() function which evaluates a bound XPath AST at runtime. The AST must be bound using bind_node() before evaluation.

§Supported Node Types

Currently implemented:

  • Value - Literal values (string, integer, double, boolean, empty)
  • ContextItem - Context item reference (.)
  • VarRef - Variable references
  • Expr - Sequence expressions
  • If - Conditional expressions
  • FunctionCall - Function calls (dispatched via eval_function)

Other node types return not_implemented errors for now.

Functions§

eval_node
Evaluate an AST node and return the result.