@NotNull
    public static ContextProvider getContextProvider(PsiElement element) {
        return element instanceof XPathElement ?
                getContextProvider(element instanceof XPathFile ?
                        (PsiFile)element :
                        element.getContainingFile()) :
                new DefaultProvider(PsiTreeUtil.getParentOfType(element, XmlElement.class, false));
    }
@NotNull
    public static ContextProvider getContextProvider(PsiElement element)