Saturday, 10 August 2013

XSL:IF with orcondition implementation in xslt1.0

XSL:IF with orcondition implementation in xslt1.0

I have the below template as shown..
<xsl:for-each select="/abc/def">
<xsl:if test=".Id='xxx' and ./Role='yyy' ">
<xsl:value-of select=" 'true'"/>
</xsl:if>
Now I want to put an or condition in an xsl:if condition such that let say
condition 1 is true then also result should be true or if condition 2 is
true then also the result is true , now please advise how to put the or
condition I have come up with this solution please advise is it correct
....
<xsl:if test=".Id='xxx' and ./Role='yyy' or test=".Id='ttt' and
./Role='ccc' ">

No comments:

Post a Comment