I don't want to argue with the Day guys since they are the main authors behind JR but remapping an unregistration of the namespaces is not supported. Here is a snippet from Jackrabbit 1.2.2 (org.apache.jackrabbit.core.NamespaceRegistryImpl) :
Code:
/**
* {@inheritDoc}
*/
public void unregisterNamespace(String prefix)
throws NamespaceException, UnsupportedRepositoryOperationException,
AccessDeniedException, RepositoryException {
...
/**
* as we can't guarantee that there are no references to the specified
* namespace (in names of nodes/properties/node types etc.) we simply
* don't allow it.
*/
throw new NamespaceException("unregistering namespaces is not supported.");
The same goes for remapping:
Code:
public void registerNamespace(String prefix, String uri) {
...
if (prefixToURI.containsKey(prefix)) {
/**
* prevent remapping of existing prefixes because this would in effect
* remove the previously assigned namespace;
* as we can't guarantee that there are no references to this namespace
* (in names of nodes/properties/node types etc.) we simply don't allow it.
*/
throw new NamespaceException("failed to register namespace "
+ prefix + " -> " + uri
+ ": remapping existing prefixes is not supported.");
}
Maybe I'm missing something but the registration should be done through the Namespace registry which, as pointed about throws exceptions.
I'll take a look at the email but my understanding is that new registrations are allowed but modifications/removal of existing namespaces is forbidden.