Re: repeat clarifications

>
> 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