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

RE: the sum value. SOS.

Subject: RE: the sum value. SOS.
From: JBryant@xxxxxxxxx
Date: Fri, 18 Feb 2005 12:58:06 -0600
sum value
sum(//puntuacion_valor)

That will sum the value of every puntuacion_valor node, including the ones
that are not children of the puntuaciones node. While it may work because
the document happens to have only one puntuaciones node and no other node
has children named puntuacion_valor, it will cause trouble if either of
those conditions is not true. Also // is inefficient (as it looks at every
node in the document). I would use

sum(puntuaciones/puntuacion_valor)

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)





Ryan Graham <ryan.graham@xxxxxxxxxxxxx>
02/18/2005 12:47 PM
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To
"'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
cc

Subject
RE:  the sum value. SOS.







sum(//puntuacion_valor)

HTH,
RG
-----Original Message-----
From: Dionisio Ruiz de Zarate [mailto:dionisio@xxxxxxxxxxxxx]
Sent: Friday, February 18, 2005 11:43 AM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  the sum value. SOS.


hello i have the bellow xml.
i am tring to load the sum of some nodes but i cannot load it.

i have some nodes and i wnat to load the sum value:
XML:
....
- <puntuaciones>
- <puntuacion>
   <puntuacion_valor>8</puntuacion_valor>
  </puntuacion>
- <puntuacion>
   <puntuacion_valor>33</puntuacion_valor>
  </puntuacion>
- <puntuacion>
   <puntuacion_valor>28</puntuacion_valor>
  </puntuacion>
  </puntuaciones>..
...

how can i load the sum of the <puntuacion_valor> nodes?

thanks

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.