|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: summing attributes problem
Just replace:
<total><xsl:value-of select="sum(current-group()[self::po/@cases])"/></total> with: <total>
<xsl:value-of
select="sum(current-group()[self::po]/@cases)"/>
</total>-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play On 10/27/06, Kent Seegmiller <hookjaw20@xxxxxxxxxxx> wrote: Hi ya'll, I have a source file as such: <alldata> <load> <start>04/01/06 06:00</start> <stop>04/01/06 07:30</stop> <loadnum>300382</loadnum> </load> <po num="9865900" cases="206" /> <po num="9872940" cases="5" /> <po num="9877320" cases="290" /> <po num="9880590" cases="450" /> <po num="9880600" cases="418" /> <po num="9886650" cases="282" /> <load> <start>04/01/06 06:00</start> <stop>04/01/06 07:30</stop> <loadnum>300166</loadnum> </load> <po num="9873530" cases="630" /> <po num="9880740" cases="1008" /> ... </alldata> I want to group the po elements with their previous sibling load and sum the @cases to get:
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







