[xsl] How do I get a SUM of the string-length of all child nodes ??

Subject: [xsl] How do I get a SUM of the string-length of all child nodes ??
From: "Bovy, Stephen J" <STEPHEN.Bovy@xxxxxx>
Date: Fri, 27 May 2005 02:36:26 -0400
I am not sure how to do this:

here is what I have which is obviously incorrect:

<xsl:template match="/*/*/*" >
  <xsl:param name="rcnt" />
  <xsl:choose>
  <xsl:when test="position()=1">
    <xsl:variable name="csum" select="sum(string-length(.))"/>
rsizes <xsl:value-of select="$rcnt"/> =<xsl:value-of select="$csum"/>;
  </xsl:when>
  <xsl:otherwise>
  bt('<td align="center"> ');
  bt('<xsl:value-of select="."/> ');
  bt('</td> ');
  </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Current Thread