boolean (XmlFile xmlFile, int offset) { final PsiElement element = xmlFile.findElementAt(offset); if (!(element instanceof XmlElement || element instanceof PsiWhiteSpace)) { return false; } final PsiElement node = XPathExpressionGenerator.transformToValidShowPathNode(element); return node != null; }