boolean (Object element, PsiElement context) { if(element instanceof XmlTag){ final String attributeValue = ((XmlTag)element).getAttributeValue("targetNamespace"); if(attributeValue != null){ for (String aMyValue : myValue) { if (aMyValue.equals(attributeValue)) return true; } } } else if(element instanceof XmlDocument){ return isAcceptable(((XmlDocument) element).getRootTag(), context); } return false; }