protected boolean isEnabled(final TemplateImpl template) {
    TemplateContext context = template.getTemplateContext();
    return context.isEnabled(TemplateContextTypes.getByClass(XmlContextType.class))
           || context.isEnabled(TemplateContextTypes.getByClass(HtmlContextType.class));
  }
protected boolean isEnabled(final TemplateImpl template)