public static @Nullable XmlFile guessSchema(String namespace,
                                              final @Nullable String tagName,
                                              final @Nullable String version,
                                              @Nullable String schemaLocation,
                                              @NotNull PsiFile file) {

    if (DumbService.isDumb(file.getProject()) || XmlUtil.isStubBuilding()) return null;

    IndexedRelevantResource<String,XsdNamespaceBuilder> resource =
      guessSchema(namespace, tagName, version, schemaLocation, ModuleUtilCore.findModuleForPsiElement(file), file.getProject());
    if (resource == null) return null;
    return findSchemaFile(resource.getFile(), file);
  }
public static @Nullable XmlFile guessSchema(String namespace,
                                              final @Nullable String tagName,
                                              final @Nullable String version,
                                              @Nullable String schemaLocation,
                                              @NotNull PsiFile file)