Re: relevant and required

Greetings Rodrigue, consider the following scenario . . .

a user is requested to supply some form of payment, either credit card or
debit card. The two alternatives might be represented in a schema using a
<choice> where only one or the other is possible. An instance could be
defined could be defined allowing for these two possibilities

<payment>
    <debitCard relevant="enabling expression which has evaluated to true ">
        <cardNo xsi:type="creditCard"  required="true" />
        <expiry xsi:type="xsd:gYearMonth required="true" />
    </debitCard>
    <creditCard relevant="enabling expression which has evaluated to false
">
        <cardNo xsi:type="debitCard" required="true" />
        <expiry xsi:type="xsd:gYearMonth  required="true" />
    </creditCard>
<payment>

As can be seen from this example exactly one of the two payment methods is
required and only one will be in the submitted instance data. The required
attribute is subordinate to the relevant attribute. If I elect to pay by
debit card, then I MUST supply a card number and expiry date, the credit
card alternative is not relevant and so the child elements are also not
relevant, including any constraints.

Regards, Roland
Ease of Use Strategy
Tel: +44 (0)1926-465440,   Fax: +44 (0)1926-410764, 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/


                                                                                                           
                    "Rodrigue Vaudan"                                                                      
                    <vaudrodr@student       To:     <www-forms@w3.org>                                     
                    s.hevs.ch>              cc:                                                            
                    Sent by:                Subject:     relevant and required                             
                    www-forms-request                                                                      
                    @w3.org                                                                                
                                                                                                           
                                                                                                           
                    29/10/2001 10:30                                                                       
                    Please respond to                                                                      
                    "Rodrigue Vaudan"                                                                      
                                                                                                           
                                                                                                           





I don't understand the difference between "...  relevant=false
required=true ..." and "... relevant=false required=false ..."  specified
in the last WD.
The difference specified in the WD is that, in the  first case, "the XForms
User Interface may indicate that should the form control  become relevant,
a value would be required". I don't know why.

Rodrigue Vaudan

Received on Monday, 29 October 2001 06:09:12 UTC