Performing an expression on attributes of a node-set

Subject: Performing an expression on attributes of a node-set
From: "Jim Sproull" <jim@xxxxxxxxxxx>
Date: Wed, 27 Sep 2000 09:48:20 -0400
Hi all,

  My subject might be a bit confusing, but my problem isn't;  I am making a
simple shopping cart, and need a way to display the total price of all the
Items.  A simple task, I thought, until I tried doing it.

Getting the total number of items was easy:

sum(//Item/@qty)

And getting the total price of each item was easy:

format-number(sum(//Item/@price), '####0.00')

 But I need the sum of each (price*qty).  I tried everything I could think
of, but no luck.  Any clues on how to do this?

Thanks.
Jim Sproull
jim@xxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread