VoxML 1.0 Element Reference

INPUT Element : Type GRAMMAR

INPUT Element : Type GRAMMAR

The GRAMMAR input is used to specify an input grammar that is to be used when interpreting the user's responses.

Syntax

<INPUT TYPE="GRAMMAR" SRC="value" NEXT="value" [NEXTMETHOD="value"] [TIMEOUT="value"] />

or

<INPUT TYPE="GRAMMAR" SRC="value" NEXT="value" [NEXTMETHOD="value"] [TIMEOUT="value"] > RENAME elements </INPUT>

or

<INPUT TYPE="GRAMMAR" SRC="value" [TIMEOUT="value"]

[NEXT="value" [NEXTMETHOD="value"] ] > RESPONSE elements </INPUT>

Attributes

Attribute Name

Allowed Values

 

 

SRC

grammar URL

 

 

NEXT

next step URL

 

 

NEXTMETHOD

GET *

 

POST

 

 

TIMEOUT

milliseconds (integer)

Examples

1 <STEP NAME="init">

2<PROMPT> Say the month and year in which the

3credit card expires. </PROMPT>

4<INPUT TYPE="GRAMMAR"

5SRC="gram://.SomeGrammar/month/year"

6NEXT="#stepNineteen"/>

7</STEP>

The code on lines 4, 5, and 6 illustrates the use of the GRAMMAR INPUT to collect a month and year from the user, store the interpreted values in variables named “month” and “year”, and then go to the step named “stepNineteen”.

October 1998

VoxML 1.0 Language Reference 23

Page 27
Image 27
Motorola 1 manual Input Element Type Grammar