- From: Tomayko, Ryan <Ryan_Tomayko@stercomm.com>
- Date: Sun, 4 Nov 2001 00:47:24 -0500
- To: "'www-forms@w3.org'" <www-forms@w3.org>
I think the idea of overriding previous constraints would work well for all but the isValid attribute. For instance, I might have many validation constraints for a single node. Off the top of my head, let's say I had a single node of type date and I wanted the following constraints: 1. The date must be no earlier than 1980 and no later than 2010. 2. The date must be greater (or later) than another date field in my instance. 3. The date may not be on the fifth day of the month. If I attempted to implement these rules using three bind expressions in listed order, only the third rule would effect the outcome of the validation. I could probably accomplish the desired functionality with a single bind element and a couple of and's in the isValid XPath expression. It just seems like isValid will have a greater chance for multiples than any of the other computed expressions. I do like the idea of some form of overridability though. - Ryan -----Original Message----- From: Micah Dubinko [mailto:MDubinko@cardiff.com] Sent: Saturday, November 03, 2001 8:35 PM To: Tomayko, Ryan; 'www-forms@w3.org' Subject: 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 Sunday, 4 November 2001 00:48:40 UTC