VoiceXML 2.1 Development GuideHome  |  Frameset Home


<help>  element

The help element provides a syntactic shorthand for <catch event=”help”>. This element is used as an error handler for the help event which is contained in the Universal Grammar of any voiceXML application. Transitioning elements and prompts to assist the caller are usually nested within the help tags.


usage
<help cond="CDATA" count="CDATA">


attributes
condData Type: CDATADefault: Optional (true)
The cond attribute specifies a Boolean expression, which must equate to ‘true’ in order for the content to be visited and executed. Any standard ECMAScript Boolean value is valid for this attribute.
countData Type: CDATADefault: Optional
The count attribute allows the developer fine grained control over event handling upon multiple event occurrences. When an event is thrown for the first time, the catch element with a count of 1 will be executed. Upon the second instance of the same event, the FIA will look for a catch handler with a count value of 2, if one exists, otherwise, it will simply execute the catch handler with the count of 1 again.



shadow variables
_eventThe _event shadow variable equates to a string specifying  the event name that caused the exception, thereby making it available for the developer to log or submit the resultant exception/error to a database, or to save it to another local variable to get an application ‘error report’.



parents
<field> <form> <initial> <menu> <record> <subdialog> <transfer> <vxml>


children
<assign> <audio> <clear> <disconnect> <enumerate> <exit> <goto> <if> <log> <prompt> <reprompt> <return> <script> <submit> <throw> <value> <var>


code samples
<Help count-cond> sample
<?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"/>

<property name="universals" value="help"/>


<form id="F1">

  <!-- We must enable the 'help' universal grammar first -->
  <property name="universals" value="help"/>

 
  <field name="F_1">
    <grammar type="text/gsl"> [(slappy white)]</grammar>
    <prompt> say help here.</prompt>

    <help count="1" cond="false">
      <prompt> since the condition is set to false, this handler will be skipped</prompt>
    </help>

    <help count="1" cond="true">
      <prompt> this is the first occurance of the help event. say help again.</prompt>
    </help>

    <help count="2" cond="true">
      <prompt> this is the second occurance of the help event. goodbye.</prompt>
      <disconnect/>
    </help>

  </field>

  <filled>
    <prompt>why did you fill the field, you dummy?</prompt>
  </filled>

</form>

</vxml>

<Help-shadowvariables> sample
<?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"/>


  <!-- We must enable the 'help' universal grammar first -->
  <property name="universals" value="help"/>


  <help>
  <prompt>
    <!-- These will be undefined, as no value is inherently applied -->
    The message is <value expr="_message"/>.
  <!-- *********************************************************** -->
    The event is <value expr="_event"/>.
  </prompt>
  </help>


  <form id="F1">

  <field name="F_1">
    <grammar type="text/gsl"> [dummy]</grammar>

    <prompt>
    Say help to check out the shadow variable values.
    </prompt>

    <filled>
    <prompt>
      You really shouldnt have said dummy, you dummy.
    </prompt>
    </filled>

  </field>

</form>

</vxml>



additional links
W3C 2.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