aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/xslt/element/choose/index.md
blob: bfa6a3a6d6a43f718f988029d99e88eafe7ef590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
title: choose
slug: Web/XSLT/Element/choose
tags:
  - Référence_XSLT
translation_of: Web/XSLT/Element/choose
original_slug: Web/XSLT/choose
---
{{ XsltRef() }}

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

    <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](http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:choose).

### Support Gecko

Supporté.