xsl-list
[Top] [All Lists]

RE: [xsl] get the sum of a sequence of numbers

2006-04-26 13:40:46
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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>