2 messages in org.apache.jackrabbit.usersRe: Session.importXML() and namespaces.
FromSent OnAttachments
Adam PelletierOct 1, 2007 12:23 pm 
Jukka ZittingOct 2, 2007 4:27 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Session.importXML() and namespaces.Actions...
From:Jukka Zitting (jukk@gmail.com)
Date:Oct 2, 2007 4:27:54 pm
List:org.apache.jackrabbit.users

Hi,

On 10/1/07, Adam Pelletier <ada@moesol.com> wrote:

I can't seem to wire the namespaces together and get "_pre2" in the output. I was expecting this to be "md" and not "_pre2".

Using Session.setNamespacePrefix() only affects the current session. You'll want to use NamespaceRegistry.registerNamespace() if you want to globally register a specific prefix for a namespace.

The _pre2 prefix in your example is autoregistered by the XML import code when it sees a namespace URI that hasn't been explicitly registered in the global namespace registry.

BR,