code: public static ElementSelector
          byNameAndAttributesControlNS(final String... attribs) {
  
          if (attribs == null) {
              throw new IllegalArgumentException(ATTRIBUTES_MUST_NOT_BE_NULL);
          }
          final Collection<String> qs = Arrays.asList(attribs);
          if (any(qs, new IsNullPredicate())) {
              throw new IllegalArgumentException(ATTRIBUTES_MUST_NOT_CONTAIN_NULL_VALUES);
          }
          final HashSet<String> as = new HashSet<String>(qs);
          return new ElementSelector() {
              @Override
              public boolean canBeCompared(Element controlElement,
                                           Element testElement) {
                  if (!byName.canBeCompared(controlElement, testElement)) {
                      return false;
                  }
                  Map<QName, String> cAttrs = Nodes.getAttributes(controlElement);
                  Map<String, QName> qNameByLocalName =
                      new HashMap<String, QName>();
                  for (QName q : cAttrs.keySet()) {
                      String local = q.getLocalPart();
                      if (as.contains(local)) {
                          qNameByLocalName.put(local, q);
                      }
                  }
                  for (String a : as) {
                      QName q = qNameByLocalName.get(a);
                      if (q == null) {
                          qNameByLocalName.put(a, new QName(a));
                      }
                  }
                  return mapsEqualForKeys(cAttrs,
                                          Nodes.getAttributes(testElement),
                                          qNameByLocalName.values());
              }
          };
      }
docs: Elements with the same local name (and namespace URI - if any)
  and attribute values for the given attribute names can be
  compared.
  
  <p>Namespace URIs of attributes are those of the attributes on
  the control element or the null namespace if they don't
  exist.</p>