I found an elegant solution for that problem here: xsl for-each: add code block every n rows?
I\'d like to understand the xslt code and I was wondering if you could
The first template matches position 1 and 7, the second template is called from within the first template to output all the siblings. The last template matches position 2,3,4,5,6,8 and 9 so that noting happens to those positions again..like a do nothing-template.