This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Performing an expression on attributes of a node-set



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@sitepak.com


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]