public static boolean isTemplate(@NotNull XmlTag element, boolean requireName) {
    return "template".equals(element.getLocalName()) && (!requireName || hasNameAttribute(element)) && isXsltCoreTag(element);
  }
public static boolean isTemplate(@NotNull XmlTag element, boolean requireName)