Document Developer - instructions > XPath > Repeater XPath

Repeater XPath
A repeater has an XPath defining a set of nodes. For example, a Message can contain a set of fields defined for a block, where the repeater repeats all instances of these fields.
When you have specified a repeater to select a block, the repeater defines the set of XPath nodes, i.e. the fields. During runtime, the field that currently is processed becomes the context node, which together with the position in the node set and the size of the node set defines the current XPath context.
Because the node set has already been defined when specifying the repeater to select the block, the fields within the block that you select to render are not accessed via the /data/message/blockname/fieldname path, but instead via the relative fieldname path.
*
Conditional selection
You can specify an XPath on a repeater to only render block data that contain specific values.
For example:
/data/message/blockname[date="2010-11-29"]
This XPath selects all nodes of blockname where the value of the date field equals 2010-11-29.
Traversing data defined by repeaters
You have access to a set of script functions that lets you traverse a set of nodes, e.g. the fields within a block, and select one of the nodes within the block to temporarily become the context node.
For example, this can be useful if you need to prepare data before a chart is rendered. For example, to:
The starting position for traversing the node set is defined by the repeater where you add the script. Via the script, you push the node set onto a separate memory stack where the data handling occurs. After the script execution, the context node is reset to the node that was the context node before executing the script.
For a description of the XPath traversing script functions, see the script functions starting with stXPath in the Scripting Reference.
Note:
OpenText StreamServe 5.6 Updated: 2013-03-01