String i18nPrefix = TemplateUtil.getI18nPrefix(templateFileName);
final URL resource = TranslationServiceGenerator.class.getClassLoader().getResource(templateFileName);
if (resource == null) {
throw new IllegalArgumentException("Could not find template " + templateFileName + " for @Templated class " + templatedAnnotatedClass.getName());
}
Document templateNode = new TemplateCatalog().parseTemplate(resource);
if (templateNode == null) // TODO log that the template failed to parse
continue;
Element templateRoot = getTemplateRootNode(templateNode, templateFragment);
if (templateRoot == null) // TODO log that the template root couldn't be found
continue;