PsiElement () { final ContextProvider provider = getElement().getXPathContext(); final NamespaceContext namespaceContext = provider.getNamespaceContext(); if (namespaceContext != null) { return namespaceContext.resolve(getCanonicalText(), provider.getContextElement()); } else { return null; } }