Plum DEV Documentation
voicexml:tags:ruleref

Differences

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

Link to this comparison view

voicexml:tags:ruleref [2014/05/30 15:10]
jennifer added meta description
voicexml:tags:ruleref [2019/09/17 12:29]
Line 1: Line 1:
-{{description>​‹ruleref› VoiceXML tag details, attributes and VXML code example | A ruleref tag can reference another defined rule within the same local grammar.}} 
-===== <​ruleref>​ ===== 
- 
- 
-A <​ruleref>​ tag can reference another defined rule within the same local grammar. 
-==== Attributes ==== 
- 
-| uri | Specifes a local rule reference. Precede the local rule identifier with a "#"​ symbol.| 
-| type | This attribute is not supported. | 
-| special | Can be set to either "​null"​ or "​void"​. | 
-| 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 id="​start">​ 
-    <field name="​dt">​ 
-      <grammar root="​main"​ type="​application/​srgs+xml"​ mode="​voice">​ 
-        <rule id="​main"​ scope="​public">​ 
-          <​item>​ 
-            <ruleref uri="#​month"/>​ 
-            <ruleref uri="#​day"/>​ 
-          </​item>​ 
-          <tag> month = month.SWI_literal;​ day = day.SWI_literal;​ </​tag>​ 
-        </​rule>​ 
-      ​ 
-        <rule id="​month">​ 
-          <​one-of>​ 
-            <​item>​May</​item>​ 
-            <​item>​June</​item>​ 
-            <​item>​October</​item>​ 
-          </​one-of>​ 
-        </​rule>​ 
-      ​ 
-        <rule id="​day">​ 
-          <​one-of>​ 
-            <​item>​first</​item>​ 
-            <​item>​second</​item>​ 
-            <​item>​third</​item>​ 
-          </​one-of>​ 
-        </​rule> ​     ​ 
-      </​grammar>​ 
-      ​ 
-      <​prompt>​Please say a date.</​prompt>​ 
-      ​ 
-      <​filled>​ 
-        <prompt bargein="​false">​ 
-          I think you said month <value expr="​dt.month"/> ​ 
-          day <value expr="​dt.day"/>​. 
-        </​prompt>​ 
-      </​filled>​ 
-      ​ 
-      <​nomatch>​ 
-        I'm sorry, I didn't catch that. 
-        <​reprompt/>​ 
-      </​nomatch>​ 
-    </​field>​ 
-  </​form>​ 
-</​vxml>​ 
-</​code>​ 
-The output of the above script would be: 
- 
-Computer: Please say a date. \\ 
-Human: June second. \\ 
-Computer: I think you said month June day second. 
- 
- 
-====Child Tags==== 
- 
-None 
- 
- 
-====Parent Tags==== 
- 
-[[voicexml:​tags:​item|<​item>​]],​ [[voicexml:​tags:​rule|<​rule>​]] 
-