G Guest Jan 29, 2004 #2 here is a short sample that should get you started <xsl:for-each select="Ledger/*"><xsl:value-of select="user:Total(.))"/ xsl:for-each><msxsl:script implements-prefix='user' language='C#' decimal balance = 0 void Total(XPathNodeIterator iter) XmlNode node = e.NextNode() string s = node.SelectSingleNode("amount").InnerText decimal amount = Decimal.Parse(s) if (node.Name == “deposit†|| node.Name == “balance†balance += amount els balance -= amount return balance ]] msxsl:script ht jayson
here is a short sample that should get you started <xsl:for-each select="Ledger/*"><xsl:value-of select="user:Total(.))"/ xsl:for-each><msxsl:script implements-prefix='user' language='C#' decimal balance = 0 void Total(XPathNodeIterator iter) XmlNode node = e.NextNode() string s = node.SelectSingleNode("amount").InnerText decimal amount = Decimal.Parse(s) if (node.Name == “deposit†|| node.Name == “balance†balance += amount els balance -= amount return balance ]] msxsl:script ht jayson