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 |