Subject: Re: [xsl] Conditional Totalling From: jeb501@xxxxxxxxxxxxxxx Date: Wed, 13 Sep 2006 08:40:47 +0530 |
Hi, Thanks, It works. Regards Eugene George Cristian Bina <george@oxygenxml To .com> xsl-list@xxxxxxxxxxxxxxxxxxxxxx cc 12.09.2006 05:29 PM Subject Re: [xsl] Conditional Totalling Please respond to xsl-list@xxxxxxxx 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@xxxxxxxxxxxxxxx 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. > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Conditional Totalling, George Cristian Bina | Thread | [xsl] Namespace and XSL Variables, Trish |
Re: [xsl] Sum in conjunction with s, Dimitre Novatchev | Date | [xsl] namespace cleanup for XHTML d, Wolfgang Jeltsch |
Month |