You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Eric Chow <ec...@macaucabletv.com> on 2004/03/29 10:51:09 UTC
How can I get the sum() ???
Hello,
How can I get the sum() of two fields ??
<orders>
<order>
<item>Book</item>
<price>29.9</price>
<qty>3</qty>
</order>
<order>
<item>CD</item>
<price>10.5</price>
<qty>5</qty>
</order>
</orders>
I want to get the subtotal of the above order.xml, which result should be
(29.9*3 + 10.5*5) !!!
I tried sum("/orders/order/price*/orders/order/qty"), but failed !!!
Eric
==========================
If you know what you are doing,
it is not called RESEARCH!
==========================
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: How can I get the sum() ???
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Eric Chow wrote:
> How can I get the sum() of two fields ??
That's an XSLT question, a FAQ in fact. Check the XSL FAQ and
the XSL list:
http://www.mulberrytech.com/xsl/xsl-list/
You need a recursive template to cover the general case, something
like
http://www.dpawson.co.uk/xsl/sect2/N4806.html
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org