Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 25th, 2007, 07:55 PM
Registered User
 
Join Date: Jan 2007
Location: Denver, Colorado, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to northwind Send a message via Yahoo to northwind
Default Getting the Total

==================XML============
<Process>
<BCC>
    <Queues>
    <QueueName>BCC</QueueName>
    <Total>45</Total>
    <Date>2007-04-19T00:00:00-06:00</Date>
    </Queues>

        <Queues>
    <QueueName>BCC_DISCREP</QueueName>
    <Total>2</Total>
    <Date>2007-04-19T00:00:00-06:00</Date>
    </Queues>

    <Queues>
        <QueueName>BCC_HOLD</QueueName>
    <Total>158</Total>
    <Date>2007-04-19T00:00:00-06:00</Date>
    </Queues>

    <Queues>
    <QueueName>BCC</QueueName>
    <Total>41</Total>
    <Date>2007-04-19T00:00:00-06:00</Date>
    </Queues>

        <Queues>
    <QueueName>BCC_DISCREP</QueueName>
    <Total>2</Total>
    <Date>2007-04-19T00:00:00-06:00</Date>
    </Queues>

    <Queues>
    <QueueName>BCC_HOLD</QueueName>
    <Total>158</Total>
    <Date>2007-04-19T00:00:00-06:00</Date>
    </Queues>

    <Queues>
    <QueueName>BCC</QueueName>
    <Total>40</Total>
    <Date>2007-04-18T00:00:00-06:00</Date>
    </Queues>

        <Queues>
    <QueueName>BCC_DISCREP</QueueName>
    <Total>2</Total>
    <Date>2007-04-18T00:00:00-06:00</Date>
    </Queues>

        <Queues>
    <QueueName>BCC_HOLD</QueueName>
    <Total>159</Total>
    <Date>2007-04-18T00:00:00-06:00</Date>
    </Queues>

</BCC>
</Process>

=======================xml=======

How to code it in xslt:

I wanna get the sum of all the <total> having the same date

Writing Software Application is just setting instructions to the code and there is nothing impossible.
Reply With Quote
  #2 (permalink)  
Old April 26th, 2007, 03:40 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

This is quite easy in version 2.0 but if you are still on version 1.0, and most people are, then it looks like you need to use one of the standard grouping techniques. See the first post in this forum for a good tutorial on this. You will be grouping the queues based on the date but instead of for-each against the individual groups just use sum(Total). If you're still having problems then come back with more details.

--

Joe (Microsoft MVP - XML)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sub Total Rjh Reporting Services 0 June 21st, 2006 04:11 PM
Matrix Sub Total r_ganesh76 Reporting Services 1 March 9th, 2006 06:27 AM
Grand Total mateenmohd Access 6 April 8th, 2005 07:30 AM
Running Total jdmorr SQL Language 5 March 9th, 2005 03:28 PM



All times are GMT -4. The time now is 06:18 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.