<block>

A form item specifying a sequence of items to execute (executable content).

Syntax

<block
    cond = "CDATA"
    expr = "CDATA"
    name = "identifier"
/>

Attributes

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.

Details

The contained items are executed if:

The form item variable is automatically set to true just before the block is entered.

Parents

<form>

Children

<assign>, <audio>, <clear>, <data>, <disconnect>, <enumerate>, <exit>, <foreach>, <goto>, <if>, <log>, <prompt>, <return>, <script>, <submit>, <throw>, <value>, <var>

Example

<?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>

See Also

<form>