[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Totalling A Set of Values

Subject: Totalling A Set of Values
From: "Allistair Crossley" <Allistair.Crossley@xxxxxxx>
Date: Fri, 13 Jun 2003 12:43:28 +0100
set of values
(sorry if this is a repost - i did not see my last one come onto the list)

> Hello,
> 
> I have an XML tree that contains lots of these blocks..
> 
> <employee name="bob" deparment="sales">
>   <holiday date="120603" type="X" />
>   <holiday date="120703" type="X" />
>   <holiday date="120803" type="Y" />
>   <holiday date="120903" type="Z" />
> </employee>
> 
> I have created XSL that outputs something like this for each department
> 
> Sales
>   Bob  | 2 X Days | 1 Y Day | 1 Z Day
>   Sam | 3 X Days | 2 Y Day | 1 Z Day
> 
> I have been doing this using the count() function, counting employee/holiday[@type='X'] for example.
> 
> At the end of each department I need to total the number of X days. I am hoping there is a nice elegant way to do this but I do not know how. I do know I cannot incremement a variable because I tried this and also read it.
> 
> Help appreciated.
> 
> 
> Allistair Crossley 
> Senior Intranet Developer
> QAS Ltd 
> Direct Dial: 020 7819 5343 
> 


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.