code: private synchronized void registerNamespace(String prefix, String uri, boolean persist) throws NamespaceException, RepositoryException
     {
        if (namespaces.containsKey(prefix))
        {
           unregisterNamespace(prefix);
        }
        else if (prefixes.containsKey(uri))
        {
           unregisterNamespace(prefixes.get(uri));
        }
        if (persister != null && persist)
        {
           persister.addNamespace(prefix, uri);
        }
        final String newPrefix = new String(prefix);
        final String newUri = new String(uri);
  
        namespaces.put(newPrefix, newUri);
        prefixes.put(newUri, newPrefix);
     }
docs: Registers the namespace and persists it if <code>persist</code> has been set to <code>true</code> and a persister has been configured