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

Summary Totals by Type

Subject: Summary Totals by Type
From: Ron Grimes <rgrimes@xxxxxxxxxxxxxxx>
Date: Fri, 28 Jul 2000 10:50:26 -0600
Summary Totals by Type
Any help I could get with this would be greatly appreciated.

I am trying to create summary totals by type. Given the following,

<flexact xmlns="x-schema:flexact-schema.xml">
  <description>Flexible Spending Account(s)</description>
  <fsatrans>
    <transtype>Claim</transtype>
    <transdate>2000-05-08</transdate>
    <transamount>130.00</transamount>
  </fsatrans>
  <fsatrans>
    <transtype>Reimbursement</transtype>
    <transdate>2000-06-10</transdate>
    <transamount>130.00</transamount>
  </fsatrans>
</flexact>

So, how can I change this function to give me YTD totals for just transtype
= "Claim"?

<xsl:script><![CDATA[
    function ytdClaims(node) {
      total = 0;
      claims = node.selectNodes("/flexact/fsatrans/transamount");
      for (c = claims.nextNode(); c; c = claims.nextNode())
	  total += c.nodeTypedValue;
        return formatNumber(total, "$###,##0.00");
    }
]]></xsl:script>


Thanks,
Ron Grimes


 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.