This Boolean operator is used to determine whether a particular value is equal to another value. This operator has the value1, value2, and exact attributes. This operator has no child elements, and evaluates to true if and only if value1 and value2 are equal. If exact is true, the values must be exactly the same, including case. If exact is false, the comparison is case-insensitive.
<istrue value="..."/> is a syntactic shorthand for the following statement:
<equals value1="..." value2="true"/> |
The <equals> operator has the following attributes:
value1 – A required attribute that is a value to be compared. This attribute can reference simple substitution variables.
value2 – A required attribute that is the value to be compared. This attribute can reference simple substitution variables.
exact – An optional attribute of type boolean, which is true if a case-sensitive match should be performed, false otherwise. Defaults to false.
The following examples show how <equals> is used and the results:
The following statement evaluates to true.
<equals value1="True" value2="true"/> |
The following statement evaluates to false.
<equals value1="True" value2="true" exact="true"/> |
The following statement evaluates to true.
<equals value1="apple" value2="apple" exact="true"/> |
The following statement evaluates to false.
<equals value1="apple" value2="orange"/> |
The following statement evaluates to true if var1 is equal to var2.
<equals value1=":[var1]" value2=":[var2]"/> |