private static @NotNull List<IndexedRelevantResource<String, XsdNamespaceBuilder>> getDtdResources(@Nullable String namespace,
                                                                                                     @Nullable Module module,
                                                                                                     @NotNull Project project) {
    AdditionalIndexedRootsScope scope = new AdditionalIndexedRootsScope(GlobalSearchScope.allScope(project));
    ProjectFileIndex index = ProjectRootManager.getInstance(project).getFileIndex();
    Function<VirtualFile, IndexedRelevantResource<String, XsdNamespaceBuilder>> resourceFunction = f -> {
      ResourceRelevance relevance = ResourceRelevance.getRelevance(f, module, index, scope);
      return new IndexedRelevantResource<>(f, f.getName(), getFileNamespace(f, project), relevance);
    };
    Collection<VirtualFile> dtdFiles;
    if (namespace == null) {
      dtdFiles = FileTypeIndex.getFiles(DTDFileType.INSTANCE, scope);
    } else {
      dtdFiles = ContainerUtil.filter(FilenameIndex.getVirtualFilesByName(namespace, scope), f -> FileTypeRegistry.getInstance().isFileOfType(f, DTDFileType.INSTANCE));
    }
    return ContainerUtil.map(dtdFiles, resourceFunction);
  }
private static @NotNull List<IndexedRelevantResource<String, XsdNamespaceBuilder>> getDtdResources(@Nullable String namespace,
                                                                                                     @Nullable Module module,
                                                                                                     @NotNull Project project)