Motorola 1 manual Examples

Page 10

VoxML 1.0 Element Reference

ACK Element

Examples

1<STEP NAME="card_type">

2<PROMPT>

3What type of credit card do you have?

4</PROMPT>

5<INPUT NAME="type" TYPE="optionlist">

6<OPTION NEXT="#exp"> visa </OPTION>

7<OPTION NEXT="#exp"> mastercard </OPTION>

8<OPTION NEXT="#exp"> discover </OPTION>

9</INPUT>

10<ACK CONFIRM="YORN" REPROMPT="Y">

11I thought you said <VALUE NAME="type"/>

12<BREAK/> Is that correct?

13</ACK>

14</STEP>

In this rather complex example, the ACK element is used to confirm the user's choice of credit card. When this code is interpreted by the VoxML voice browser, it will speak the text of the PROMPT element using text-to-speech technology, wait until the user responds with “visa”, “mastercard”, or “discover”, and then ask the user to confirm the type of card was recognized correctly.

If the user answers “yes” to the ACK, the browser will proceed to the STEP named “exp”. If the user answers “no” to the ACK, the text of the PROMPT will be read again, and the user will be allowed to make his or her choice again

— the browser re-enters the STEP as if for the first time.

October 1998

VoxML 1.0 Language Reference 6

Image 10
Contents VoxML Language Reference RevisionPage Contents Appendices Overview What is VoxMLPurpose of this Document Structure of a VoxML Document DIALOGs and STEPsBasic Elements Other Reference Documentation VoxML 1.0 Application Development GuideSyntax ACK ElementAttributes Examples Audio Element Break Element Cancel Element Next step URLExamples Case Element Class Element IntegerExamples Dialog Element EMP Element Error Element Input TYPE=OPTIONLIST Help Element Option NEXT=#end done /OPTION 11 /INPUT 12 /STEP Input Element Input Element Type Date Data FormatInput 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 Or Element Syntax AttributesPrompt Element Pros Element Rename Element Response Element Examples Step Element Switch Element Value Element PromptAppendices Appendix a VoxML 1.0 Document Type DefinitionOctober VoxML 1.0 Language Reference Appendix B Vcard Profile Names and Subtypes Vcard Profile Names and SubtypesFirst