RE: One Node Many bind Elements Questions

Hi Ryan,

There are ongoing discussions on this topic. I'd need to check the notes to
remember exactly where we are at. :-)

How would the following sound?

Think of the instance data as a tree. Each <bind>, evaluated in document
order, selects part of the tree and "paints" different XForms constraints on
the nodes. Subsequent <bind>s can override earlier ones (so be sure to put
the more specific ones last).

Would this work for your purposes? Would this work equally well with
relevant, required, readOnly, calculate, and isValid?

Thanks,

.micah
-----Original Message-----
From: Tomayko, Ryan [mailto:Ryan_Tomayko@stercomm.com]
Sent: Wednesday, October 31, 2001 4:10 AM
To: 'www-forms@w3.org'
Subject: One Node Many bind Elements Questions


I apologize if this question has been asked before, I vaguely remember a
discussion on this topic a while back.

If a single node in the instance document can have many bind elements
associated with it, what happens when two bind elements contradict each
other on a computed expression?

For instance, what if the result of evaluating one binds relevant computed
expressions is true, and another returns false? Example:

<bind id="b1" relevant="1" ref="/doc/*"/>
<bind id="b2" relevant="0" ref="/doc/a-node"/>

My first guess was to take the result of the first bind element that
specifies the computed expression and ignore any others. This seems to be
okay for relevant, required, readOnly, and calculate. isValid is a special
case where you would want each one to be evaluated.

Would it be better to assume the default value for each attribute and loop
through looking for any binds that specify otherwise? For instance, the
default value for relevant is true, so all bind elements that specify true
would be effectively ignored since they merely confirm the default value.
This would mean that there could be many relevant computed expressions
associated with a single node and only one would have to be false for the
node to be considered irrelevant.

Thanks,
- Ryan




Ryan Tomayko <rtomayko@stercomm.com>
B2B Solutions
Sterling Commerce
ext.  5183
cell. 614.560.1366

Received on Saturday, 3 November 2001 20:35:33 UTC