Public interfaces for XPath expression Abstract Syntax Tree nodes.
Primary external APIs for this XPath AST model.
This XPath API is a compact set of Java interfaces that allow the
in-memory representation and manipulation of XPath 2.0 expressions.The
main idea of this API is to manipulate XPath expressions independently
of their actual underlying representation.
It was designed to fulfill
the following requirements:
- Read/Write: it should be capable of querying/visiting
and modifying the
internal representation of XPath expressions. The expression reading is
performed by using either the visitor pattern or get-like methods.
Similarly, the expression writing is done through a bunch of
set-like methods.
- Round-trip: it should be capable of
getting
string representation of expressions from its internal encoding.
- Application-independent:
it should be suitable to be used by a variety of applications
efficiently. It should provide
solutions to plug in application-dependent features, like
namespace/qname manager and AST generalization and specialisation (see
implementation package).
- Lightweight: it should be compact and therefore should
define a minimal set of Java interfaces in particular by factoring
similar concepts. The best example is the
interface OperatorExpr which allows the representation of more than ten
expression types.
Right now, the XPath API do not provide a standard way to request the
evaluation of expressions. This should be done.