This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Calculations in XSL using multiple XML data fileds
- To: <XSL-List at mulberrytech dot com>
- Subject: Calculations in XSL using multiple XML data fileds
- From: "Phil Davies" <phildavies at futuresource dot co dot uk>
- Date: Mon, 30 Oct 2000 11:21:25 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
As someone quite new to XSL and indeed scripting I am trying to figure out
how to perform a calculation of two XML fields in an XSL stylesheet.
The XML document contains the following two fields (among other data)
q1/quotes/quote/last
q2/quotes/quote/last
These fields will always contain numeric data and need to return a result to
2 decimal places
I want the XSL to perform the following calculation
(q1/quotes/quote/last) - ((q2/quotes/quote/last)/7.45)
I am hoping that this can be done in XSL but cannot find out how this can be
done.
I am using IIS5, the XML is generated from an HTTP request made to a
proprietry XML database via an ASP page.
If it cannot be done in XSL, can anyone suggest how else (script?) this can
be done
Many thanks
Phil Davies
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list