Plum DEV Documentation
voicexml:tags:example

Differences

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

Link to this comparison view

voicexml:tags:example [2014/05/29 15:44]
jennifer added meta description
voicexml:tags:example [2019/09/17 12:29]
Line 1: Line 1:
-{{description>​‹example› VoiceXML tag details, attributes and VXML code example | example elements can be provided within a rule and are disregarded by the parser.}} 
-=====<​example>​===== 
- 
-Any number of "​example"​ elements may be provided as the initial content within a "​rule"​ element. The content of this element is disregarded by the parser. 
-====Attributes==== 
-|None| 
- 
-====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">​ 
-          <​example>​ feed the dog </​example>​ 
-          <​example>​ scratch the cat </​example>​ 
-          <​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"/>​. 
-        </​prompt>​ 
-        <​exit/>​ 
-      </​filled>​ 
-    </​field>​ 
-  </​form>​ 
-</​vxml>​ 
-</​code>​ 
- 
-The output of the above script would be: 
- 
-Computer: Say either dog or cat. \\ 
-User: <say: '​Cat'>​ \\ 
-Computer: You said cat. *application hangs up* \\ 
- 
-Note that the <​example>​ tag has no effect on the script. 
- 
- 
-====Child Tags==== 
- 
-None 
- 
- 
-====Parent Tags==== 
- 
-[[voicexml:​tags:​rule|<​rule>​]] 
-