cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: [cforms] add lenient setting to context binding
Date Tue, 16 Dec 2003 20:32:50 GMT

Timothy Larson wrote:
> What do you think of adding an optional "lenient" attribute to
> the context binding?  A value of "true" or "false" would cause
> that lenience setting to be applied to the JXPathContext.
> If the attribute is missing or holds any other value then the
> leniency setting of its parent would apply.
> Other than building and saving the setting, this proposal would
> add this code to the beginning of doLoad:
>     if (this.lenient != null)
>         jxpc.setLenient(lenient);
> I use this in some of the code supporting a "union" binding.
> Now that I have WinCVS working properly at work I am trying to
> gradually merge the class, union, etc. code into CVS, so expect
> more questions as I go along.
> Thoughts?

having just done the @direction refactoring I would even suggest to put 
this also on the top level (JXPathBindingBase) so all binding elements 
get this feature:

- not only context is containing child-bindings
- on the leaf-nodes you might want to override the setting

it should thus become some 3-state-logic on each level

not-set: don't change the setting on the jxpathcontext ==> inherit as is 
from parent

lenient=on: override any setting from parent to make this and possible 
childbindigs work in lenient mode

lenient=off: override any setting from parent to make this and possible 
childbindigs work in non-lenient mode

making sense?

PS: I'm off for 3 days of work away from home, connection time will 
probably be reduced, but hoping that available hacking time in dull 
hotel evenings (midle of nowhere) will increase
Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                          

View raw message