@Override
  public ResolveResult @NotNull [] multiResolve(boolean incompleteCode) {
    final PsiElement element = resolve();
    if (element != null) {
      return new ResolveResult[]{new PsiElementResolveResult(element)};
    }

    final XmlFile xmlFile = (XmlFile)getElement().getContainingFile();
    if (xmlFile != null) {
      final List<PsiElementResolveResult> targets = new SmartList<>();
      XsltIncludeIndex.processBackwardDependencies(xmlFile, xmlFile1 -> {
        final PsiElement e = ResolveUtil.resolve(new NamedTemplateMatcher(xmlFile1.getDocument(), myName));
        if (e != null) {
          targets.add(new PsiElementResolveResult(e));
        }
        return true;
      });
      return targets.toArray(ResolveResult.EMPTY_ARRAY);
    }
    else {
      return ResolveResult.EMPTY_ARRAY;
    }
  }
@Override
  public ResolveResult @NotNull [] multiResolve(boolean incompleteCode)