void (final @NotNull XmlTag tag) { final XmlAttribute nameAttr = tag.getAttribute("name", null); if (nameAttr == null || PsiTreeUtil.hasErrorElements(nameAttr)) return; if (XsltSupport.isVariableOrParam(tag)) { final XsltNamedElement instance = getXsltElementFactory().wrapElement(tag, XsltNamedElement.class); checkDeclaration(instance, nameAttr.getValue(), holder); } else if (XsltSupport.isTemplate(tag)) { final XsltTemplate tmpl = getXsltElementFactory().wrapElement(tag, XsltTemplate.class); checkDeclaration(tmpl, nameAttr.getValue(), holder); } }