code: @Override
    public Iterator<String> getPrefixes(String namespaceURI) {
      // per javax.xml.namespace.NamespaceContext doc
      if (namespaceURI == null)
        throw new IllegalArgumentException("Cannot find prefix for null namespace URI");
  
      List<String> list = new ArrayList<>();
      if (XMLConstants.XML_NS_URI.equals(namespaceURI))
        list.add(XMLConstants.XML_NS_PREFIX);
      else if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI))
        list.add(XMLConstants.XMLNS_ATTRIBUTE);
      else
        for (Map.Entry<String, String> entry: bindings.entrySet()) {
          if (namespaceURI.equals(entry.getValue()))
            list.add(entry.getKey());
        }
  
      return Collections.unmodifiableList(list).iterator();
    }
docs: Returns all prefixes with a namespace binding.