how to use for-each-group?

Dodgyyyy

New Member
my xml:\[code\]<articles> <article><metadata><type>work</type></metadta><content>work force</content> </article> <article><metadata><type>sport</type></metadta><content>cricket s gentle man game</content> </article> <article><metadata><type>Life</type></metadta><content>Life is beatiful</content> </article> </articles>\[/code\]my xsl:\[code\]<xsl:for-each-group select="article" group-by="type"><xsl:for-each select="current-group()"><xsl:value-of select="content/></xsl:for-each></xsl:for-each-group>\[/code\]I am getting:work forcecricket s gentle man gameLife is beatifulwork forcecricket s gentle man gameLife is beatifulwork forcecricket s gentle man gameLife is beatiful(i.e, no of type)just i need:work forcecricket s gentle man gameLife is beatiful
 
Back
Top