jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Session.importXML() and namespaces.
Date Tue, 02 Oct 2007 23:28:17 GMT
Hi,

On 10/1/07, Adam Pelletier <adamp@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,

Jukka Zitting

Mime
View raw message