AncestorContext
, AttributeContext
, ChildContext
, DescendantContext
, EvalContext
, InitialContext
, NamespaceContext
, NodeSetContext
, ParentContext
, PrecedingOrFollowingContext
, PredicateContext
, RootContext
, SelfContext
, UnionContext
public interface ExpressionContext
Example:
You can then register this extension function using apublic class MyExtenstionFunctions { public static String objectType(ExpressionContext context){ Object value = context.getContextNodePointer().getValue(); if (value == null){ return "null"; } return value.getClass().getName(); } }
ClassFunctions
object and call it like this:
This expression will find all nodes of the graph that are dates."/descendent-or-self::node()[ns:objectType() = 'java.util.Date']"
Modifier and Type | Method | Description |
---|---|---|
java.util.List |
getContextNodeList() |
Get the current context node list.
|
Pointer |
getContextNodePointer() |
Get the current context node.
|
JXPathContext |
getJXPathContext() |
Get the JXPathContext in which this function is being evaluated.
|
int |
getPosition() |
Returns the current context position.
|
JXPathContext getJXPathContext()
Pointer getContextNodePointer()
java.util.List getContextNodeList()
int getPosition()