boolean (PsiElement element) { if (element instanceof XmlAttributeValue) { PsiElement parent = element.getParent(); return parent instanceof XmlAttribute && acceptsPsiElement(parent); } else return element instanceof XmlTag && acceptsPsiElement(element); }