W3C home > Mailing lists > Public > public-forms@w3.org > December 2011

Re: Expand data model of ref to an arbitrary sequence

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Thu, 1 Dec 2011 14:14:11 -0800
Message-ID: <CAAc0PEVxG9Hop7PG+vK5jpqtLn-r=QqfqhKCAVCjH4kHXhrLMQ@mail.gmail.com>
To: Public Forms <public-forms@w3.org>
Nick & all,

We already implement this and didn't need a separate attribute.

Note that in XForms 1.1, repeat node-set updates are based on node
identity, which is fine. However for atomic values, the update must be
based on equality. At least, that's how we have implemented it, but it
seemed reasonable as you cannot keep a reference to an atomic value.

So if you have as ref value the sequence:

  1, 2, 3

and the sequence changes to:

  3, 1, 2

the last iteration is moved to the first position.

Note that with XPath 2 you can have an item more than once in a sequence,
whether they are nodes or atomic values. So the question of what happens
with duplicates when the repeat updates needs to be specified too.

-Erik

On Thu, Dec 1, 2011 at 6:50 AM, Nick Van den Bleeken <
Nick.Van.den.Bleeken@inventivegroup.com> wrote:

>  You have use cases were you want to repeat over a sequence of atomic
> values.
>
>  Example: <xf:repeat ref="1 to 5">
>
>  Are we going to expand the data model of ref to an arbitrary sequence?
> Or should we introduce a separate attribute for this?
>
>  I prefer to extend the data model of ref (we deprecated node set to make
> it easier for the form editor). I know that it might be a bit strange to
> reference things that aren't in an instance, but I don't think that it
> justifies the complexity of adding another attribute for it.
>
> Kind regards,
>
> Nick Van den Bleeken
> R&D Manager
>
> Phone: +32 3 821 01 70
> Office fax: +32 3 821 01 71
> nick.van.den.bleeken@inventivegroup.com
> www.inventivedesigners.com
>
>
>
>
> ------------------------------
>
> Inventive Designers' Email Disclaimer:
> http://www.inventivedesigners.com/email-disclaimer
>
Received on Thursday, 1 December 2011 22:15:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:56 UTC