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

Re: switch

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Tue, 8 Nov 2016 09:39:53 -0800
Message-ID: <CAAc0PEV5ELgQgpaEZtAm0h0FcTisJ=MU1NX=G4cj9-YnGMhUQQ@mail.gmail.com>
To: Nick Van den Bleeken <Nick.Van.den.Bleeken@inventivegroup.com>
Cc: Steven Pemberton <steven.pemberton@cwi.nl>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
>
> <xf:switch ref=”.[../payment-method = ‘credit’]”>…
>
> If we re-purpose ref to also be the case-ref, this use case won’t work
> anymore…
>

I think it would still work as before. IIUC, Steven suggests that in
addition, `ref` would be used to read and write the currently-selected case
value.

I like the idea but I think backward compatibility is a concern. For
example, if we are not careful, `<switch>` could start writing values to
instance data with the new suggested behavior, while in the past it
wouldn't.

If we say that the "caseref" behavior is only enabled when there is at
least one `<case>` with a `name` attribute, when I think that could work as
existing `<switch>`es wouldn't have `name` attributes (except by mistake).

-Erik
Received on Tuesday, 8 November 2016 17:40:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 8 November 2016 17:40:46 UTC