about xslt count()

Inkognito

New Member
I want to simply have a textual output that shows the song title and the number of the weeks that ranked #1. But, I don't know how to use count in xslt. Can anyone help me find out what's wrong with my code? The codes I have right now doesn't have any output.\[code\]<?xml version='1.0'?><xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output encoding="UTF-8" omit-xml-declaration="yes" /> <xsl:template match="/"> <xsl:for-each select="popular-recordings-dataset/recording"> <xsl:sort select="count(//rank[. = '1'])" order="descending"/> <xsl:value-of select="concat(title, ' / ', count(//rank[. = '1']),'
')" /> </xsl:for-each> </xsl:template> </xsl:stylesheet>\[/code\]
 
Back
Top