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

Re: setvalue on a nodeset

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Tue, 26 Sep 2017 08:58:51 -0700
Message-ID: <CAAc0PEUDE0tgV5A27E8MDxyw=wHKQpwqZqtZnNZ5odYUmmnuSw@mail.gmail.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>
Cc: XForms <public-xformsusers@w3.org>
I've had this wish as well. There is no really good reason to apply the
first node rule here, especially now that `ref` no longer implies a single
node.

Changing this would break backward compatibility of course. You could
introduce an attribute:

  <setvalue ref="a[condition]" value="..." all="true"/>

but that looks a bit awkward.

A workaround is to write:

  <setvalue iterate="a" ref="." value="..."/>

-Erik



On Sun, Sep 24, 2017 at 4:41 AM, Steven Pemberton <steven.pemberton@cwi.nl>
wrote:

> I find myself today with a form where in three places I want
>
>    <setvalue ref="a[condition]" value="..."/>
>
> to set *all* matching nodes.
>
> Steven
>
>
Received on Tuesday, 26 September 2017 15:59:37 UTC

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