[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Sum by splitting the appended variable

Subject: Sum by splitting the appended variable
From: "KUMAR NINGASHETTY" <KNINGASHETTY@xxxxxxxxxxxxxxxx>
Date: Wed, 04 Sep 2002 13:10:55 -0400
sum by
Hi ..
     
     I am supposed to do an average of date-Difference . I am explicitly calculating date-difference using one of the EXSLT functions by Jeni.
    And now i need to Avg  across these Date-difference numbers. This is how i am doing presently and getting it appended in variable .

                 <xsl:variable name="dateDiffNum">
                           <xsl:for-each select="loop over Noded Set with start and End Dates ">
                                        
                                    -      Get start Date
                                    -     Get End Date
                                          
                                         <xsl:call-template name="date:difference">
                                                    Pass args
                                         </xsl:call-template>
             
                   </xsl:for-each>

                  If the number for date difference for each iteration is 5, 6 and 7 consecutively then the variable "dateDiffNums='567'"

                 I need actually 5+6+7 =18   from this variable .So i need to do some kind of splitting and write a recursive template to do the SUM ..
       
                 I have not been successful writing the template for sum of this nature ..
any ideas,,

Thanks everyone
- kumar



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.