code: public static String getUniquePrefix(XMLStreamWriter writer, String namespaceURI, boolean declare)
          throws XMLStreamException {
          String prefix = writer.getPrefix(namespaceURI);
          if (prefix == null) {
              prefix = getUniquePrefix(writer);
  
              if (declare) {
                  writer.setPrefix(prefix, namespaceURI);
                  writer.writeNamespace(prefix, namespaceURI);
              }
          }
          return prefix;
      }
docs: Create a unique namespace uri/prefix combination.
  
  @return The namespace with the specified URI. If one doesn't exist, one
  is created.
  @throws XMLStreamException