cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: CForms: updating jxpath
Date Wed, 29 Sep 2004 12:11:34 GMT
Marc Portier wrote:

> There was an initial sharing of thought on this:


> Only remaining thing is then to find out how to find all 
> namespace-declarations from a dom node?
> (I suppose itterating through all attributes and finding out which 
> ones are in the xmlns-namespace?)

You should take a look at o.a.c.util.jxpath.DOMFactory, which currently 
handles the namespaces by crawling up in the ancestor list up to finding 
either an element with the required prefix, or a xmlns:prefix declaration.

That algorithm can be used to determine the active namespace 
declarations at a given point in the binding definition file (e.g. on a 
<fb:value> element) to build the list of namespace declarations that 
have to be "transferred" over to JXPath.

As outlined by Marc, the modifications are likely to be limited to 
JXPathBindingBuilderBase and JXPathBindingBase through the use of 

I was wondering also if we need to update all calls to 
JXPathContext.getRelativeContext(), but I think this isn't actually 
needed, because AFACIS these new contexts are created as part of a 
single binding instruction and therefore share the same namespace 
declarations as their parent context.

So updating 2 classes should be all what's needed to do.


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message