RE: Do unbound binds apply?

Hi Ray,

the bindings in your example seem to be a little off. The bind elements are
executed without knowledge of the UI. I would modify your binds a little bit
(1. bind points to the right nodeset. 2. direct ref in output):

<bind id="fib" nodeset="fib/f"
calculate="preceding-sibling::f[1] +
preceding-sibling::f[2]"/>

<repeat nodeset="fib/f[position() > 2]">
 <output ref="."><caption>nth
 number</caption></output>
</repeat>

I think this has a better possibility to work.

Regards,
  Mikko Honkala

> -----Original Message-----
> From: www-forms-request@w3.org [mailto:www-forms-request@w3.org]On
> Behalf Of Ray Cromwell
> Sent: 28. lokakuuta 2001 5:30
> To: www-forms@w3.org
> Subject: Do unbound binds apply?
>
>
>
> If there are <bind> entries that are not bound by any
> UI control, are they still included during processing
> of the dependency graph? If so, is their evaluation
> context the root of the the instance data?
>
> Another question - when building the dependency graph
> and you encounter <repeat> UI elements, do you have to
> loop through and add each repeating model item
> property that is bound into the dependency graph?
>
> I'm thinking specifically of a fibonacci-sequence
> example, where you have
>
> <fib>
> <f>1</f>
> <f>1</f>
> <f>2</f>
> <f>3</f>
> <f>5</f>
> <f>8</f>
> <f>13</f>
> <f>21</f>
> </fib>
>
> And you have bindings like
>
> <bind id="fib" ref="."
> calculate="preceding-sibling::f[1] +
> preceding-sibling::f[2]"/>
>
> Next, you have a form like
>
> <input ref="fib/f[1]"><caption>First
> Number</caption></input>
> <input ref="fib/f[2]"><caption>Second
> number</caption></input>
>
> <repeat nodeset="fib/f[position() > 2]">
> <output bind="fib"><caption>nth
> number</caption></output>
> </repeat>
>
> The idea is that the form shows the two starting
> numbers (1,1) and displays all the numbers up to the
> last existing one in the instance. If either one of
> those two are changed, are all recalculated. However,
> the bind expression I used (.) doesn't make sense
> outside of the repeat. The spec doesn't seem to say
> exactly how the M-D graph should be constructed, but I
> am starting from all UI bound binding expressions.
>
> -Ray
>
>
>
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>

Received on Monday, 29 October 2001 03:07:19 UTC