cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Woody binding of namespaced element
Date Mon, 16 Feb 2004 21:23:10 GMT
Gianugo Rabellino wrote:

> Christopher Oliver wrote:
>> That is a problem with JXPath. I may be wrong, but if IIRC it doesn't 
>> support namespaces properly or at all.
> Bad bad news. Actually it seems to do selections just fine, but 
> insertions are flawed. OK, time for tricks then :-/

AFAIK, even for selection you may encounter problems as the prefix is 
used, but the actual namespace URI is ignored.

There may be a workaround for the binding, however: the 
o.a.c.util.jxpath.DOMFactory class tries to guess the namespace URI when 
asked to create a prefixed element by crawling up the DOM tree up to 
finding an "xmlns:" namespace declaration attribute for that prefix.

So if you add that declaration on the root element of the document you 
bind to, prefixed elements should be correctly namespaced.

Hope this helps,

Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message