[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: first n nodes from a current-group
> But I wanted only the first two name elements having highest counts. > that is output like: > Try <School> <xsl:for-each-group select=" School/student group-by="name/tokenize(., ';\s*')"> <xsl:sort data-type="number" select="count(current-group())" order="descending" /> <xsl:sort select="current-grouping-key()"/> <xsl:if test="position() <= 2"> <name count="{count(current-group())}"> <xsl:value-of select="current-grouping-key()"/> </name> </xsl:if> </xsl:for-each-group> </School> Michael Kay http://www.saxonica.com/
|
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
|