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

2.2. Procedural elements

A filled element typically contains:

  • “conditional” elements like if, else, and elseif,

  • non-conditional flow control elements like goto and submit,

  • procedural elements like script, log, disconnect, and exit.

2.2.1. The if, else, elseif element types

VoiceXML allows for conditional logic through the if, else, and elseif element types. Unlike if elements, the else and elseif elements are always empty - in other words, they do not contain any sub-elements, making the language somewhat idiosyncratic.

We can add conditional logic to the the Jimmy's Pizza example (see 2.1, “Forms,” on page 25), as shown in Example 2-12. We will test for three different conditions: a dissatisfied customer, a satisfied customer, and a moderately ...

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