[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Counting proceding elements with the attribute val
> Then I have this XSLT fragment: > <xsl:template match="node"> > <xsl:value-of select="@name" /> > <xsl:if test="following-sibling::attr/@name = @name or > preceding-sibling::attr/@name = @name"> > <!-- here I want to output the number of proceding elements with the > same > value in the name attribute --> > </xsl:if> > </xsl:template> I think the best is <xsl:value-of select="count(../node[@name = current()/@name])"/> Joerg -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|