[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: string-length of all label attributes
> You need to write a recursive template that goes throught the nodes
in the node-set and sums the string-lengths, or if you're using XPath
2.0, then something in the lines of sum(for $i in //@label return
string-length($i)).
Or you can get all the labels inside a variable and get the length of that variable: <xsl:template match="/"> <xsl:variable name="labels"> <xsl:for-each select="//@label"> <xsl:value-of select="."/> </xsl:for-each> </xsl:variable> <xsl:value-of select="string-length($labels)"/> </xsl:template> Hope that helps, George ----------------------------------------------- George Cristian Bina <oXygen/> XML Editor & XSLT Editor/Debugger http://www.oxygenxml.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
|