You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "Jim.Tully" <Ji...@target.com> on 2014/07/02 18:12:27 UTC

Possible defect with namespaces

I am trying to create a custom node type using CND and registering it with CNDImporter.  If I use an existing namespace (oak, for example), the import succeeds.  If I define a new namespace, it fails with exception:
                OakName0001: Invalid namespace prefix([, jcr, nt, oak, sv, xml, mix, rep]): tgt

I've also tried programmatically creating the namespace using workspace.getNamespaceRegistry().registerNamespace().  This throws an exception:
OakNamespace0005: Namespace modification not allowed: rep:nsdata

I've tried with both version 1.0.0 and 1.0.1


Thank you,

Jim Tully

Jim Tully | Senior Software Engineer | Delivery Services & TCom | *Target | 33 South Sixth Street  | CC-1804| Minneapolis | MN 55402  | 612.304.7392 (ph)


Re: Possible defect with namespaces

Posted by Michael Dürig <md...@apache.org>.
Hi,

On 2.7.14 6:12 , Jim.Tully wrote:
> I am trying to create a custom node type using CND and registering it with CNDImporter.  If I use an existing namespace (oak, for example), the import succeeds.  If I define a new namespace, it fails with exception:
>                  OakName0001: Invalid namespace prefix([, jcr, nt, oak, sv, xml, mix, rep]): tgt

This means that the prefix is being used but has not been registered. 
The prefixes inside the bracket (, jcr, nt, oak, sv, xml, mix, rep) are 
the ones currently registered.

Please attach a test case or some code for me to reproduce.

>
> I've also tried programmatically creating the namespace using workspace.getNamespaceRegistry().registerNamespace().  This throws an exception:
> OakNamespace0005: Namespace modification not allowed: rep:nsdata

This means that rep:nsdata is already registered and you tried to modify 
its prefix, which is not allowed in Oak.

Michael

>
> I've tried with both version 1.0.0 and 1.0.1
>
>
> Thank you,
>
> Jim Tully
>
> Jim Tully | Senior Software Engineer | Delivery Services & TCom | *Target | 33 South Sixth Street  | CC-1804| Minneapolis | MN 55402  | 612.304.7392 (ph)
>
>