xsl-list
[Top] [All Lists]

Storing calculated values in global variables ?

2002-11-12 01:14:54
Hello,

I am a new user of XSLT and am not very good with it. Can anyone please
help me with this problem ? If I have the following 2 XML Documents

Doc1.xml
<?xml version="1.0"?>
<Testing>
        <Range>
                <From>500</From>
                <To>300</To>
                <From>300</From>
                <To>400</To>
                <From>600</From>
                <To>1000</To>
        </Range>
</Testing>

Doc2.xml
<?xml version="1.0"?>
<Testing>
        <Range>
                <From>100</From>
                <To>300</To>
                <From>200</From>
                <To>400</To>
                <From>700</From>
                <To>1000</To>
        </Range>
</Testing>

I can sort the elements from both the documents in ascending or
descending order and extract the maximum and minimum value elements
using a single stylesheet. But how do I perform mathematical operations
on the sorted elements ? For e.g if I want to add the first and the last
<From> element from the sorted list of <From> elements how can I do this
and store this value in a global variable so that it can be reused ? 

Thanx,
Chitra


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



<Prev in Thread] Current Thread [Next in Thread>