This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Another sum question


I'm trying to sum attribute values by key. Multiple rows can have the same
key and I want to sum attributes of these rows. My XML looks like this:

<Row SORTKEY="1999D MN1 45759" GROSSAMT="+00000002917" />
<Row SORTKEY="1999D MN1 05133" GROSSAMT="+00000002978" />
<Row SORTKEY="1999D MN1 02057" GROSSAMT="+00000003115" />
<Row SORTKEY="1999D MN1 29354" GROSSAMT="+00000003580" />
<Row SORTKEY="2000D MN1 06944" GROSSAMT="+00000003730" />
<Row SORTKEY="2000D MN1 20763" GROSSAMT="+00000003914" />
<Row SORTKEY="2000D MN1 28002" GROSSAMT="+00000013962" />
					

For rows that have the matching first 10 chars of the SORTKEY, I want to get
a total for the GROSSAMT. So, for the first 4 rows, I want the total of the
GROSSAMTs. Same for the last 3 rows. 

Any help is greatly appreciated!

-Suraiya

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]