Results 1 to 2 of 2

Thread: XML question - urgent

  1. #1

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159

    XML question - urgent

    Hi,

    I am trying to write an XSL stylesheet that will produce a summary of some input XML data. I have the code as below: -

    Code:
    <xsl:for-each select="whatever"...>
      <xsl:choose>
        <xsl:when test="whatever">
          'add current node value to running total
        </xsl:when>
      </xsl:choose>
    </xsl:for-each>
    So I want to loop a load of nodes, and keep a running total - I don't know how to do this..... does anybody? After the code above I will need to place the value in a summary block. Would I use a variable? If so, how?

    Please please help!!!

    DJ

  2. #2
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196
    As far as I know variables can only be set once.
    Code:
    <xsl:value-of select = "sum(//nodeset)" />

Posting Permissions

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



Click Here to Expand Forum to Full Width