473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to sort an XML with Group and sub total in XSLT 1.0 and create another XML?

Here is my XML. After sorting I need to have a new XML sorted and Grouped by <TransCode>, and all <TransAmt> should be summed for each group. I will have to use XSLT 1.0. I'm looking for the XSL for this task. Any help is appreciated.

Regards
JP

Here is my XML
<Transactions>
<Transaction>
<TransCode>0008</TransCode>
<TransType>Purchase</TransType>
<TransAmt>12.30</TransAmt>
</Transaction>

<Transaction>
<TransCode>0002</TransCode>
<TransType>Cash</TransType>
<TransAmt>26.00</TransAmt>
</Transaction>

<Transaction>
<TransCode>0008</TransCode>
<TransType>Purchase</TransType>
<TransAmt>25.00</TransAmt>
</Transaction>

<Transaction>
<TransCode>0015</TransCode>
<TransType>FinanceCharge</TransType>
<TransAmt>25.00</TransAmt>
</Transaction>

<Transaction>
<TransCode>0002</TransCode>
<TransType>Cash</TransType>
<TransAmt>50.00</TransAmt>
</Transaction>

<Transaction>
<TransCode>0008</TransCode>
<TransType>Purchase</TransType>
<TransAmt>40.00</TransAmt>
</Transaction>
</Transactions>
Aug 15 '10 #1
0 873

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Rob | last post by:
I haven't a clue how to accomplish this. All the data is in one table. The data is stored by registration date and includes county and number of students brokne out by grade. Any help...
1
by: Rajani | last post by:
Hello, I have a table(msaccess) with the structure... job_code text 6 style text 10 qty number fabrication text 65 ship_date date/time
1
by: Omega375 | last post by:
Hello. I'll first start off by showing the structure of my xml-file. <root> <node path="X"> More nodes containing data </node> </root>
2
by: Ron Vecchi | last post by:
Is there a way to use <xsl:sort> to sort by date. Sample xml doc I want to perform sorting on --------------------------------------------- <Parent> <child> <date>10/10/2003</date>...
0
by: Ray | last post by:
By - Ascending - Group Header & Footer supplier - Ascending - Group Header only SuppliersModel - Ascending - Group Header & Footer I need to count distinct numbers of supplier and supplier model...
3
by: Pecanfan | last post by:
Hi, I've got an access report which contains a sub-report. The sub-report contains various items in a group Footer which culminates in a running sum text box called txtGrandTotal. I want to...
12
by: Gerrit Beuze | last post by:
Hi all, I'm wondering if you how you organize as (in sorting / order) your C# class code: Do you sort/ group by member type: fields, methods, properties etc.? If yes: what ordering scheme do...
7
by: pstachy | last post by:
Hi all, I'm having problem with XSLT transformation concerned with sort and numberings at a time. I wish to have my registries sorted alfabetically and would like them to have numberings at a...
7
by: Sunil Korah | last post by:
Hi, I haven't used access reports much. I have a problem in getting the total of a group. I have 3 fields, ProgName (Program name), Pname (Participant's name) and PCategory (Participant...
15
klarae99
by: klarae99 | last post by:
I am working on an Inventory Database in Access 2003. I am working on a report that I could print when its time to file our State Sales Tax paperwork. The figures I need for this report are Total...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.