jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject RE: namespace remapping
Date Thu, 13 Sep 2012 09:53:26 GMT

for now I'd prefer a simple solution, which just refuses to re-map
an existing namespace prefix to uri mapping.


> -----Original Message-----
> From: Jukka Zitting [mailto:jukka.zitting@gmail.com]
> Sent: Donnerstag, 13. September 2012 11:10
> To: oak-dev@jackrabbit.apache.org
> Subject: Re: namespace remapping
> Hi,
> On Thu, Sep 13, 2012 at 10:47 AM, Marcel Reutegger
> <mreutegg@adobe.com> wrote:
> > remapping an existing namespace prefix in the namespace registry
> > somewhat breaks existing content. say we create a node foo:test,
> > save it and then remap prefix 'foo' to 'bar' in the namespace registry.
> > reading the same node again will still return foo:bar, however 'foo'
> > is not valid namespace prefix anymore. Was this done on purpose
> > or this a bug?
> The idea, not implemented yet, of how such things should be handled is
> to have a commit hook that looks out for changes in registered
> namespace prefixes and either a) simply rejects them, or b) goes
> through all existing content (potentially with a query to save time)
> and automatically updates all names and paths that contain modified
> prefixes. Or the hook could just go through all content and reject the
> prefix change if any content still refers to the old prefix (i.e. the
> client would be responsible for removing or remapping all affected
> content).
> Alternatively we can implement namespace remappings by having two sets
> of mappings. One for the original prefix mappings used in content and
> another for prefix changes applied later. Those extra prefix changes
> would not affect content in the repository itself, but would just be
> applied as implicit session-local namespace remappings in all future
> sessions.
> BR,
> Jukka Zitting

View raw message