View Single Post
  #2 (permalink)  
Old 06-10-2007, 05:21 PM
Fahd Shariff
Posts: n/a
Try this stylesheet. Note it uses version2.0, so may not be compatible with some browsers.

<xsl:stylesheet version="2.0"
xmlnssl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes"/>
<xsl:template match="books">
<books>
<xsl:for-each-group select="author"
group-by="concat(fname,'/',lname)">
<author>
<xsl:copy-of select="fname,lname"/>
<books>
<xsl:for-each select="current-group()">
<book>
<xsl:copy-of select="bookName,bookRank"/>
</book>
</xsl:for-each>
</books>
</author>
</xsl:for-each-group>
</books>
</xsl:template>
</xsl:stylesheet>

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!