Motorola manual Option NEXT=#end done /OPTION 11 /INPUT 12 /STEP

Page 23

VoxML 1.0 Element Reference

HELP Element

Examples

1<STEP NAME="helps">

2<HELP REPROMPT="Y"> First help message.

3You should hear the prompt again. </HELP>

4<HELP ORDINAL="2"> Second help message.

5You should not hear the prompt now. </HELP>

6<PROMPT> This step tests help prompts.

7Say 'help' twice. Then say 'done' to

8choose another test. </PROMPT>

9<INPUT TYPE="OPTIONLIST">

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

11</INPUT>

12</STEP>

The code shown above illustrates the use of the HELP element to define the application's behavior in response to the user input “help”. On line 2, we define the help message to be used the first time the user says “help”. On line 4, we define the help message to be used the second and all subsequent times the user says “help”. It should also be noted that through the use of the REPROMPT attribute, the prompt will be repeated after the first help message, but it will not be repeated after the second help message.

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

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

October 1998

VoxML 1.0 Language Reference 19

Image 23
Contents Revision VoxML Language ReferencePage Contents Appendices Purpose of this Document What is VoxMLOverview DIALOGs and STEPs Structure of a VoxML DocumentBasic Elements VoxML 1.0 Application Development Guide Other Reference DocumentationAttributes ACK ElementSyntax 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