W3C home > Mailing lists > Public > public-forms@w3.org > March 2008

About binds and variables and the processing model

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Wed, 26 Mar 2008 17:27:04 -0700
Message-Id: <4935B5B4-2BA5-4918-B20B-497AE18C3D33@orbeon.com>
To: public-xforms@w3.org


I think that we had a good conversation this morning about the design
of the simplified syntax. Following-up on this, we had a little
brainstorming here at work about the question of variables in binds.

Consider this example:

<xforms:bind nodeset=".">
    <xforms:bind id="subtotal" nodeset="subtotal"  
    <xforms:bind nodeset="row">
        <xforms:bind id="lineTotal" nodeset="lineTotal"  
calculate="$unitCost * $qty"/>
        <xforms:bind id="unitCost" nodeset="unitCost"/>
        <xforms:bind id="qty" nodeset="qty"/>

This is clearly a case in line with what we were talking about this
morning where one bind refers, by variable, to a bind declared by id
further down.

I have intentionally reverted the order of all references to make the
problem all the more visible.

But it seems to me that if, for a start, we do not allow using
variables within xforms:bind/@nodeset attibute, the only constraint is
that when evaluating attributes such as @calculate, etc., the bind
nodesets have already been evaluated.

So you could just do a first pass evaluating the bind nodesets. This
allows you to declare all the variables which are in scope. Then you
are back to the current case of the dependency algorithm. Sounds very
easy to me.

Or am I missing something?


Orbeon Forms - Web Forms for the Enterprise Done the Right Way
Received on Thursday, 27 March 2008 00:27:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:56 UTC