Re: switch

On Tue, 08 Nov 2016 18:39:53 +0100, Erik Bruchez <ebruchez@orbeon.com>  
wrote:

>> <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).
Ooh! I like your thinking!

Steven

>
> -Erik

Received on Wednesday, 9 November 2016 07:36:20 UTC