- From: Plech¹míd Martin <Martin.Plechsmid@merlin.cz>
- Date: Thu, 21 Mar 2002 09:21:17 +0100
- To: "'XForms'" <www-forms@w3.org>
Thank you for your answers, however: > 1) No conflict resolution takes place. Each bind > applies only its own constraints to the instance. If no conflict resolutions take place, what when two binds refer to the same instance data node? E.g. <bind ref="a/b" relevant="true()" /> <bind ref="a/b" relevant="false()" /> At least two cases come on my mind when this can happen naturally: 1a) When the xform is machine generated 1b) When I've got a completely working form, but I want to reuse it and make it uneditable (readonly; e.g. to show the user what has been submitted without allowing him to modify it further). I would do it like this: <bind ref="a/b" .... /> <bind ref="a/c" .... /> <bind ref="//*" readOnly="false()" /> Thus, some rules on which binds prevail need to be established. > 3) Dynamic predicates introduce the possibility > of various kinds of loops in > the dependency tree. We don't want recalculations > to take very long (including infinite!) amounts > of time. Thus, dynamic predicates are never > allowed. So, instead of writing calculate="a/b[../c=1]" you would allow only calculate="if(a/c=1, a/b, '')" correct? What's the difference? And if you allow neither the second version, what code would you use to provide the same functionality? Thank you, Martin. -----Original Message----- From: Plech¹míd Martin [mailto:Martin.Plechsmid@merlin.cz] Sent: Tuesday, March 19, 2002 3:38 AM To: 'XForms' Subject: binds Hello. According to par. 6.4.1 of the specification, binds can be nested. If I understand it well, the purpose of this construction is to inherit constraints from outer to inner binds. But as this topic is not expanded in the specs, there are several unclear things to me: 1) How constraint conflicts are to be resolved? Do the constraints on inner binds override the constraints on outer binds, or are they to be combined together? E.g.: <bind ref="/a/b" relevant="false()"> <bind ref="/a/b" relevant="true()" /> </bind> or <bind ref="/a//*" relevant="false()"> <bind ref="/a/b" relevant="true()" /> </bind> (or try to substitute readOnly for relevant). And what if two binds are on the same tree level? E.g.: <bind ref="a/b" relevant="true()" /> <bind ref="a/b" relevant="false()" /> 2) Are the xpaths on inner binds relative to the xpath in the "ref" attribute on the outer bind? E.g.: <bind ref="a"> <bind ref="b" calculate="../c" /> </bind> 3) Why predicates are restricted in 6.4.2? How would you do e.g. something like "Copy the value from "a/b" if "a/c" is 1": calculate="a/b[../c=1]" when dynamic predicates are not allowed? Thank you, Martin.
Received on Thursday, 21 March 2002 03:15:28 UTC