Plum DEV Documentation
voicexml:tags:one-of

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

voicexml:tags:one-of [2014/05/29 18:47]
jennifer added meta description
voicexml:tags:one-of [2019/09/17 12:29]
Line 1: Line 1:
-{{description>​‹one-of› VoiceXML tag details, attributes and VXML code example | A one-of block specifies a set of alternative rules contained within an item block.}} 
-=====<​one-of>​===== 
- 
-A <​one-of>​ block specifies a set of alternative legal rule expansions each of which is contained within an <​item>​ block. 
-====Attributes==== 
-| xml:lang | (defaults to "​xml:​lang"​ global property or the "​xml:​lang"​ attribute of the <​grammar>​ tag) The language identifier as defined in [[http://​www.ietf.org/​rfc/​rfc3066.txt|RFC3066]]. | 
- 
-====Notes==== 
- 
-For examples and usage information,​ please refer to the [[http://​www.w3.org/​TR/​2002/​CR-speech-grammar-20020626/​|Speech Recognition Grammar Specification]]. 
- 
-====Example==== 
-<​code>​ 
-<?xml version="​1.0"?>​ 
-<vxml version="​2.0">​ 
-  <​form>​ 
-    <field name="​animal">​ 
-      <grammar type="​application/​srgs+xml"​ root="​ROOT"​ mode="​voice">​ 
-        <rule id="​ROOT">​ 
-          <​one-of>​ 
-            <​item>​Dog</​item>​ 
-            <​item>​Cat</​item>​ 
-          </​one-of>​ 
-        </​rule>​ 
-      </​grammar>​ 
-      <​prompt>​ 
-        Say either dog or cat. 
-      </​prompt>​ 
-      <​filled>​ 
-        <​prompt>​ 
-          You said <value expr="​animal"/>​. Goodbye. 
-        </​prompt>​ 
-        <​exit/>​ 
-      </​filled>​ 
-    </​field>​ 
-  </​form>​ 
-</​vxml>​ 
-</​code>​ 
-The output of the above script would be: 
- 
-Computer: Say either dog or cat. \\ 
-Human: Dog. \\ 
-Computer: You said dog. Goodbye. \\ 
- 
- 
-====Child Tags==== 
- 
-[[voicexml:​tags:​item|<​item>​]] 
- 
- 
-====Parent Tags==== 
- 
-[[voicexml:​tags:​item|<​item>​]],​ [[voicexml:​tags:​rule|<​rule>​]] 
-