xsl-list
[Top] [All Lists]

[xsl] Conditional Totalling

2006-09-12 03:59:20




Hi all,

Please find below the piece of XML and XSL,

Using the below XSL to get total of node qty, how to get the total qty
based on the Value of all

ie if all="L" and  if all="L" separately as subtotal.

Thanks & Regards
Eugene

...XML.......

<?xml version="1.0" ?>
    - <mcr>
      - <ru>
          <grade all="H">AMX Value</grade>
          <qty>550.00</qty>
          <val>77550.00</val>
      </ru>
      - <ru>
          <grade all="L">BMX Value</grade>
          <qty>3799.50</qty>
          <val>175308.93</val>
      </ru>
      - <ru>
          <grade all="L">CMX Value</grade>
          <qty>3799.50</qty>
          <val>175308.00</val>
      </ru>
    </mcr>


  .....XSL.........

<th align="right">
<xsl:value-of select="format-number(sum(mcr/ru/qty),'############.##')" />
</th>


                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
                                                                            
         * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *        
                                                                            
                                                                            
                                                                            
 The   information  contained  in  this message is  legally  privileged and 
 confidential   information  intended  only   for the use of  the addressed 
 individual   or  entity   indicated  in this  message (or  responsible for 
 delivery   of  the  message to such person).  It must not be read, copied, 
 disclosed,  distributed  or  used  by any person other than the addressee. 
 Unauthorised  use, disclosure or copying is strictly prohibited and may be 
 unlawful.                                                                  
                                                                            
 Opinions, conclusions  and other information on  this message  that do not 
 relate  to  the  official business of  any of the constituent companies of 
 the  SANMAR GROUP  shall  be  understood as  neither given nor endorsed by 
 the Group.                                                                 
                                                                            
 If  you   have  received  this  message in error,  you should destroy this 
 message and kindly notify the sender by e-mail.                            
                                                                            
 Thank you.                                                                 
                                                                            
         * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *        
                                                                            





--~------------------------------------------------------------------
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>