W3C home > Mailing lists > Public > public-xformsusers@w3.org > June 2017

Re: Switch/case

From: Liam R. E. Quin <liam@w3.org>
Date: Wed, 28 Jun 2017 23:23:29 -0400
Message-ID: <1498706609.26365.24.camel@w3.org>
To: Steven Pemberton <steven.pemberton@cwi.nl>, XForms <public-xformsusers@w3.org>
On Wed, 2017-06-28 at 12:08 +0200, Steven Pemberton wrote:
> This led to me to realise that I would like switch/case to be a bit
> more  
> flexible: I'd like the cases to match on expressions.

See https://www.w3.org/TR/xquery-31/#id-switch for inspiration.
Also https://www.w3.org/TR/xslt-30/#element-choose for XSLT's version.

switch expressions didn't make it into XPath 3.1, although you can of
course have a chain of if/else expressions.

I like XSLT's use of <when test="..."> since XSLT specifies a
declarative mapping, not control flow.


Liam R. E. Quin <liam@w3.org>
The World Wide Web Consortium (W3C)
Received on Thursday, 29 June 2017 03:23:38 UTC

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