| Subject: [xsl] Sum by splitting the appended variable From: "KUMAR NINGASHETTY" <KNINGASHETTY@xxxxxxxxxxxxxxxx> Date: Wed, 04 Sep 2002 13:10:55 -0400 | 
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 | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Accessing inline XML sche, David Carlisle | Thread | RE: [xsl] XSLT/XPath help to resolv, thomas . cherel | 
| Re: [xsl] add elements, Mike Brown | Date | Re: [xsl] j2sdk1.4.0 xslt and setPa, Joerg Heinicke | 
| Month |