W3C home > Mailing lists > Public > www-forms@w3.org > March 2002

RE: binds

From: Micah Dubinko <MDubinko@cardiff.com>
Date: Fri, 22 Mar 2002 11:57:53 -0800
Message-ID: <E840F0B7E6189547BDB91DA8BF2228AB28C33D@csmail.cardiff.com>
To: 'Plech¹míd Martin' <Martin.Plechsmid@merlin.cz>, "'XForms'" <www-forms@w3.org>
Cc: "'John Boyer' (E-mail)" <JBoyer@PureEdge.com>
>If no conflict resolutions take place, what when two binds refer to the
>instance data node? E.g.

	<bind ref="a/b" relevant="true()" />
	<bind ref="a/b" relevant="false()" />

Good point. This may boil down to a question of bind processing order. There
certainly are implementation implications in whatever we choose. I will
raise this issue. I'm referring your dynamic bind question over to John
Boyer, our calculation expert.

John, can you have a look at 3) below when you have a spare moment? Thanks
John, and thanks Martin,


-----Original Message-----
From: Plech¹míd Martin [mailto:Martin.Plechsmid@merlin.cz]
Sent: Thursday, March 21, 2002 12:21 AM
To: 'XForms'
Subject: RE: binds

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 
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,

-----Original Message-----
From: Plech¹míd Martin [mailto:Martin.Plechsmid@merlin.cz]
Sent: Tuesday, March 19, 2002 3:38 AM
To: 'XForms'
Subject: binds


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 ref="/a//*" relevant="false()">
		<bind ref="/a/b" relevant="true()" />

(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" />

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":


when dynamic predicates are not allowed?

Thank you,
Received on Friday, 22 March 2002 15:01:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:05 UTC