Hello,
I have a date element in my XML file.
For example:
Code:
<DETAIL>
<DETAILLINE>
<SEQUENCE>000001</SEQUENCE>
<DOS>
<MM>07</MM>
<DD>01</DD>
<YYYY>2011</YYYY>
</DOS>
</DETAILLINE>
<DETAILLINE>
<SEQUENCE>000002</SEQUENCE>
<DOS>
<MM>01</MM>
<DD>01</DD>
<YYYY>2012</YYYY>
</DOS>
</DETAILLINE>
</DETAIL>
I need to do something at the end after all the <DETAILLINE>s are processed. If I find any <DOS> that is less than 07/01/2011 then I need to print something.
My current code is the following but it's not working correctly as it will return true if ANY <YYYY> is less than 2012 and ANY <MM> is less than 07. I need it to return true if the position of the <YYYY> and the <MM> is the same.
Code:
<xsl:if test="/doc/EOB/DETAIL[descendant::DETAILLINE/DOS/YYYY[. < '2012']] and /doc/EOB/DETAIL[descendant::DETAILLINE/DOS/MM[. < '07']]" >
I was thinking of using the CONCAT function but am not sure of the syntax for this situation.
I'm working with XSLT 1.0.
Any help will be greatly appreciated!
Thanks,
Rita