eXo Platform 3.5

## Chapter 11. Namespace altering

Since version 1.11, eXo JCR implementation supports namespaces altering.

## Adding new namespace

    ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();

    namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");

## Changing existing namespace

    ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();

    namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");

    namespaceRegistry.registerNamespace("newMapping2", "http://dumb.uri/jcr");

## Removing existing namespace

    ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry();

    namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");

    namespaceRegistry.unregisterNamespace("newMapping");