<choice
accept="exact"|"approximate"
next="URI"
event="event"
expr="js_expression"
dtmf="dtmf_sequence"
eventexpr="js_expression"
message="String"
messageexpr="js_expression"
fetchhint="prefetch"|"safe"
fetchtimeout="time_interval"
fetchaudio="URI"
maxage="time_interval"
maxstale="time_interval"
>
Choice Text
</choice>
| Attribute | Description | ||||
accept |
New in VoiceXML 2.0. Specifies whether the default grammar generated for this
Note: The default is |
||||
next |
URI of the dialog or document to visit when this choice is selected. Optional (as an alternative to |
||||
event |
An event to throw when this choice is selected. Optional (as an alternative to |
||||
expr |
JavaScript expression that evaluates to a URI of the dialog or document to visit when this choice is selected. Optional (as an alternative to |
||||
dtmf |
DTMF sequence that can be used to select this choice. Optional (default is no DTMF value). |
||||
eventexpr |
New in VoiceXML 2.0. A JavaScript expression evaluating to the name of the event to be thrown. |
||||
message |
New in VoiceXML 2.0. A message string providing additional context about the event being thrown. The message is available as the value of a variable within the scope of the |
||||
messageexpr |
New in VoiceXML 2.0. A JavaScript expression evaluating to the message string. |
||||
fetchhint |
Specifies whether the interpreter can attempt to optimize dialog interpretation by prefetching the resource. See Prefetching Resources. Optional. |
||||
fetchtimeout |
Specifies the interval to wait for the resource to be returned before throwing a |
||||
fetchaudio |
Specifies the URI of background audio to be played during fetching. Note that this attribute and related properties affect whether queued prompts are played first. See Background Audio for important details. Optional. |
||||
maxage |
New in VoiceXML 2.0. Specifies the maximum acceptable age, in seconds, of the cached resource. See Maximum Age. Optional. |
||||
maxstale |
New in VoiceXML 2.0. Specifies the maximum acceptable time, in seconds, during which an expired cached resource can still be used. See Maximum Stale Time. Optional. |
One and only one of the next, expr, or event attributes must be specified.
(VoiceXML 1.0 only) The following attributes can be used in applications in which the version attribute of the <vxml> tag is set to 1.0.
| Attribute | Description |
caching |
VoiceXML 1.0 only. Specifies the caching policy for the resource being fetched. See Caching. Optional. Used in place of the VoiceXML 2.0 attributes |
|
|||
|
| Parents | Children |
|
|
| | error.badfetch - If the dtmf attribute of <menu> is true and any of the menu's <choice> tags have specified their own DTMF sequences to be something other than "*", "#" or "0". |
| | error.semantic - If not previously declared using JavaScript var within <script> or VoiceXML <var> or via being named a form item, like a <field name="foo"/>. |
| | VoiceXML 2.0 Specification: <choice> |
| | Related tag: <enumerate>, <menu> |
<?xml version="1.0" ?>
<!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
"http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<menu>
<prompt>
Welcome to BeVocal.
<enumerate>
For the <value expr="_prompt"/> service, say <value expr="_prompt"/>
</enumerate>
</prompt>
<choice accept="approximate" next="movies.vxml">movie finder</choice>
<choice next="horoscopes.vxml">horoscopes</choice>
<choice accept="approximate" next="news.vxml">news desk</choice>
</menu>
</vxml>
| Café Home |
Developer Agreement |
Privacy Policy |
Site Map |
Terms & Conditions Part No. 520-0001-02 | © 1999-2007, BeVocal, Inc. All rights reserved | 1.877.33.VOCAL |