jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: CompactNodeTypeDefReader and NamespaceMapping
Date Fri, 10 Nov 2006 12:51:44 GMT
On 11/10/06, Tako Schotanus <quintesse@palacio-cristal.com> wrote:
> Stefan Guggisberg wrote:
> > On 11/10/06, Tako Schotanus <quintesse@palacio-cristal.com> wrote:
> >> It's not very important, but is there a specific reason why the
> >> CompactNodeTypeDefReader constructor takes a NamespaceMapping instead of
> >> just a plain NamespaceResolver?
> >
> > NamespaceResolver provides a 'read-only' view of the mappings whereas
> > NamespaceMapping has a setMapping() method.
> >
> > the NamespaceMapping instance passed in the CompactNodeTypeDefReader
> > constructor will be updated with the ns declarationsencountered in the
> > cnd file.
> Aha, okay, I didn't know it was possible to define namespaces in the
> compact definition, how does that work?

you have to declare the namespaces that you reference in your node type
definitions. those namespaces will automatically registered for you when
you register your new node types. for the cnd format see
http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.html

>
> Thanks,
>  -Tako
> >
> > cheers
> > stefan
> >
> >>
> >> As far as I can see almost all other methods dealing with namespaces
> >> take a NamespaceResolver, this just seems a weird exception.
> >>
> >> Cheers,
> >>  -Tako
> >>
> >>
>
>

Mime
View raw message