RE: Bookmark Example in XForms Spec

[Example with bind attribute inside <repeat>]

I don't think this would work in a useful way. The 'bind' attribute refers
to a pre-selected node-set, and isn't influenced by the context node that
<repeat> provides.

Does this answer your question?

Thanks,

.micah

-----Original Message-----
From: Subramanian Peruvemba (PV) [mailto:subramanian.peruvemba@oracle.com]
Sent: Friday, September 27, 2002 2:51 PM
To: www-forms@w3.org
Subject: Bookmark Example in XForms Spec


Looking at the bookmark example
 
<xforms:model id="bookmarks">
    <xforms:instance src="bookmarks.xml" />
   <xforms:submission id="s01" method="post" action="http://examples.com/"
/>
</xforms:model>
.....
<xforms:repeat nodeset="bookmark" id="repeatBookmarks">
   <xforms:input ref="@name">
       <xforms:label>Bookmark name</xforms:label>
   </xforms:input>
   <xforms:input ref="@href">
       <xforms:label>URL</xforms:label>
   </xforms:input>
</xforms:repeat>
 
 
The input control uses a "ref" attribute. If I alter the example to use the
"bind" attribute (instead of ref)
 
<xforms:repeat nodeset="bookmark" id="repeatBookmarks">
   <xforms:input bind="b1">
       <xforms:label>Bookmark name</xforms:label>
   </xforms:input>
   <xforms:input bind="b2">
       <xforms:label>URL</xforms:label>
   </xforms:input>
</xforms:repeat>
 
What decides the context of my <bind> decl. (Does the <repeat> actually sets
the context of <bind> in the model???)
 
<xforms:model id="bookmarks">
    <xforms:instance src="bookmarks.xml" />
    <xforms:submission id="s01" method="post" action="http://examples.com/"
/>
    <xforms:bind id="b1" ref="@name" ..../>
    <xforms:bind id="b2" ref="@href" ..../>
</xforms:model>
 
 
Regards,

Received on Friday, 4 October 2002 20:33:35 UTC