Hello.
I have the following XML file.
Code:
<doc>
<EOB>
<DETAIL>
<DETAILLINE>
<RCDATA>
<RCDATALINE>
<TRC>AAAAAAAAA1</TRC>
</RCDATALINE>
<RCDATALINE>
<TRC/>
</RCDATALINE>
</RCDATA>
<CRCDATA>
<CRCDATALINE>
<CRCFUNCTION>900</CRCFUNCTION>
</CRCDATALINE>
<CRCDATALINE>
<CRCFUNCTION/>
</CRCDATALINE>
</CRCDATA>
</DETAILLINE>
<DETAILLINE>
<RCDATA>
<RCDATALINE>
<TRC>WWWWWWWW1</TRC>
</RCDATALINE>
<RCDATALINE>
<TRC/>
</RCDATALINE>
</RCDATA>
<CRCDATA>
<CRCDATALINE>
<CRCFUNCTION>900</CRCFUNCTION>
</CRCDATALINE>
<CRCDATALINE>
<CRCFUNCTION/>
</CRCDATALINE>
</CRCDATA>
</DETAILLINE>
</DETAIL>
</EOB>
</doc>
I want to execute a template only if any occurrence of <TRC> has some text and any occurrence of <CRCFUNCTION> is not = '900'.
I tried the following code but the template is executed even though both the
<CRCFUNCTION> in both the <DETAILLINE> is '900'.
Code:
<xsl:if test="/doc/EOB/DETAIL/DETAILLINE/RCDATA/RCDATALINE/TRC/descendant-or-self::*[.!=''] and /doc/EOB/DETAIL/DETAILLINE/CRCDATA/CRCDATALINE/CRCFUNCTION/descendant-or-self::*[.!='900']">
Any help will be greatly appreciated!
Thanks,
Rita