You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Michal Hybler <m....@email.cz> on 2007/03/08 12:36:18 UTC
namespace registering
I have a question. Is there any way to discover if the namespace id
registered? Or If I register regitered namespace it hasnt effect? Thanks
Michal
--
View this message in context: http://www.nabble.com/namespace-registering-tf3368491.html#a9372273
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: namespace registering
Posted by Stefan Guggisberg <st...@gmail.com>.
On 5/18/07, Stefano Minella <st...@gmail.com> wrote:
> If I use the following code, are there some differences in the results?
>
> NamespaceRegistry namespaceRegistry = ws.getNamespaceRegistry();
> String[] prefixes = namespaceRegistry.getPrefixes();
Session#getNamespacePrefixes() includes session-local mappings while
NamespaceRegistry#getPrefixes() returns only the globally mapped prefixes.
for more details see:
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Session.html#getNamespacePrefixes()
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/NamespaceRegistry.html#getPrefixes()
cheers
stefan
>
> Thank you
> bye
> stefano
>
>
>
>
> On 3/8/07, Wolf Benz <eu...@gmail.com> wrote:
> > You could, with code like this one:
> >
> > Session s = getSession();
> > try {
> >
> > logger.info("These Namespaces are declared for the repository: ");
> > for(String prefix : s.getNamespacePrefixes()){
> > logger.info("The prefix: " + prefix + " is mapped to Namespace: "
> > + s.getNamespaceURI(prefix));
> > }
> > ...
> >
> > Wolf
> >
> > On 3/8/07, Michal Hybler <m....@email.cz> wrote:
> > >
> > > I have a question. Is there any way to discover if the namespace id
> > > registered? Or If I register regitered namespace it hasnt effect? Thanks
> > > Michal
> > > --
> > > View this message in context: http://www.nabble.com/namespace-registering-tf3368491.html#a9372273
> > > Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> > >
> > >
> >
>
Re: namespace registering
Posted by Stefano Minella <st...@gmail.com>.
If I use the following code, are there some differences in the results?
NamespaceRegistry namespaceRegistry = ws.getNamespaceRegistry();
String[] prefixes = namespaceRegistry.getPrefixes();
Thank you
bye
stefano
On 3/8/07, Wolf Benz <eu...@gmail.com> wrote:
> You could, with code like this one:
>
> Session s = getSession();
> try {
>
> logger.info("These Namespaces are declared for the repository: ");
> for(String prefix : s.getNamespacePrefixes()){
> logger.info("The prefix: " + prefix + " is mapped to Namespace: "
> + s.getNamespaceURI(prefix));
> }
> ...
>
> Wolf
>
> On 3/8/07, Michal Hybler <m....@email.cz> wrote:
> >
> > I have a question. Is there any way to discover if the namespace id
> > registered? Or If I register regitered namespace it hasnt effect? Thanks
> > Michal
> > --
> > View this message in context: http://www.nabble.com/namespace-registering-tf3368491.html#a9372273
> > Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> >
> >
>
Re: namespace registering
Posted by Wolf Benz <eu...@gmail.com>.
You could, with code like this one:
Session s = getSession();
try {
logger.info("These Namespaces are declared for the repository: ");
for(String prefix : s.getNamespacePrefixes()){
logger.info("The prefix: " + prefix + " is mapped to Namespace: "
+ s.getNamespaceURI(prefix));
}
...
Wolf
On 3/8/07, Michal Hybler <m....@email.cz> wrote:
>
> I have a question. Is there any way to discover if the namespace id
> registered? Or If I register regitered namespace it hasnt effect? Thanks
> Michal
> --
> View this message in context: http://www.nabble.com/namespace-registering-tf3368491.html#a9372273
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>