A Stylesheet That Emulates a for Loop

We stressed earlier that the xsl:for-each element is not a for loop; it’s merely an iterator across a group of nodes. However, if you simply must implement a for loop, there’s a way to do it. (Get ready to use recursion, though.)

Get XSLT, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.