C:\DITA\WKFS_oXygen_Files\fragments\webhelp.fragment.head.xml
Jump to main content C:\DITA\WKFS_oXygen_Files\fragments\webhelp.fragment.before.body.xml

# Iterators

This section explains how to create an iterator at the Instance Level (Instance element) in a requirements file. Iterators allow authors to repeat content multiple times for containers of a collection (for example, / Txn/Beneficiaries or /Txn/Beneficiaries/Beneficiary). Iterators can be used to print name and address for each /Txn/Beneficiaries/Beneficiary, or for each /Txn/Beneficiaries/Beneficiary[Type='4'] identified in a document. In general, the guidelines for creating an iterator include:

- An REQ file should only have one Iterator, regardless of the number of instances.
- The same node cannot be selected multiple times; you should iterate on the first Owner of the collateral that fits the requirements. The scope will be both Owner and Collateral; the PTR's underneath this Iterator must accommodate the potential for either of those.

Before creating an iterator, verify the Iterator is a parent to the Instance element and that the Business Logic within the Iterator explains all pertinent scenarios.

Note:

- In the PTR for the Iterator, separate each scenario with a pipe ("|").
- When working with iterators within the PTR Editor, the Output Format selector is disabled to prevent output formatting.

C:\DITA\WKFS_oXygen_Files\fragments\webhelp.fragment.after.body.xml