VoxML 1.0 Element Reference
INPUT Element : Type TIME
INPUT Element : Type TIME
The TIME input type is used to collect a time of day from the user.
Syntax
<INPUT TYPE="TIME" NAME="value" NEXT="value" [NEXTMETHOD="value"] [TIMEOUT="value"] />
Attributes
Attribute Name | Allowed Values |
|
|
NAME | identifier |
|
|
NEXT | next step URL |
|
|
NEXTMETHOD | GET * |
| POST |
|
|
TIMEOUT | milliseconds (integer) |
Examples
1 <STEP NAME="init">
2<PROMPT> What time would you like your wakeup
3call? </PROMPT>
4<INPUT TYPE="time" NAME="wakeup" NEXT="#record"/>
6</STEP>
This example makes use of the TIME input type to collect a time of day from the user, store that data in the VoxML variable named “wakeup”, and then go to the STEP named “record”.
Data Format
The TIME input makes use of an input grammar to interpret the user’s response and store that response in a standard format. This grammar will interpret responses of various forms, including both
“Four o’clock” is stored as “400”. Since the user was not specific as to the morning or evening, no indication is stored in the VoxML variable.
“Four oh three PM” becomes “403P”. Note the “P” appended to the time. Likewise, “Ten fifteen in the morning” becomes “1015A”. Note the “A”. “Noon” is stored as “1200P”, and “Midnight” is stored as “1200A”. Military time, such as, “Thirteen hundred hours” becomes “100P”.
October 1998 | VoxML 1.0 Language Reference 33 |