xsl-list
[Top] [All Lists]

Re: [xsl] Conditional Totalling

2006-09-12 20:34:30
Hi,

Thanks, It works.

Regards
Eugene


                                                                           
             George Cristian                                               
             Bina                                                          
             <george(_at_)oxygenxml                                          To 
             .com>                     
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com     
                                                                        cc 
             12.09.2006 05:29                                              
             PM                                                    Subject 
                                       Re: [xsl] Conditional Totalling     
                                                                           
             Please respond to                                             
             xsl-list(_at_)lists(_dot_)mu                                       
      
              lberrytech.com                                               
                                                                           
                                                                           




Hi,

Just select the nodes you want to sum, for instance:

<xsl:value-of
select="format-number(sum(mcr/ru[grade/@all='L']/qty),'############.##')"
/>

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


jeb501(_at_)sanmargroup(_dot_)com wrote:



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


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




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