cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: cforms incompatibility in 2.1.9 (was [Fwd: [jira] Reopened: (COCOON-1687) [PATCH] JXPATHBinding : when saving the form, remove xml elements if the value of the widget is null])
Date Tue, 08 Aug 2006 09:16:14 GMT

Bertrand Delacretaz wrote:
> On 8/8/06, Marc Portier <> wrote:
>> ...since the mentioned fix however the effect of the 'null' in the 'text'
>> field is that the complete element gets removed (since that executes the
>> removePath() on ".")...
> Sounds like a bug to me, removing an element because an attribute is
> null doesn't make sense.

euh, in fact the element gets removed because the corresponding value in
the cforms model is null, and thus all the attributes (which aren't null
get removed as well)

when using the "." binding I guess it would be ok for me to remove the
nested ./text() node, but jxpath just sees the '.'-reference and just
dumps the complete element.

we could argue of course that binding to text() nodes smells like
mixed-content-model issues which typically are messy in data-binding


>> ...My original idea therefor was to enable the requested feature through
>> the introduction of some new attribute @remove-if-null on the fb:value
>> binding. (defaulting to 'false')...
> Sounds reasonable, +1 here.
> -Bertrand

Marc Portier                  
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                          

View raw message