First, get your terminology right. It's an element, not an entity. You won't be able to find the right entry in the index of a book, or the right information on Google, if you use the wrong terminology.
Second, use the sum function: sum(amount).
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference