blob: 271da4018591141ecd98898f5fbbc0a12c4f7aa4 (
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
39
40
41
|
---
title: '<xsl:choose>'
slug: Web/XSLT/Element/choose
tags:
- XSLT
- choose
- リファレンス
- 要素
translation_of: Web/XSLT/Element/choose
---
<p>{{ XsltRef() }}</p>
<p><code><xsl:choose></code> 要素はいくつかの選択肢の中から選択肢を定義します。 手続き型言語の switch 文のように振る舞います。</p>
<h3 id="Syntax" name="Syntax">構文</h3>
<pre><xsl:choose>
<xsl:when test="[whatever to test1]"></xsl:when>
<xsl:when test="[whatever to test2]"></xsl:when>
<xsl:otherwise></xsl:otherwise> [optional]
</xsl:choose></pre>
<h3 id="Required_Attributes" name="Required_Attributes">必須属性</h3>
<p>なし</p>
<h3 id="Optional_Attributes" name="Optional_Attributes">任意属性</h3>
<p>なし</p>
<h3 id="Type" name="Type">タイプ</h3>
<p>インストラクションはテンプレートとともに表示されます。1つまたは複数の <code><xsl:when></code> 要素と、オプションで最後の <code><xsl:otherwise></code> 要素を含みます。</p>
<h3 id="Defined" name="Defined">定義</h3>
<p>XSLT, section 9.2.</p>
<h3 id="Gecko_support" name="Gecko_support">Gecko のサポート</h3>
<p>サポート済み</p>
|