RE: Bookmark Example in XForms Spec

> However, if you instance was like this:
> <myroot>
>	<a> (node 1)
>		<b> (node 2)
>			<a/> (node 3)
>		</b>
>	</a>
> </myroot>
> The input would be bound to node 1, and the 
> relevant would apply to node 1 also.

hmmm.. I think I disagree but this may be due to lack of clarity in the
original example. The original example looked like it may have been nested.
e.g.

     <bind id="b1" nodeset="a/b">
         <bind id="b2" nodeset="a" relevant="false">
     </bind>

There was no explicit end element for the b1 bind in the original example
but assuming b2 was supposed to be nested within b1, the b2 nodeset
expression would be evaluated in the context "a/b". i.e. the b2 nodeset
would be expanded as "a/b/a", and not "*/a". In this case, the input would
be bound to node 3 and the relevant would be associated with node 3, not
node 1.

- Ryan Tomayko


-----Original Message-----
From: Jérôme Nègre [mailto:jerome.negre@e-xmlmedia.fr] 
Sent: Monday, October 07, 2002 3:03 AM
To: Subramanian Peruvemba (PV)
Cc: 'Micah Dubinko'; www-forms@w3.org
Subject: Re: Bookmark Example in XForms Spec



Hi,

> I am not sure if I follow you here.
> My question was how does "bind" work when UI controls are within the
> context of a group/repeat. Let me try with another example.
> 
>     <instance>
>         <a>        -----------------[Node-1]
>            <b>     -----------------[Node-2]
>               <a/> -----------------[Node-3]
>            </b>
>         </a>
>     </instance>
> 
>     <bind id="b1" nodeset="/a/b">
>     <bind id="b2" nodeset="a" relevant="false">

This last nodeset binds to node /*/a, that is to say none in your instance.

>     
>     <repeat ref="/a/b" >
>        <input id="i1" bind="b2">
>           ...
>        </input>
>     </repeat>
> 
> Question: 
>  1. Does the "input" bind to "Node-1" OR "Node-3"
>  2. The "readonly" applies to "Node-1" OR "Node-3"

They are bound to another node, /*/a.

However, if you instance was like this:
<myroot>
	<a> (node 1)
		<b> (node 2)
			<a/> (node 3)
		</b>
	</a>
</myroot>
The input would be bound to node 1, and the relevant would apply to node 
1 also.

Regards,
Jérôme

Received on Monday, 7 October 2002 04:07:19 UTC