Iterate
For most non-trivial cases, you’re going to want to utilize logical constructs; the first we’ll cover is the “Iterate” functionality. Iterate allows you to execute further operations for each item in a given variable. The structure is as follows:
<sql:Iterate over="policies" as="policy"> ...operations... </sql:Iterate>