SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    xsl and running variable total?

    Hi all,

    Just wondering if it is possible to keep a running total with an xsl variable?
    My XML..

    - <master level="1">
    <detail name="svc_pkg_id">8674</detail>
    <detail name="tos_code">R79.0</detail>
    <detail name="nomn_dth">0</detail>
    <detail name="desc_message">Unequal</detail>
    <detail name="u_d_ind">U</detail>
    <detail name="rundate">11/5/2008 4:15:49 PM</detail>
    </master>
    - <master level="1">
    <detail name="svc_pkg_id">8671</detail>
    <detail name="tos_code">G70.0</detail>
    <detail name="nomn_dth">28131</detail>
    <detail name="desc_message">Unequal</detail>
    <detail name="u_d_ind">D</detail>
    <detail name="rundate">11/5/2008 4:15:49 PM</detail>
    </master>

    Now (there is alot more than this)...however what I need to do is group the "nomn_dth" totals per "u_d_ind" indicator at the end of the xsl report. I'd prefer to do this via xsl instead of altering the huge stored proc that creates this xml file.

    Any help is appreciated......! Thanks!

  2. #2
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Find all the unique u_d_ind values, and then iterate through them using sum() on nomn_dth?

    Specifics escape me been a while since used XSLT, but thats how you do it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •