Motorola 1 manual Input TYPE=OPTIONLIST

Page 21

VoxML 1.0 Element Reference

ERROR Element

Examples

1<STEP NAME="errors">

2<ERROR TYPE="nomatch"> First error message.

3I did not understand what you said. </ERROR>

4<ERROR TYPE="nomatch" ORDINAL="2">

5Second error message.

6I did not understand what you said. </ERROR>

7<PROMPT> This step tests error messages.

8Say 'oops' twice. Then say 'done' to

9choose another test. </PROMPT>

10<INPUT TYPE="OPTIONLIST">

11<OPTION NEXT="#end"> done </OPTION>

12</INPUT>

13</STEP>

The code shown above illustrates the use of the ERROR element to define the application's behavior in response to an error. On line 2, we define the error message to be used the first time an error of type “nomatch” occurs in this STEP. On line 4, we define the error message to be used the second and all subsequent times an error of type "nomatch" occurs in this STEP.

The ORDINAL attribute determines which message will be used in the case of repeated errors within the same STEP. The VoxML voice browser will choose an error message based on this simple algorithm: If the error has occurred 3 times, the browser will look for an ERROR element with ORDINAL of “3”. If no such ERROR element has been defined, the voice browser will look for an ERROR with ORDINAL of “2”, and then “1”, and then an ERROR with no ORDINAL defined.

So, if we had defined an ERROR element with ORDINAL of “6” in the STEP shown above, and the same error occurred 6 times in a row, the user would hear the first error message one time, then the second error message 4 times, and finally the error message with ORDINAL of “6”.

October 1998

VoxML 1.0 Language Reference 17

Image 21
Contents Revision VoxML Language ReferencePage Contents Appendices What is VoxML OverviewPurpose of this Document DIALOGs and STEPs Structure of a VoxML DocumentBasic Elements VoxML 1.0 Application Development Guide Other Reference DocumentationACK Element SyntaxAttributes Examples Audio Element Break Element Next step URL Cancel ElementExamples Case Element Integer Class ElementExamples Dialog Element EMP Element Error Element Input TYPE=OPTIONLIST Help Element Option NEXT=#end done /OPTION 11 /INPUT 12 /STEP Input Element Data Format Input Element Type DateInput Element Type Digits Input Element Type Grammar Input Element Type Hidden Input Element Type Money Input Element Type None Input Element Type Number Input Element Type Optionlist Input Element Type Phone Input Element Type PROFILE‡ Input Element Type Record Prompt Input Element Type Time Input Element Type Yorn Option Element VoxML 1.0 Element Reference Options Element Syntax Attributes Or ElementPrompt Element Pros Element Rename Element Response Element Examples Step Element Switch Element Prompt Value ElementAppendix a VoxML 1.0 Document Type Definition AppendicesOctober VoxML 1.0 Language Reference Vcard Profile Names and Subtypes Appendix B Vcard Profile Names and SubtypesFirst