code: public void registerNamespace(String prefix, String uri)
     {
        try
        {
           namespaceRegistry.getPrefix(uri);
        }
        catch (NamespaceException e)
        {
           try
           {
              namespaceRegistry.registerNamespace(prefix, uri);
           }
           catch (NamespaceException e1)
           {
              throw new RuntimeException(e1);
           }
           catch (RepositoryException e1)
           {
              throw new RuntimeException(e1);
           }
        }
        catch (RepositoryException e)
        {
           throw new RuntimeException(e);
        }
  
     }
docs: /*
  (non-Javadoc)
  @see
  org.exoplatform.services.jcr.impl.xml.importing.Importer#registerNamespace
  (java.lang.String, java.lang.String)