DTL <switch> Contents 構文 属性 要素 説明 <case> 要素を評価し、最初に真に評価されたものの内容を実行します。 構文 <switch> <case condition="1"> ... </case> <default> ... </default> </switch> 属性 なし 要素 要素 目的 <annotation> オプション。<switch> 要素について記述するテキスト文字列。 <case> 真に評価された最初の <case> 要素が実行されます。 <default> オプション。どの <case> 要素も真に評価されない場合は、<default> 要素の内容が実行されます。 説明 <switch> 要素には、1 つ以上の <case> 要素と、オプションの <default> 要素が含まれます。<case> 要素の内容は、条件が真に評価されると実行されます。<case> 要素が真に評価されると、他の <case> 要素や <default> 要素は評価されません。<default> 要素の内容は、どの <case> 要素も真に評価されない場合に実行されます。