if (ctx instanceof JexlContext) {
jexlCtx = (JexlContext) ctx;
} else {
throw new SCXMLExpressionException(ERR_CTX_TYPE);
}
Expression exp = null;
try {
final JexlContext effective = getEffectiveContext(jexlCtx);
effective.setEvaluatingLocation(true);
exp = getJexlEngine().createExpression(expr);
return (Node) exp.evaluate(effective);
} catch (Exception e) {
String exMessage = e.getMessage() != null ? e.getMessage() : e.getClass().getCanonicalName();
throw new SCXMLExpressionException("evalLocation('" + expr + "'): " + exMessage, e);
}
}