XPathPathExpr class final
A location path such as /data/age or ../name[1].
- Inheritance
-
- Object
- XPathExpression
- XPathPathExpr
Constructors
-
XPathPathExpr(PathStart start, List<
XPathStep> steps) - Creates a path starting at the root or the context node.
-
XPathPathExpr.fromFilter(XPathFilterExpr filterExpr, List<
XPathStep> steps) -
Creates a path starting at the result of
filterExpr. - XPathPathExpr.fromRef(TreeReference ref)
-
The relative or absolute path for
ref, with plain child steps.factory
Properties
- filterExpr → XPathFilterExpr?
-
The starting expression when start is PathStart.expression.
final
- hashCode → int
-
Hash of toString, as in JavaRosa.
no setterinherited
- isIdempotent → bool
-
Whether evaluating this expression twice in the same form state always
gives the same result (used to cache predicate results).
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → PathStart
-
Where the path starts.
final
-
steps
→ List<
XPathStep> -
The steps, in order.
final
Methods
-
containsFunc(
String name) → bool -
Whether this expression calls the function named
nameanywhere.override -
eval(
DataInstance? model, EvaluationContext context) → XPathNodeset -
The nodeset this path selects: the path is anchored to the context
node (or, for
current(), the original context), expanded with predicates, and non-relevant nodes are dropped.override -
evalIn(
EvaluationContext context) → Object -
Evaluates against
context's main instance.inherited -
matches(
XPathExpression other) → bool -
Like
==, but a named step also matches a wildcard (*) step. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pivot(
DataInstance? model, EvaluationContext context, List< Object> pivots, Object sentinel) → Object? -
.or the node itself is the sentinel; paths with predicates can't be pivoted; other paths evaluate normally.override -
toString(
) → String -
A string representation of this object.
override
-
toTreeReference(
) → TreeReference - This path as a TreeReference.
Operators
-
operator ==(
Object other) → bool -
Structural equality, matching JavaRosa's
equals.inherited