# op:boolean-equal

If $boolean-var1 has the same boolean value as $boolean-var2, the boolean value: true is returned. If $boolean-var1 does not have the same boolean value as $boolean-var, the boolean value: false is returned. For example: op:boolean-equal(xf:true(), xf:false()) returns the boolean value: false.

This operator is equilavant to the eg operator with boolean values.

### Signatures

op:boolean-equal(xs:boolean $boolean-var1, xs:boolean $boolean-var2) —> xs:boolean

### Arguments

Data Type | Argument | Description
--- | --- | ---
xs:boolean | $boolean-var1 | Represents a boolean value.
xs:boolean | $boolean-var2 | Represents a boolean value.

### Returns

Returns the boolean value: true if $boolean-var1 is equal to the boolean value of $boolean-var2.

Returns the boolean value: false if $boolean-var1 is not equal to the boolean value of $boolean-var2.

### Examples

#### Not Equal Returns false

Invoking op:boolean-equal(xf:false(),xf:true()) returns the boolean value: false, as shown in the following example query:

    <boolean-equal>{
    	op:boolean-equal(xf:false(),xf:true())
    }</boolean-equal>

The preceding query generates the following result:

    <boolean-equal>false</boolean-equal>

#### Equal Returns true

Invoking op:boolean-equal(xf:false(),xf:false()) returns the boolean value: true, as shown in the following example query:

    <boolean-equal>{
    	op:boolean-equal(xf:false(),xf:false())
    }</boolean-equal>

The preceding query generates the following result:

    <boolean-equal>true</boolean-equal>

Related Topics

W3C boolean-equal operator description.

W3C boolean function description

xs:boolean