Document Developer - instructions > XPath > Output of data in same order as input data

Output of data in same order as input data
StoryTeller has a design-driven approach, i.e the order in which data is rendered depends on how you design the document rather than the input data order. If you for example repeat a block in a table row, all instances of the block of the input data will be rendered within the repeater.
For example, your input data have instances of blocks coming in the following order:
block1
block1
block2
block2
block1
The repeater will then render the three block1 instances before the block2 instances are rendered.
By using a nested repeater construction with wildcard selection and self axis filtering (the axis referring to the current node), you can obtain a data-driven behavior:
Click to enlarge
Figure 40
The root repeater selects all blocks ( *[*] means selecting all child nodes that have children, i.e. blocks).
The first child repeater selects the current block if it is a block1 instance, that is the first two instances and the last instance .
Correspondingly, the second child repeater selects instance three and four in the input data example above.
OpenText StreamServe 5.6 Updated: 2013-03-01