logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: optional elements again: msg#00037

Subject: Re: optional elements again
Hi Sophie,

sorry for the long delay...

try to give an intermediate answer as far as i can remember my discussion with Uli...
sophie.ramel-bqDqoxiz9wg@xxxxxxxxxxxxxxxx wrote:


Hi Joern, Hi everyone,

You told me in a previous mail that you had thought of a solution about optional elements; I didn't work on it at all since some time, because since I wasn't in a hurry anymore, I wanted to wait for chiba-sandbox to be complete.

So now I looked a little at the previous mails, and I think I understood that we last said that we could at first use the "xforms:relevant" attribute to do this (or implement an equivalent behavior in the engine) + find a way to render this correctly.
! lets remember the fact that i proposed the use of relevant as *implementation* solution which doesn't solves the conceptual problem we have - to handle Schema optional values correctly (right?)


So just to check if I remembered well, I tried to set the attribute 'xforms:relevant="string-length(.)>0"' on an exemple: the element doesn't appear at all when the form is loaded, because non-relevant nodes are not rendered... (which seems normal. And since we mustn't be able to enter a value into a non-relevant node, I don't see how we could do to use this...).
right, i think that's the correct analysis so far with one exception. such a node *can* become relevant by the use of a setvalue action or other modelitem properties e.g. a calculate="a+b" on the same bind element.

though the user may not input values directly this is not necessarily a big drawback since actions can do it.

from my (and i hope i can speak for Uli too here) current view we had a fundamental semantic misunderstanding of the meaning of the xforms:relevant *and* the other bindings attributes:

a relevant is not a direct analogue for a Schema optional value, since it deals with the relevance of the *value* of the node and *not* with the relevance of the node itself.
the same is true for the other modelitem properties.

XForms validation/calculation builds is item-based and not structure based - it simply cannot be used for that. this is resposibility of the Schema validation facility (which btw is still one the most important todos).

please excuse if i'm repeating obvious things. i think most of our problems emerged cause we haven't separated things (what's Schema - what's XForms) clearly enough.

Did you have time to think on a solution to this problem?
we should start over with a sample form. maybe we can extend a existing one? then we can try to express your original requirements the 'pure' way by separating what could be done in XForms and what's maybe have to be done by Schema validation.

what do you think?

best,

Joern


best regards,

Sophie

PS: by the way, did you see http://www.xml.com/pub/a/2003/09/10/xforms.html ?




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>