There are a couple of things that make XSLT hard to manage and recursion is indeed one of them. There is just no way of running a traditional for loop. In order to solve this we need either a structure to iterate on, or we can create a template that calls itself with a counter and control number. If you simply need to iterate on an XML structure, you can do a for-each loop like this: < xsl:for-each select = " .//child::title " > <!-- Do you thing --> </ xsl:for-each > However, if you know that you need to iterate on a procedure "i" times, then we need to complicate things a bit. < xsl:template name = " test3 " > < xsl:param name = " counter " /> < xsl:param name = " i " /> <!-- We do our thing... --> < xsl:copy > < xsl:text > Hello...