Re: Invitation to contribute examples

Greetings, things are not as bad as people seem to be implying here. The
statement that a constraint in one model cannot make reference to instance
data in another model is true. However, the December Draft allowed the
<submitInfo> to specify that only a portion of the <instance> should be
submitted.

This allows an instance to contain the data that is to be submitted as well
as elements that will not be submitted. The latter category can be used for
"working variables".

The example you use to illustrate the problem is incomplete. Let assume
that you only intend to "submit" the instance data in model id="m2", if
this is the case then <i:dad /> could be moved to the second model and
excluded from what is submitted by judicious use of the submitInfo which
only identifies <i:mom /> for submission.

I know this doesn't fix the cross model issue that you have recognised but
is does reduce the number of practical, rather than theoretical, situations
where the form designer might have had to resort to two models.

Regards, Roland
Ease of Use Strategy
Tel: +44 (0)1926-465440,   Fax: +44 (0)1926-465323, Mobile:  +44
(0)773-0300-937
Internet: Roland_Merrick@uk.ibm.com
Ease of Use:     http://www.ibm.com/easy/           http://w3.ibm.com/easy/


                                                                                                            
                    Jérôme Nègre                                                                            
                    <jerome.negre@e-xm       To:     "Steven Pemberton" <steven.pemberton@cwi.nl>,          
                    lmedia.fr>                <www-forms@w3.org>                                            
                    Sent by:                 cc:                                                            
                    www-forms-request@       Subject:     Re: Invitation to contribute examples             
                    w3.org                                                                                  
                                                                                                            
                                                                                                            
                    08/01/2002 16:34                                                                        
                                                                                                            
                                                                                                            




Here's a little example showing that XForms can handle dependencies between
several instances:

<html>
 <head>

  <xform:model id="m1">
   <xform:instance>
    <i:dad>
     <i:son1>value</i:son1>
     <i:son2>value</i:son2>
    </i:dad>
   </xform:instance>
   <xform:bind ref="i:dad/i:son2"
calculate="instance('m2')/i:mom/i:daughter"/>
  </xform:model>

  <xform:model id="m2">
   <xform:instance>
    <i:mom>
     <i:daughter>value</i:daughter>
    </i:mom>
   </xform:instance>
   <xform:bind ref="i:mom/i:daughter"
calculate="instance('m1')/i:dad/i:son1"/>
  </xform:model>

 </head>
 <body>
  <xform:input model="m1" ref="i:dad/i:son1">
   <xform:caption>Change me</xform:caption>
  </xform:input>
 </body>
</html>

Function instance() being used to retrieve the instance node of a given
model.

Jérôme Nègre

PS : As you might have seen, this document doesn't work with the last
draft,
but I'm sure it will with the following one ;o)

Received on Thursday, 10 January 2002 06:18:23 UTC