# eq

Instruction Xml Path. Egalité.

`eq`

## Description

L'instruction eq retourne Vrai si les deux arguments sont identiques.

Les deux valeurs doivent être de type identique qui est soit booléen, numérique, chaîne de caractères ou date.

Les séquences de noeuds ou d'attributs ne sont pas acceptées.

`A eq B` est l'équivalent de :

• `numeric-equal(A as numeric, B as numeric) as boolean`
• `boolean-equal(A as boolean A, B as boolean) as boolean`
• `numeric-equal(compare(A as string, B as string), 0) as boolean`
• `date-equal(A as date, B as date) as boolean`
• `time-equal(A as time, B as time) as boolean`
• `dateTime-equal(A as dateTime, B as dateTime) as boolean`
• `duration-equal(A as duration, B as duration) as boolean`
• `gYear-equal(A as Gregorian, B as Gregorian) as boolean`
• `hex-binary-equal(A as hexBinary, B as hexBinary) as boolean`
• `base64-binary-equal(A as base64Binary, B as base64Binary) as boolean`
• `numeric-equal(compare(A as anyURI, B as anyURI), 0) as boolean`
• `QName-equal(A as QName, B as QName) as boolean`
• `NOTATION-equal(A as NOTATION, B as NOTATION) as boolean`

## Exemple

``` <-- L'attribut id doit etre egal a 100. --> @id eq 100 ```

## Voir aussi

ge, gt, is, le, lt et ne pour faire une comparaison autrement.