VoiceXML 2.1 Development GuideHome  |  Frameset Home


<example>  element

The example element is part of the Speech Recognition Grammar Specification, and is only usable within XML grammar constructs. This element defines an 'example' phrase, useful to the developer, which can be used to create a successful recognition result for the grammar in question.


usage
<example />


attributes
none


shadow variables
none


parents
<rule>


children
none


code samples
<MyGram.xml>
<?xml version= "1.0"?>

<grammar xmlns="http://www.w3.org/2001/06/grammar"
  xml:lang="en-US" root = "MYRULE">

  <rule id="MYRULE" scope="public">

    <example> spanish for tripe </example>
    <example> OR, spanish for really lame </example>
  <one-of>
    <item> menudo
      <tag> <![CDATA[  <F_1 "menudo">  ]]>  </tag>
    </item>
   
    <item> n sync
      <tag> <![CDATA[  <F_1 "n sync">  ]]>  </tag>
    </item>

  </one-of>
    </rule>

</grammar>

<:Example.vxml>
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

<form id="F1">

  <field name="F_1">
    <prompt>
      which boy band should be sent to work in the salt mines
      as punishment for subverting good taste in music?
      Is it menudo, or N sync?
    </prompt>

    <grammar src="MyGram.xml" type="application/grammar-xml"/>

    <filled>

      <prompt>
        I couldnt agree with you more.
      </prompt>

  </filled>

  </field>

</form>

</vxml>



additional links
W3C SRGS 1.0 Specification


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login



© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site