The constraint Property

Has this text:

Specifying minimum and maximum occurrences for nodes in the instance data  
can be achieved by using the count() function within a constraint  

I'd like to convert this note into an example.

So, I assume what is meant is that you can do something like this:

 <bind ref="wishes" constraint="count(wish)&lt;4"/>

However, I'm not sure when this would show up, except with a submit.

If you do a repeat:

 <repeat ref="wishes/wish">
     <input ref="."><label>What is your wish?</label></input>

the repeat wouldn't stop you adding new wishes.

Can anybody think of a good example?


Received on Monday, 28 November 2016 09:39:36 UTC