[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: counting element characters
Dimitre Novatchev wrote: Hi > <xsl:template match="a"> > <xsl:variable name="c" as="text()*"> > <xsl:for-each select="descendant::p"> > <xsl:value-of select="string-length(.)"/> > </xsl:for-each> > </xsl:variable> > <xsl:value-of select="sum($c)"/> > </xsl:template> Which can be spelled as following, in order to prevent creating useless text nodes: <xsl:template match="a"> <xsl:value-of select="sum(.//p/string-length(.))"/> </xsl:template> Regards, --drkm _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
|
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
|