[xsl] Thanks and a Question

Subject: [xsl] Thanks and a Question
From: Nick Leaton <nickle@xxxxxxxxx>
Date: Fri, 4 Jun 2010 16:11:41 +0100
Thanks to all those who helped me with a question the other day, my
xslt is working.

However, I've another question.

I have some odd xml that is outside of my control. Cut down to the
minimum, it looks like this.

<?xml version="1.0" encoding="ISO-8859-1"?>
  <MESSAGE>
    <TRADE>
      <UPDAT_TIME>2010-05-07 15:08:15</UPDAT_TIME>
        <LEG>
          <UPDAT_TIME>2010-05-07 13:57:39</UPDAT_TIME>
          <CASHFLOW>
            <UPDAT_TIME>2010-05-07 14:00:02</UPDAT_TIME>
          </CASHFLOW>
          <CASHFLOW>
            <UPDAT_TIME>2010-05-07 14:00:02</UPDAT_TIME>
          </CASHFLOW>
        </LEG>
      </INSTRUMENT>
    </TRADE>
  </MESSAGE>


I would like to test to see if there exists an UPDAT_TIME on any
cashflow that is greater than the UPDAT_TIME on the containing leg.
Just one is sufficient for
a true answer.

ie. Exists (cashflow.updat_time > leg.updat_time)

In general, what are the strategies for testing a existance and for all.

I can test for existance of a node using the exists function.

Exists (something) where something is derived is the example above.

Similarly the test might be, True if cashflow.updat_time >
leg.update_time for all cashflows in the leg.

-- 
Nick

Current Thread