Subject: RE: get the sum of a sequence of numbers
From: Karen McAdams <kemcadams@xxxxxxxxx>
Date: Wed, 26 Apr 2006 13:29:55 -0700 (PDT)
|
That does not seem to work in this situation. Do I need to define the data type of the sequence?
<xsl:template mode="mb" match="*[contains(@language, 'multi-byte')]">
<xsl:value-of select="count(tokenize(lower-case(.),'(\s|[,.!:;]|[$][n][b][s][p][;])+')[string(.)])"/>
</xsl:template>
<xsl:variable name="mb">
<xsl:apply-templates mode="mb"/>
</xsl:variable>
<xsl:variable name="mbt" select="sum(for $n in number($mb) return number($n))"/>
Karen
|