Description
The <else> element is used within the conditional
logic statement <if> and with the optional
<elseif> element. It is used to define content
to be executed if the conditions specified by the <if>
and any previous <elseif> elements are not satisfied.
Syntax
<else/> |
Parents
Children
None.
Extensions
None.
Limitations/Restrictions
None.
Example
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form>
<var name="number_var" expr="5"/>
<var name="boolean_var" expr="true"/>
<var name="string_var" expr="'hello'"/>
<block>
<if cond="number_var != 5">
The number is not five.
<elseif cond="!boolean_var"/>
The boolean is not true.
<elseif cond="string_var != 'hello'"/>
The string is not hello.
<else/>
The number is five and
the boolean is true and
the string is hello.
</if>
</block>
</form>
</vxml> |