W3C home > Mailing lists > Public > public-xformsusers@w3.org > November 2016

Re: switch case selection

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Tue, 8 Nov 2016 09:27:12 -0800
Message-ID: <CAAc0PEXr8OeP5kkKSONt+U+nx3nJB7_awGa4i1xGx3oxx6sx5Q@mail.gmail.com>
To: Philip Fennell <Philip.Fennell@marklogic.com>
Cc: Steven Pemberton <steven.pemberton@cwi.nl>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
+1 for consistency.

-Erik

On Tue, Nov 8, 2016 at 5:52 AM, Philip Fennell <Philip.Fennell@marklogic.com
> wrote:

> > However, it seems to me reasonable to use the same set of rules for both
> occasions.
>
> Agreed.
>
> On 08/11/2016 13:11, "Steven Pemberton" <steven.pemberton@cwi.nl> wrote:
>
>     <switch ref="/payment/details" caseref="@method">
>        <case/>
>        <case name="creditCard">
>          <label>Credit Card Details</label>
>          ...
>        </case>
>        <case name="cashCard">
>          <label>Bank Account Card</label>
>          ...
>        </case>
>        <case name="COD">
>          <label>Cash-on-delivery Account Information</label>
>          ...
>        </case>
>     </switch>
>
>     Initially, the case that is selected depends on
>       1. Whether the @caseref matches a @name
>       2. Otherwise whether one of the cases has @selected="true"
>       3. Otherwise the textually first case.
>
>     The current text says that if the caseref changes, and no @name
> matches,
>     then the textually first case is selected.
>
>     However, it seems to me reasonable to use the same set of rules for
> both
>     occasions.
>
>     Steven
>
>
>
>
Received on Tuesday, 8 November 2016 17:28:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 8 November 2016 17:28:07 UTC