Specifying the Items for Repeat

Mark Birbeck's picture

For the Flickr form we want a repeating structure that has as many entries as there are photo items in the returned XML. The XPath to create a list of photo items is:

instance('inst-rs')/photos/photo

We can use this expression to set up a repeating structure that operates on each returned photo, by adding the following to the form just after the output that shows any error results:

      </xf:output>
      <xf:repeat nodeset="instance('inst-rs')/photos/photo">
        [...]
      </xf:repeat>
    </xf:group>