<property>

Controls settings specific to the BeVocal VoiceXML implementation platform.

Syntax

 <property
     name="string"
     value="string"
     bevocal:expr="js_expression"
 />

Description

Sets values that affect platform behavior and/or represent default attribute values.

Attribute Description
name

Property name. The name can be any of the supported properties described in Chapter  12, Properties.

value

Property value. The allowable values depend on the property specified in the name attribute.

bevocal:expr

Property value. The JavaScript expression is evaluated whenever the <property>'s scope is reinitialized.

The property settings apply to the parent element and all descendents. However, property values set at lower levels take precedence.

The value of time-related properties must be an unsigned number, optionally followed by s for seconds or ms for milliseconds. If there is no suffix, seconds are assumed.

Tip:

 •  If a JavaScript expression contains any of the characters "<", ">", or "&", that character must be replaced with the corresponding escape sequence "&lt;", "&gt;", or "&amp;". For more information, see JavaScript Quick Reference.

Usage

Parents Children
<bevocal:listen>
<bevocal:register>
<bevocal:verify>
<field>
<form>
<initial>
<menu>
<record>
<subdialog>
<transfer>
<vxml>

None.

See Also

 •  VoiceXML 2.0 Specification: <property>

Examples

Example 1--bargein property:

 <?xml version="1.0" ?>
 <!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
  "http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
 
 <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
   <nomatch><reprompt/></nomatch>
 
   <property name="bargein" value="true"/>
 
   <form id="form_property">
     <property name="bargein" value="false"/>
     <block>
       <prompt> 
         This is a prompt where you can not barge in 
       </prompt>
       <goto next="#form2"/>
     </block>
   </form>
   <form id="form2">
     <field name="option" type="boolean"> 
       <prompt>
         Try barging in by saying either yes or no as I speak.
         This is a prompt where you can interrupt me.
       </prompt>
       <filled>
         <if cond="option">
           <prompt>You want to go. Goodbye.</prompt>
           <disconnect/>
         <else/>
           <prompt> Continuing till you say yes. </prompt>
           <clear/>
         </if>
       </filled>
     </field>
   </form>
 </vxml>

Example 2--timing properties:

 <?xml version="1.0" ?>
 <!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
  "http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
 
 <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
   <form>
     <!-- If you say nothing, it should pause for 10s then land here -->
       
     <property name="timeout" value="10s"/>
     <noinput>
       <prompt>The caller said nothing.</prompt>
       <reprompt/>
     </noinput>
       
     <!-- If you say "one" then stop, it should pause for 5s then land here -->
     
     <property name="incompletetimeout" value="5s"/>
     <nomatch>
       <prompt>The caller did not say enough to match the grammar.</prompt>
       <reprompt/>
     </nomatch>
       
     <!-- If you say "one two three four", it should land here immediately -->
     
     <property name="completetimeout" value="0.1s"/>
     <filled>
       <prompt>The caller said the correct thing.</prompt>
       <exit/>
     </filled>
     
     <field name="one">
       Say one two three four
       <grammar type="application/x-nuance-gsl">
         (one two three four)
       </grammar>
     </field>
     
     <block>
       Finished. This should never play.
     </block>
   </form>
 </vxml>

Example 3--maximum error properties:

 <?xml version="1.0" ?>
 <!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
  "http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
 
 <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 
   <!--this tests the maxerrors and maxdialogerrors properties. -->
  
   <property name="bevocal.maxerrors" value="9"/>
   <property name="bevocal.maxdialogerrors" value="4" />
   <property name="timeout" value="1.5s" />
   <noinput> i did not hear anything </noinput>
 
   <form id="firstform">
     <catch event="error.bevocal.maxdialogerrors_exceeded">
       <prompt>
         max dialog errors event detected. going to next form.
       </prompt>
       <goto next="#secondform"/>
     </catch>
     <catch event="error.bevocal.maxerrors_exceeded">
       <prompt>
         total max errors event detected. this should not happen. exiting test.
       </prompt>
       <exit/>
     </catch>
     <field name="first" type="boolean">
       please do not say anything. you should hear the no input message 3 times 
before
       moving to the next field.
     </field>
   </form>
  
   <!-- When you reach the second form, 4 errors have occurred. -->
   <form id="secondform">
     <property name="bevocal.maxdialogerrors" value="3" />
     <catch event="error.bevocal.maxdialogerrors_exceeded">
       <prompt>
         max dialog errors event detected. going to next form.
       </prompt>
       <goto next="#thirdform"/>
     </catch>
     <catch event="error.bevocal.maxerrors_exceeded">
       <prompt>
         total max errors event detected. this should not happen. exiting test.
       </prompt>
       <exit/>
     </catch>
     <field name="first" type="boolean">
       please do not say anything. you should hear the no input message
       2 times before moving to the next field.
     </field>
   </form>
 
   <!-- When you reach the third form, 7 errors have occurred;
     After two more errors, you will exceed the maximum for the call. -->
   <form id="thirdform">
     <catch event="error.bevocal.maxdialogerrors_exceeded">
       <prompt>
         max dialog errors event detected. this should not happen.
       </prompt>
       <exit/>
     </catch>
     <catch event="error.bevocal.maxerrors_exceeded">
       <prompt>
         total max errors event detected. the test was successful. now exiting.
       </prompt>
       <exit/>
     </catch>
     <field name="first" type="boolean">
       please do not say anything. you should hear the no input 
       message 1 time before you get a max total errors event.
     </field>
   </form>
 </vxml>

[Show Frames]   [FIRST] [PREVIOUS] [NEXT]
BeVocal, Inc. 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