code: public void add(String prefix, String uri) {
          if (uri == null) {
              namespaces.remove(prefix);
          } else {
              if (namespaces.containsKey(prefix)) {
                  String currentUri = namespaces.get(prefix);
                  if (!currentUri.equals(uri)) {
                      throw new FitFailureException(
                                  String.format("The prefix %s is already mapped to %s",
                                                  prefix, currentUri));
                  }
              } else {
                  namespaces.put(prefix, uri);
              }
          }
      }
docs: Adds registration for prefix.
  @param prefix prefix to register.
  @param uri namespace the prefix should map to.
  @throws FitFailureException if another uri is already registered for this prefix.