How to check the condition of logical equality in XSLT?
I have this simple test in XSLT
<xsl:if test="isTrue = 'false'"> but I cannot figure out how to make the logical equality operator here. I know that < is < and > is > So what is the logical equality operator for XSLT? I tried &eq; &et; == and = , or is it for XSLT you can only compare numbers?
for example this xml entry
<xml> <SomeElement>1</SomeElement> <SomeAttribute attr="true" /> </xml> Through this conversion:
<?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/xml"> <xsl:if test="SomeElement=1"> Some Element is 1 </xsl:if> <xsl:if test="SomeAttribute/@attr='true'"> Some Attribute is true </xsl:if> </xsl:template> </xsl:stylesheet> Returns
Some Element is 1 Some Attribute is true As expected. Is there a possible error in the path selector, and not in test ?