public void execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body) throws TemplateException, IOException {
TemplateStackModel contextStack = (TemplateStackModel)env.getVariable("context");
if(contextStack == null || contextStack.empty()) {
throw new TemplateModelException("error; no context node available");
}
TemplateNodeModel<Node> context = (TemplateNodeModel<Node>)contextStack.peek();
SimpleScalar pathScalar = (SimpleScalar)params.get("path");
if(pathScalar == null) {
throw new TemplateException("the directive has been called without a path parameter",env);
}