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

Re: For ACTION-2072

From: Erik Bruchez <erik@bruchez.org>
Date: Wed, 28 Sep 2016 09:12:11 -0700
Message-ID: <CAAc0PEX1GpZF8HcyTOnN1qJPA+9MFTPKC=vKfmKfhcb9YppQ_w@mail.gmail.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>
Cc: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
For reference, following today's call, we are picking `name`.

-Erik

On Wed, Sep 28, 2016 at 5:50 AM, Steven Pemberton <steven.pemberton@cwi.nl>
wrote:

> <switch ref="/payment/details" caseref="@method">
>   <case item="creditCard">
>
> <switch ref="/payment/details" caseref="@method">
>   <case match="creditCard">
>
> <switch ref="/payment/details" caseref="@method">
>   <case selection="creditCard">
>
> I'll see if I can find any others.
>
> Steven
>
>
> On Wed, 28 Sep 2016 06:45:32 +0200, Erik Bruchez <erik@bruchez.org> wrote:
>
> All,
>
> We discussed the `caseref` attribute during last call.
>
> One question is the name of the attribute to add to `<xf:case>`. We
> thought about:
>
> -` value`
>   - would have to be an XPath expression for compatibility with other uses
> - `name` has the following uses:
>   - on `<xf:dispatch>`: name of the event
>   - on `<xf:property>`: name of the context information to pass
>   - on `<xf:var>`: name of the variable
>   - on `<xf:header>`: name of the header(s)
>
> The drawback of `value` is that in the most common scenario, the value to
> store is a constant. But you would have to quote the value if it is an
> XPath expression, as in:
>
>   <xf:case value="'vanilla'">...</xf:case>
>
> If we use `name`, we can make it an AVT, which makes the common scenario
> easier while still allowing dynamic expressions.
>
> The drawback of `name` is that there are a few uses but none denotes
> something to store into instance data. Usually, we store things we call
> "values". In particular, selection items have values.
>
> On the other hand it probably makes as much sense to talk about "the name
> of a case" as it does to talk about "the value of a case".
>
> So I am a bit torn. Does anybody have a preference? Is there any other
> proposal besides `value` or `name` for this attribute?
>
> -Erik
>
>
>
>
>
Received on Wednesday, 28 September 2016 16:13:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:46 UTC