xslt - adding every n node?

前端 未结 2 1021
粉色の甜心
粉色の甜心 2021-01-14 14:53

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

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-14 15:07

    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.

提交回复
热议问题