private static Object[] completeSchemaLocation(PsiElement element) {
    XmlTag tag = (XmlTag)element.getParent().getParent();
    XmlAttribute[] attributes = tag.getAttributes();
    final PsiReference[] refs = element.getReferences();
    return ContainerUtil.mapNotNull(attributes, attribute -> {
      final String attributeValue = attribute.getValue();
      return attributeValue != null &&
             attribute.isNamespaceDeclaration() &&
             ContainerUtil.find(refs, ref -> ref.getCanonicalText().equals(attributeValue)) == null ? attributeValue + " " : null;
    }, ArrayUtilRt.EMPTY_OBJECT_ARRAY);
  }
private static Object[] completeSchemaLocation(PsiElement element)