xsl-list
[Top] [All Lists]

RE: for-each and summing based on group

2005-01-04 22:45:53
something like this format- the multiple colums are created by a date field 
which is not displayed here.
The main question is regarding the subtotals.

<begin>

<trade>
        <a>
        <step>
                <val>23</val>
        <step>

</trade>
<trade>
        <a>
        <step>
                <val>23</val>
        <step>


</trade>
<trade>
        <a>
        <step>
                <val>23</val>
        <step>


</trade>
<trade>
        <b>
        <step>
                <val>23</val>
        <step>

</trade>
<trade>
        <b>
        <step>
                <val>23</val>
        <step>


</trade>


</begin>

-----Original Message-----
From: Mark Lundquist <ml(_at_)wrinkledog(_dot_)com>
Sent: Jan 5, 2005 12:19 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] for-each and summing based on group



-----Original Message-----
From: dsk [mailto:dmitrik(_at_)mindspring(_dot_)com]
Sent: Tuesday, January 04, 2005 8:09 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] for-each and summing based on group



within a for-each there might be various sets of values which produce the
following grid, where val is equal to a number

a  val val val
a  val val val
a  val val val
b  val val val
b  val val val
c  val val val
c  val val val

what is the best way to insert a sum line for the first
column a, one for b, and one for c.

is a nested for each needed? or checking to see if the following value is
not equal to the preceding, then then summing?

Hi Dmitri,

What Does Your XML Look Like? (tm) :-)

-- Mark



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--