[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Subject: Counting Path Occurrences
On 3/30/07, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
<xsl:for-each-group select="//*/string-join(ancestor-or-self::*/name(), '/')" group-by="."> <xsl:sequence select="concat('
', ., ' - ', count(current-group()))"/> </xsl:for-each-group> Nice solution. Except, if we change slightly the concat to following (please note a starting '/'): concat('
', '/', ., ' - ', count(current-group())) We'll get exactly what the OP wants. -- Regards, Mukul Gandhi
|
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
|