PDA

View Full Version : Addition in an XSLT document


kiran_mannava@yahoo.co.in
11-11-2006, 04:53 AM
I have the following xml files:

file1.xml looks like this:
<file1>
<director-name>Paul</director-name>
<item hit="8"/>
<item hit="10"/>
</file1>

file2.xml looks like this:
<file2>
<director-name>Adam</director-name>
<item hit="7"/>
<item hit="9"/>
<item hit="5"/>
</file2>

file3.xml looks like this:
<file3>
<director-name>Richards</director-name>
<item hit="2"/>
<item hit="8"/>
<item hit="0"/>
</file2>

I have one more xml file which will refer to all the above xml files:
<qurey>
<filename>file1.xml</filename>
<filename>file2.xml</filename>
<filename>file3.xml</filename>
</query>


My question is:
Write a query.xsl file which will output the value of <director-name>, whose hits are the highest. For example,you can see that from file1.xml the number of hits are 8+10=18 etc.

Can anyone of you help me out, with this query. Pls give me the solution, which is query.xsl. Its an urgent requirement.