use of org.openforis.idm.model.expression.internal.ModelJXPathContext in project collect by openforis.
the class AbstractExpression method createJXPathContext.
/**
* Creates a new JXPath context in order to evaluate the expression
*/
private JXPathContext createJXPathContext(Node<?> contextNode, Node<?> thisNode) {
ModelJXPathContext jxPathContext = ModelJXPathContext.newContext(this.jxPathContext, contextNode);
Variables variables = jxPathContext.getVariables();
variables.declareVariable(CONTEXT_NODE_VARIABLE_NAME, contextNode);
if (thisNode != null) {
variables.declareVariable(THIS_VARIABLE_NAME, thisNode);
}
return jxPathContext;
}
Aggregations