Iterators enables the direct expression of the repeated application of the same process body. It specifies the control flow so that the output of the previous instance of the process can be the input of the next one.
The iterator is not an abstract process but rather a constructor of the Transmorpher language. It cannot be refined. The iterator can take several input and output channels and a channels attribute which allows users to specify the data flow within the iterator: output is copied to the channels channels so that it can be compared with the next output.
The repeat element introduces the use of an iteration in a process body. Its structure is the following:
The bibliography example does not use iterators, so here is a simple example.
The iterator element introduces the use of a variable which will be iterated over a particular structure. It must contain a name, a type and a number of other parameters that will specify its behavior.
For instance,
Because, the iterators runs the same process several times, it is necessary to know what happens with the flows in the channels. The channels within an iterator are special channels (called feedback) which allows the otput to be reused as input. For instance,
Next chapter: Queries