Re: Bookmark Example in XForms Spec

> OK. I see I made mistakes in wring my original examples. Hopefully I
> have corrected the mistakes here (and this is not a nested bind)
> 
>     <bind id="b1" nodeset="/myroot/a/b"/>
>     <bind id="b2" nodeset="a" relevant="false"/>

b2 is bound to /*/a, not to (context node)/a. So all controls using 
bind="b2" will be bound to node 1. And relevant also applies to node 1.

> 
>      <repeat ref="/myroot/a/b" >
>         <input id="i1" bind="b2">
>            ...
>         </input>
>      </repeat>
> 
> 
> In the above example my input control is in the context of repeat

The context does NOT matter, since you're using a bind="...". In fact, 
using a control with a bind inside a repeat is pretty useless in most cases.

> This is what I think
>   1. Input node binds to /myroot/a/b/a

No !
The nodeset specified inside the <bind> is not a shortcut for an XPath 
expression, it is a shortcut for a nodeset -> the xpath context doesn't 
matter.

>   2. "relevance" property is attached to /myroot/a

That's correct.

Regards,
Jérôme

Received on Monday, 7 October 2002 10:29:37 UTC