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

Re: Convert the sign of a number

Subject: Re: Convert the sign of a number
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 5 Jul 2001 12:26:29 +0100
moneytrade
> function convertSign(balance)

Isn't that a rather complicated way of multiplying by -1?

It would be easier to have offered help if you'd have supplied a small
test file with more than one item (to have something to add) and without
all the superflous stuff like TradeHolderIdentifier etc, but
If I understand the question I think you want to generate a table of
running totals which is something like

<xsl:template match="RetrieveTransactionHistory2RSResponse">
<table>
<tr><td></td><td><xsl:value-of select="CurrentBalance"/></td></tr>
<xsl:apply-templates select="Items/Item[1]">
  <xsl:with-param name="x" select="CurrentBalance"/>
</xsl:apply-templates>
</table>
</xsl:template>

<xsl:template match="Item">
 <xsl:param name="x" select="0"/>
 <tr>
  <td>
  <xsl:value-of select="MoneyTrade"> <!-- guessing this is the
     element to sum, you didn't say -->
  </td>
  <td>
  <xsl:value-of select="$x+MoneyTrade"/>
  </td>
  </tr>
  <xsl:apply-templates select="following-sibling::Item[1]">
    <xsl:with-param name="x" "$x+MoneyTrade"/>
  </xsl:apply-templates>
</xsl:templates>

David
(untested)

> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or

You do realise you posted that to a mail server which will archive the
text for public access on the web?


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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.