Use for loops to iterate through lists of medini analyze elements, such as
child elements in SysML or requirements models, to generate list entries, table rows, or
entire document sections.
A for loop begins with {m:for
and ends with
x|elementname}{m:endfor}. The variable x contains the current
element of the iteration.
In the following example, the term req is used as the variable as M2Doc loops
through the list of elements. The result is a numbered list of the requirement names in the
model myRequirementsModel.
Example
{m:for req | myRequirementsModel.requirements}
1. {m:req.name}
{m:endfor}