cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: [CForms] Binding and Namespaces
Date Thu, 02 Sep 2004 10:44:30 GMT


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!

> 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?)

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

wdyt?
-marc=


> Sylvain
> 

-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
mpo@outerthought.org                              mpo@apache.org

Mime
View raw message