@Override
    public void accept(@NotNull PsiElementVisitor visitor) {
      if (visitor instanceof XPathElementVisitor && this instanceof XPathElement) {
        accept((XPathElementVisitor)visitor);
      } else {
        myElement.accept(visitor);
      }
    }
@Override
    public void accept(@NotNull PsiElementVisitor visitor)