boolean (@NotNull XmlFile file, final @Nullable Module module) { final Namespace namespace = DomReflectionUtil.findAnnotationDFS(myRootElementClass, Namespace.class); if (namespace != null) { final String key = namespace.value(); Set<String> allNs = new HashSet<>(getAllowedNamespaces(key, file)); if (allNs.isEmpty()) { return false; } XmlFileHeader header = DomService.getInstance().getXmlFileHeader(file); return allNs.contains(header.getPublicId()) || allNs.contains(header.getSystemId()) || allNs.contains(header.getRootTagNamespace()); } return true; }