[Home] [By Thread] [By Date] [Recent Entries]
Hi,
> Would you please tell me how to group fixed number (say 3) of
> consecutive node together?
<xsl:template match="*[item]">
<xsl:for-each select="item[position() mod 3 = 1]">
<group id="{position()}">
<xsl:copy-of select=". | following-sibling::item[position() < 3]"/>
</group>
</xsl:for-each>
</xsl:template>
Cheers,
Jarno - Project Pitchfork: Carrion
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



