W3C home > Mailing lists > Public > www-forms@w3.org > October 2001

Re: relevant and required

From: Roland Merrick <roland_merrick@uk.ibm.com>
Date: Mon, 29 Oct 2001 11:01:07 +0000
To: "Rodrigue Vaudan" <vaudrodr@students.hevs.ch>
Cc: www-forms@w3.org
Message-ID: <OF66F0089C.9362E56C-ON80256AF4.003AE9E9@portsmouth.uk.ibm.com>

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

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

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
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                             
                    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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:05 UTC