- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Tue, 23 Jan 2018 09:07:18 -0800
- To: Steven Pemberton <steven.pemberton@cwi.nl>
- Cc: XForms <public-xformsusers@w3.org>
Received on Tuesday, 23 January 2018 17:08:04 UTC
> > <instance> > <data xmlns=""> > <item>one</item><item>two</item><item>three</item> > </data> > </instance> > > <repeat ref="item"> > <output ref="."/>, > <output value="last()"/>, > <output value="position()"/> > </repeat> > > Question one: > > Should it output > > one, 1, 1 > two, 1, 2 > three, 1, 3 > > or > > one, 3, 1 > two, 3, 2 > three, 3, 3 > The latter. `last()` and `position()` go together, and `position()` must be smaller than or equal to `last()`. A common use case is to test for `position() = last()` to find the last item in a sequence. Question two: What is the difference between the 'repeat position', and the > position of the repeat item context? > None as far as I an tell! -Erik
Received on Tuesday, 23 January 2018 17:08:04 UTC