While there is a lot in common between this op script and the previous recipes that we've worked with, there are also some new techniques in this recipe that require explanation. I'll call them out piece by piece.
Steps 1 and 2 are pretty regular now and form the part of most, if not all, op scripts. In step 3, we have something new, however: a SLAX template. SLAX templates are small usable components of XML and SLAX that can be called upon as required with parametric input. It can be convenient to think of templates like a function call in conventional programming languages.