|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How to unflatten the source XML ?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








