frodosfoot
IS-IT--Management
<rankings>
<entry>
<club>example1</club>
<oldrank>2000.34</oldrank>
<newrank>1973.29</newrank>
</entry>
<entry>
<club>example2</club>
<oldrank>2104.68</oldrank>
<newrank>2156.36</newrank>
</entry>
</rankings>
This simple xml file is curently transformed by an equally simple xslt stylesheet to produce a 3 column table, that orders he <clubs> based on their current ranking points total (from <newrank>). The table gives: rank position -- club -- rankpoints.
Is there an xsl method that would allow a fourth coulmn to be prodced that would display a graphical image ("up.png" or "down.png") that would indicate whether the <newrank> was higher or lower than the <oldrank>?
i.e. IF <newrank> is higher than <oldrank>, then output "up.png", BUT if <newrank> is lower than <oldrank> then output "down.png"
On a side note, I would be interested to know if such a feat could be accomplished by just comparing two separate xml files of the format:
new.xml:
<rankings>
<entry>
<club>example1</club>
<rank>2000.34</rank>
</entry>
</rankings>
old.xml:
<rankings>
<entry>
<club>example1</club>
<rank>2104.68</rank>
</entry>
</rankings>
Wherein, both files just contain a single <rank> value, with the transformed new.xml to display the relevant image. Sounds complicated, which is why I opted for the first option mentioned above.
Thanks for your time.
<entry>
<club>example1</club>
<oldrank>2000.34</oldrank>
<newrank>1973.29</newrank>
</entry>
<entry>
<club>example2</club>
<oldrank>2104.68</oldrank>
<newrank>2156.36</newrank>
</entry>
</rankings>
This simple xml file is curently transformed by an equally simple xslt stylesheet to produce a 3 column table, that orders he <clubs> based on their current ranking points total (from <newrank>). The table gives: rank position -- club -- rankpoints.
Is there an xsl method that would allow a fourth coulmn to be prodced that would display a graphical image ("up.png" or "down.png") that would indicate whether the <newrank> was higher or lower than the <oldrank>?
i.e. IF <newrank> is higher than <oldrank>, then output "up.png", BUT if <newrank> is lower than <oldrank> then output "down.png"
On a side note, I would be interested to know if such a feat could be accomplished by just comparing two separate xml files of the format:
new.xml:
<rankings>
<entry>
<club>example1</club>
<rank>2000.34</rank>
</entry>
</rankings>
old.xml:
<rankings>
<entry>
<club>example1</club>
<rank>2104.68</rank>
</entry>
</rankings>
Wherein, both files just contain a single <rank> value, with the transformed new.xml to display the relevant image. Sounds complicated, which is why I opted for the first option mentioned above.
Thanks for your time.