Cette page a été traduite à partir de l'anglais par la communauté. Vous pouvez contribuer en rejoignant la communauté francophone sur MDN Web Docs.

View in English Always switch to English

choose

L'élément <xsl:choose> définit un choix parmi un certain nombre d'alternatives. Il se comporte comme l'instruction switch d'un langage procédural.

Syntaxe

xml
<xsl:choose>
  <xsl:when>
  <xsl:otherwise> [optionnel]
</xsl:choose>

Attributs obligatoires

Aucun.

Attributs optionnels

Aucun.

Type

Instruction, apparaît dans un modèle. Il contient un ou plusieurs éléments <xsl:when>, et éventuellement un élément final <xsl:otherwise>.

Définition

XSLT 1.0, section 9.2.

Support Gecko

Supporté.