| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| cond | Data Type: CDATA | Default: 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. | ||
| count | Data Type: CDATA | Default: 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. | ||
| _event | The _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’. |
| <?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> |
| <?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> |
| ANNOTATIONS: EXISTING POSTS |
punkin
|
|
| <property name="universals" value="help"/>
Do I really need to enable "help"? It works as expected without this <property> tag. |
|
VoxeoDante
|
|
| Hello Punkin,
While the universal may be turned on by default on the Prophecy platform at this time, this is a platform dependent feature and is not required by the spec. In order to best comply with the specification and to help ensure a platform change does not affect the operation of the application I would recommend turning it on. Please let us know if there are any further questions. Cheers, Dante Vitulano Voxeo Corporation |
| login |