xsl-list
[Top] [All Lists]

Sum by splitting the appended variable

2002-09-04 10:10:55

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



<Prev in Thread] Current Thread [Next in Thread>
  • Sum by splitting the appended variable, KUMAR NINGASHETTY <=