Set<String> (@NotNull String tagName, @NotNull XmlFile file) { Set<String> set = null; for (XmlSchemaProvider provider : XmlSchemaProvider.EP_NAME.getExtensionList()) { if (provider.isAvailable(file)) { if (set == null) { set = new HashSet<>(); } set.addAll(provider.getAvailableNamespaces(file, tagName)); } } return set == null ? Collections.emptySet() : set; }