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

RE: Compute sum of a computed node list

Subject: RE: Compute sum of a computed node list
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Thu, 6 May 2004 01:09:41 +0200
compute sum
> -----Original Message-----
> From: vsubramanian@xxxxxxxxxx [mailto:vsubramanian@xxxxxxxxxx]
>
> Hi!
>
> Here I am trying to compute the sum for the state
> local salary which has some mathematical calculation involved.
>
> When i compute sum of a node which is not mathematically altered,
> i get the sum despite having a NaN as one of the nodes.
> but, this gives me an error.
> Could you please be kind enough to explain this?
>

Hi,

I'm not sure I understand your problem fully, however, I'm wondering whether
you realize that over here
...
>  <state_local_match_total>
>    <xsl:value-of select="format-number(
        sum(rehab/state_local_match[
          number(.)=number(.)]),'###,###.##','MyFormat')"/>
>  </state_local_match_total>

the XPath predicate is particularly intriguing, as the specified condition
'number(.)=number(.)' will always be true (all nodes for which it is true
that their content, when converted to a number, equals their own content
converted to a number)

Might you be looking for 'number(.)=number(current())'?

If not, then IMHO it means nothing, and could as well be left out.


Greetz,

Andreas

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.