cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [CForms] Binding and Namespaces
Date Thu, 02 Sep 2004 11:59:27 GMT
Marc Portier wrote:

> Sylvain Wallez wrote:
>> Carsten Ziegeler wrote:
>>> If I'm binding an XML document to a form, is it possible to use 
>>> namespaces in the binding? (The bound data has namespaces)
>> The solution I've used successfully up to now is to bind to a 
>> document that already has a root element which holds the namespace 
>> definitions with the same prefixes as those used in the binding. This 
>> works thanks to o.a.c.util.jxpath.DOMFactory.
> good remark: this one should be in sync!

Sorry, in sync with what?

>> Now, as mentioned, the recent JXPath 1.2 has added real support for 
>> namespaces, which may allow us to use the namespaces used in the 
>> binding file without the previous trick.
> didn't know about the new release, I would propose to allow
> namespace-definitions on the level of the jxpathbindingbase then, it 
> should glob all xmlns: stuff that was on his corresponding definition 
> element, and then
> - set those to the jxpath context
> - execute actual binding (possibly delegates to children)


> - (is it possible?) remove them again (as other siblings might have 
> used same prefixes to other ns-uri's?)

Why so? Each binding will have its own set of namespaces (built by 
analyzing the ancestor tree), meaning there is no overlap between siblings.

> like that every wb:* could allow to have local xmlns stuff declared...



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

View raw message