code: public String declarePrefix(String uri){
          String prefix = findPrefix(uri);
          if(prefix==null){
              if(uri.isEmpty())
                  prefix = ""; // non-empty prefix cannot be used for empty namespace
              else{
                  prefix = suggested.getProperty(uri, suggestPrefix);
                  if(getURI(prefix)!=null){
                      if(prefix.isEmpty())
                          prefix = "ns";
                      int i = 1;
                      String _prefix;
                      while(true){
                          _prefix = prefix + i;
                          if(getURI(_prefix)==null){
                              prefix = _prefix;
                              break;
                          }
                          i++;
                      }
                  }
              }
              declarePrefix(prefix, uri);
          }
          return prefix;
      }
docs: generated a new prefix and binds it to given uri.
  
  <p>you can customize the generated prefix using {@link #suggestPrefix(String, String)}