|
Newsletters
|
|
|
|
|
Voice XML Reference
Voice XML Reference
Bookmark this page
The choice Element - <choice>
Description: The choice element serves several purposes:
<ul>
<li>It specifies a speech grammar fragment and/or a DTMF grammar fragment that determines when that choice has been selected.</li>
<li>The contents are used to form the <b><enumerate></b> prompt string.</li>
<li>It specifies the URI to go to when the choice is selected.</li>
</ul>
Example:
<menu>
<property name="inputmodes" value="dtmf"/>
<prompt>
For sports press 1, For weather press 2, For Stargazer astrophysics press 3.
</prompt>
<choice dtmf="1" next="http://www.sports.example/vxml/start.vxml"/>
<choice dtmf="2" next="http://www.weather.example/intro.vxml"/>
<choice dtmf="3" next="http://www.stargazer.example/voice/astronews.vxml"/>
</menu>
| Attributes |
| Name |
Value |
Description |
| dtmf |
PCDATA |
The DTMF sequence for this choice. |
| next |
URI |
The URI of next dialog or document. |
| expr |
PCDATA |
Specify an expression to evaluate instead of specifying a next. |
| caching |
'safe' or 'fast' |
Eithere safe to force a query to fetch the most recent copy of the content, or fast to use the cached copy of the content if it has not expired. If not specified, a value derived from the innermost caching property is used. |
| fetchaudio |
URI |
The URI of the audio clip to play while the fetch is being done. If not specified, the fetchaudio property is used, and if that property is not set, no audio is played during the fetch. |
| fetchint |
"prefetch", "safe", "stream" |
Defines when the interpreter context should retreive content from the server. prefetch indicates a file may be downloaded when the page is loaded, whereas safe indicates a file that should only be downloaded when actually needed. In the case of a very large file (implying long download times) or a streaming audio source, stream indicates to the interpreter context to begin processing the content as it arrives and should not wait for full retrieval of the content. If not specified, a value derived from the innermost relevant *fetchint property is used. |
| fetchtimeout |
integer |
The interval to wait for the content to be returned before throwing an error.badfetch event. If not specified, a value derived from the innermost fetchtimeout is used. |
Back to Tag Listing
|
|