VoxML 1.0 Element Reference

CLASS Element

Examples

1<CLASS NAME="simple">

2<HELP> Your choices are <OPTIONS/> </HELP>

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

4Valid responses are <OPTIONS/> </ERROR>

5</CLASS>

6

7<STEP NAME="beverage" PARENT="simple">

8<PROMPT> Please choose a drink. </PROMPT>

9<INPUT NAME="drink" TYPE="optionlist">

10<OPTION NEXT="#food"> coke </OPTION>

11<OPTION NEXT="#food"> pepsi </OPTION>

12</INPUT>

13</STEP>

14

15 <STEP NAME="food" PARENT="simple">

16<PROMPT> Please choose a meal. </PROMPT>

17<INPUT NAME="meal" TYPE="optionlist">

18<OPTION NEXT="#deliver"> pizza </OPTION>

19<OPTION NEXT="#deliver"> tacos </OPTION>

20</INPUT>

21</STEP>

The code shown on lines 1-5 illustrates the use of the CLASS element to define a HELP element and an ERROR element that will be used in several STEPs within this DIALOG.

The code on lines 7 and 15 illustrates the use of the PARENT attribute on the STEP element to refer to the CLASS element, and therefore inherit the behaviors defined within it.

When interpreted by the VoxML voice browser, the STEPs defined on lines 7- 13 and lines 15-21 will behave as if the HELP and ERROR elements that are defined in the CLASS were defined explicitly in the STEPs themselves.

October 1998

VoxML 1.0 Language Reference 13

Page 17
Image 17
Motorola 1 manual Examples