October 26, 2016
Hot Topics:

Excerpt: Early Adopter VoiceXML: VoiceXML with XSLT (HTML and WML), Part 2

  • February 14, 2002
  • By Developer.com Staff
  • Send Email »
  • More Articles »

Next come the form level help dialogs, which here attempt to mimic typical responses likely from a real life call center, contrary to the advice of Chapter 6:

<help count="1">   
What seems to be the trouble?   
<help count="2">   
Come on - isn't this easy enough to understand?   
<help count="3">   
Hey <xsl:value-of select="customer/firstname"/>, 
are you stupid or something?   
The design specifies that the main menu command is always available. We can implement that with a global VoiceXML <link> element:
<link next="#mainMenu">   
<grammar type="application/x-jsgf"> 
main menu 

Again, we use the information from the XML file to customize the prompts for the user. This form welcomeMessage corresponds to the "welcome message" box in the interface design diagram earlier.

<form id="welcomeMessage">   
<prompt bargein="false" timeout="0.1s">       
Hello, <xsl:value-of select="customer/firstname"/>.       
Welcome to the my rubber bands 
dot com voice order status system.     
<goto next="#mainMenu"/>   
Next, we come to the mainMenu form, the primary form of the voice application. There is a form level <nomatch> element here to transfer control flow to the errorHandler form when an utterance doesn't match the grammar. This form is used for most no-match events throughout the application, to keep track of the total number of such errors that have occurred this session. The <noinput> handler here ensures the main menu is repeated when the user doesn't respond to the prompt. In a future version of the product, the designers may implement some kind of timeout to restrict the number of loops, and disconnect the user if there is no response for a long time, but this issue need not concern us now.

<form id="mainMenu">   
<goto next="#errorHandler"/>   
<goto next="#mainMenu"/>

Page 3 of 5

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel