A form item specifying a sequence of items to execute (executable content).
<block
cond = "CDATA"
expr = "CDATA"
name = "identifier"
/>
Attribute |
Data Type |
Required? |
Default |
Description |
cond |
CDATA |
no |
ECMAScript undefined |
Boolean expression that must evaluate to ECMAScript true for the block to execute. |
expr |
CDATA |
no |
NA |
Initial value of the named form item variable. If initialized to a value, then the form item is not visited unless the form item variable is cleared. |
name |
identifier |
no |
NA |
Name of the form item variable. This must be a legal ECMAScript identifier. |
The contained items are executed if:
form item variable of the block is undefined, and
cond attribute, if specified, evaluates to true
The form item variable is automatically set to true just before the block is entered.
<assign>, <audio>, <clear>, <data>, <disconnect>, <enumerate>, <exit>, <foreach>, <goto>, <if>, <log>, <prompt>, <return>, <script>, <submit>, <throw>, <value>, <var>
<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<var name="bCond" expr="false"/>
<form id="form1">
<block name="block1" cond="bCond">
<prompt>Currently in block one</prompt>
</block>
<block name="block2">
<prompt>Now in block two</prompt>
</block>
</form>
</vxml>