[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Know repeated values
IZASKUN GUTIERREZ GUTIERREZ wrote:
Hello everybody! You can use xsl:for-each-group and count the current-group() sequence: <xsl:template match="/"> <xsl:value-of select="file/entry/@id"/> <xsl:text>.</xsl:text> <xsl:for-each-group select="file/entry/@id" group-by="."> <xsl:variable name="count" select="count(current-group())"/> <xsl:if test="$count > 1"> <xsl:value-of select="concat(current-grouping-key(), ' repeated ', $count, ' times.')"/> </xsl:if> </xsl:for-each-group> </xsl:template> -- Martin Honnen http://JavaScript.FAQTs.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
|