@Override
  public @Nullable PsiElement resolve() {
    final String canonicalText = getCanonicalText();
    final PsiFile file = ExternalResourceManager.getInstance().getResourceLocation(canonicalText, myElement.getContainingFile(), null);
    if (file != null) return file;
    PsiElement element = myReference.resolve();
    if (element == null && !myForceFetchResultValid && !XmlUtil.isUrlText(canonicalText, myElement.getProject())) return myElement;  // file reference will highlight it
    return element;
  }
@Override
  public @Nullable PsiElement resolve()