@Override
  public @Nullable PsiElement getDocumentationElementForLookupItem(PsiManager mgr, Object object, PsiElement psiElement) {
    if (object instanceof String) {
      if (psiElement instanceof XmlElement) {
        final XmlTag tag = PsiTreeUtil.getParentOfType(psiElement, XmlTag.class);
        if (tag != null && XsltSupport.XSLT_NS.equals(tag.getNamespace())) {
          final String prefix = tag.getNamespacePrefix();
          if (prefix.length() == 0) {
            return new DocElement(mgr, psiElement, "element", (String)object);
          }
          else if (StringUtil.startsWithConcatenation(((String)object), prefix, ":")) {
            return new DocElement(mgr, psiElement, "element", ((String)object).substring(prefix.length() + 1));
          }
        }
      }
    }
    if (object instanceof FunctionLookup lookup) {
      return new DocElement(mgr, psiElement, "function", lookup.getName());
    }
    else if (object instanceof ElementProvider) {
      return ((ElementProvider)object).getElement();
    }
    if (object instanceof XsltElement) {
      return (PsiElement)object;
    }
    return null;
  }
@Override
  public @Nullable PsiElement getDocumentationElementForLookupItem(PsiManager mgr, Object object, PsiElement psiElement)