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