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

Re: repeat clarifications

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Fri, 11 Nov 2016 08:41:15 -0800
Message-ID: <CAAc0PEUH6yqC=xGJXi2CZWa35pBFGM6JhJG2YU8zhw2jBFN0Rw@mail.gmail.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>
Cc: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
>
> https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The
> _repeat_Element
>
> "The repeat collection can be an arbitrary sequence of items."
> I assume this means that they don't have to be of a homogeneous type.
>

It just means sequence of items without any restrictions.

"The nodes in the repeat collection don't have to be in document order"
> Can anybody clarify that for me?
>

Easy:

    <xf:repeat ref="reverse(items/item)">

"the same node can occur multiple times in the repeat collection"
> Anybody got an example?


    <xf:repeat ref="foo, bar, foo, baz">

In XPath 1.0, a nodeset couldn't have duplicate nodes. But in XPath 2.0, a
sequence allows duplicate nodes. It's just a list.

-Erik
Received on Friday, 11 November 2016 16:42:08 UTC

This archive was generated by hypermail 2.3.1 : Friday, 11 November 2016 16:42:08 UTC