docs: protected boolean registerNamespace( String namespacePrefix,
                                           String namespaceUri,
                                           NamespaceRegistry namespaceRegistry ) throws RepositoryException {
          if (namespacePrefix == null || namespaceUri == null) {
              throw new IllegalArgumentException("Neither the namespace prefix, nor the uri should be null");
          }
          try {
              // if the call succeeds, means it was previously registered
              namespaceRegistry.getPrefix(namespaceUri);
              return false;
          } catch (NamespaceException e) {
              // namespace not registered yet
              namespaceRegistry.registerNamespace(namespacePrefix, namespaceUri);
              return true;
          }
      }