O'Reilly logo

Definitive VoiceXML™ by David Cuddihy, Adam Hocek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.58. var

Element typevar
Attributesexpr | name
Parentsblock | catch | error | filled | form | help | if | noinput | nomatch | vxml
ChildrenNone.
DescriptionDeclares a variable in the scope of its parent element.

DTD

<!ELEMENT var EMPTY >
<!ATTLIST var
  name %field.name; #REQUIRED
  expr %expression; #IMPLIED >

Language model

Attributes

name : field.name

Name of the variable to declare.

expr : expression

An ECMAScript expression of the value.

Children

None.

Examples

Example 3-69. Defining a variable with var
 <?xml version="1.0" encoding="iso-8859-1"?> <vxml version="1.0"> <var name="greeting" expr="'good day'"/> <form> <field name="language"> <grammar>english ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required