Re: bind('id') proposal

Hi Peter,

Yes, it has been proposed and is in our future requirements doc.
It has not made it to the near term (e.g. 1.1) because it drastically 
simplifies lots of forms by drastically complicated the implementation of 
the processor.

In particular, the availability of bind() as an xpath function means it 
could be used in the nodeset or mip expressions of bind elements.
This in turn would mean that the order of evaluating the binds during a 
rebuild would have to be computed rather than relying on a simple linear 
progression based on document order.

Getting the right order is very tricky in the general case.  It's not even 
a topological sort problem unless we introduce some limitations.
The issue is that you need to know which binds refer to which other binds 
in order to work out the evaluation order.  But, a bind function could 
take a non-constant xpath expression as a paramter, not just a literal 
IDREF, so you wouldn't necessarily know which bind is being referenced by 
a bind until after the rebuild is complete.  Cart before the horse, so to 
speak.

Cheers,
John M. Boyer, Ph.D.
Senior Product Architect/Research Scientist
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  http://www.ibm.com/software/





Peter Nunn <peter.nunn@vistic-sw.com> 
Sent by: www-forms-request@w3.org
08/31/2005 01:32 AM

To
www-forms@w3.org
cc

Subject
bind('id') proposal







I don't know if this has been proposed before, but from practial use of 
xforms it would be really usefull to be able to treat a nodeset that is 
referenced in a bind inside an xpath.
At present there is an xpath extension function for instance('IDREF') 
which returns a node that is an instance node.  It strikes me that it is 
equally valid to refer to another extension function:

bind('IDREF') which returns a single node or nodeset. (nodset[0] where a 
single-node is needed inside an xpath).

Would dramatically reduce the complexity of setvalue where the 
value=xpath must expand the binds.

eg:

                <xforms:setvalue bind="issueEquipmentRequestAddressNumber"
 
 value="instance('instLookupClientResponse')//LES:ClientAddress/@Number" 
/>

where there is a bind:

                    <xforms:bind id="lookupClientClientAddressNumber" 
nodeset="instance('instLookupClientResponse')//LES:ClientAddress/@Number" 
/>

would allow the use of:

                <xforms:setvalue 
bind="issueEquipmentRequestAddressNumber" 
value="bind('lookupClientClientAddressNumber')" />

makes maintaing the code much easier as well!


regards

Received on Wednesday, 31 August 2005 17:26:12 UTC