Subject: [xsl] sum() over attributes is 0 From: Andreas Kemkes <a5sk4s@xxxxxxxxx> Date: Tue, 21 Aug 2007 16:33:25 -0700 (PDT) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to select elements ba, David Carlisle | Thread | Re: [xsl] sum() over attributes is , G. Ken Holman |
Re: [xsl] how to select elements ba, David Carlisle | Date | Re: [xsl] sum() over attributes is , G. Ken Holman |
Month |