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

Re: For ACTION-2072

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Wed, 28 Sep 2016 14:50:06 +0200
To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>, "Erik Bruchez" <erik@bruchez.org>
Message-ID: <op.yoh29sz3smjzpq@steven-aspire-s7>
<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.


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 12:50:49 UTC

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