You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by sir�ne vip <si...@hotmail.com> on 2006/01/12 10:38:06 UTC

[beginners]Defining New Namespaces

Hello,

I want to define new namespaces for the project I'm working on. Let's say:
I want to define "test1" and "test2" namespaces.

Where should they be defined? I tried in "ns_reg" file under 
Home-Example/repository/repository/namepsaces, but it didn't work. I'm using 
for that purpose:
ws.getNamespaceRegistry().registerNamespace
	("test", "http://www.konito.net/test/1.0"); -- as an example!

Thanks for your help on this issue.
Cheers,
Celina

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Re: [beginners]Defining New Namespaces

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 1/12/06, sirène vip <si...@hotmail.com> wrote:
> I want to define new namespaces for the project I'm working on. Let's say:
> I want to define "test1" and "test2" namespaces.
>
> Where should they be defined? I tried in "ns_reg" file under
> Home-Example/repository/repository/namepsaces, but it didn't work. I'm using
> for that purpose:
> ws.getNamespaceRegistry().registerNamespace
>         ("test", "http://www.konito.net/test/1.0"); -- as an example!

The NamespaceRegistry is the correct place to manage the persistently
registered namespaces. In general you should not directly modify any
of the files within the Jackrabbit repository directory unless you are
absolutely sure of what you are doing (changing workspace
configuration properties, etc.).

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftmanship, JCR consulting, and Java development