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

sum() over attributes is 0

Subject: sum() over attributes is 0
From: Andreas Kemkes <a5sk4s@xxxxxxxxx>
Date: Tue, 21 Aug 2007 16:33:25 -0700 (PDT)
 sum() over attributes is 0
I'm not having much success using the sum() function over a node set.

The
following two expressions

<xsl:comment>
  <xsl:text>sum: </xsl:text>
<xsl:value-of select="sum(//lc:container[lc:item]/@select)"/>
</xsl:comment>
<xsl:comment>
  <xsl:text>list of select attributes: </xsl:text>
<xsl:for-each select="//lc:container[lc:item]">
    <xsl:value-of
select="@select"/>
    <xsl:text> </xsl:text>
  </xsl:for-each>
</xsl:comment>
result in the following output:

    <!--sum: 0-->
    <!--list of select
attributes: 2 3 1 -->

I'm not clear why the result of sum() is 0.  Are there
any other prerequisites that I'm missing?

Thanks again.
_____________________________________________________________________________
_______
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket:
mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

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.