try {
NestableNode parent = element.getParent();
parent.removeChild(element);
((AbstractGeneralTemplateWriter) templateWriter).writeNode(arguments, writer, parent);
Node content = new Macro(writer.toString());
CacheManager.INSTANCE.put(arguments, cacheName, Collections.singletonList(content));
} catch (IOException e) {
throw new TemplateOutputException("Error during creation of output", e);
}
return ProcessorResult.OK;