void (@NotNull XmlAttributeValue value) { PsiReference ref = null; boolean skip = false; for (PsiReference reference : value.getReferences()) { if (reference instanceof TypeOrElementOrAttributeReference) { ref = reference; } else if (reference instanceof SchemaPrefixReference) { skip = true; break; } } if (!skip && ref != null) { final PsiElement xmlElement = ref.resolve(); if (xmlElement instanceof XmlElement) { final XmlTag tag = PsiTreeUtil.getParentOfType(xmlElement, XmlTag.class, false); if (tag != null) { if (tag.getNamespace().equals(namespace)) { if (ref.getRangeInElement().getLength() == value.getValue().length()) { //no ns prefix values.add(value); } } } } } }