[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: get the sum of a sequence of numbers
Try: sum(for $n in $mb return number($n)) Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Karen McAdams [mailto:kemcadams@xxxxxxxxx] > Sent: 25 April 2006 23:09 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: get the sum of a sequence of numbers > > I think this should be easy to do but techniques I am using > arent working. > > I have template that returns the word count of topics that > contain language attributes and assigns it to a sequence. T > > Problem is that when I want total the numbers stored in the > sequence using <xsl:variable name="mbt" > select="sum(number($mb))"/> what I get are the numbers > concatenated together when what I want is the total sum of > the values of numbers of which the list consists. > Suggestions on the correct way to do this in XSL2.0? thanks. > > --------------------Karen McAdams
|
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
|