New in VoiceXML 2.0. XML grammar input element that indicates alternative user inputs.
<one-of
xml:lang="lang"
>
Alternatives
</one-of>
This tag is used to define grammars in the XML form of the W3C Speech Recognition Grammar Format.
The contained items are alternatives; any one of them may be matched by the user input. Each alternative is an <item> element.
| Parents | Children |
|
|
| | Speech Recognition Grammar Specification: <one-of> |
| | Chapter 4, XML Speech Grammar Format in the Grammar Reference |
<grammar ...>
<rule id="coloredObject">
<ruleref id="color"/>
<ruleref id="object"/>
</rule>
<rule id="color">
<one-of>
<item> red <tag> color="red" </tag> </item>
<item> pink <tag> color="red" </tag> </item>
<item> yellow <tag> color="yellow" </tag> </item>
<item> canary <tag> color="yellow" </tag> </item>
<item> green <tag> color="green" </tag> </item>
<item> khaki <tag> color="green" </tag> </item>
</one-of>
</rule>
<rule id="object">
<one-of>
<item>
<tag> object="vehicle" </tag>
<one-of><item>truck</item><item>car</item></one-of>
</item>
<item>
<tag> object="toy" </tag>
<one-of><item>ball</item><item>block</item></one-of>
</item>
<item>
<tag> object="clothing" </tag>
<one-of><item>shirt</item><item>blouse</item></one-of>
</item>
</one-of>
</rule>
</grammar>
| 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 |