W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2002

catching error in <goto> inside or outside the form???

From: Jean-Michel Reghem <reghem@babeltech.com>
Date: Thu, 21 Feb 2002 10:01:32 +0100
Message-Id: <>
To: www-voice@w3.org

( --> here is a modify version to permit to throw help event in my 
application, because i don't integrate a builtin help grammar )

<?xml version="1.0"?>
<vxml version="1.0">

<!-- Copyright (c) 2001 VoiceXML Forum.  All rights reserved.
   Samples are for illustrative purposes only.

         <var name="help_evt_caught" expr="0"/>
         <var name="noinput_evt_caught" expr="0"/>
         <var name="nomatch_evt_caught" expr="0"/>
         <var name="error_evt_caught" expr="0"/>
         <var name="overflow_appevt_caught" expr="0"/>

<!-- Personnal adding for <help> -->
         <link event="help">
                 <grammar> help | aide | "help me" </grammar>
                 <dtmf> * </dtmf>

         <field name="a_fld">
                 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

                 Enter a digit or say 'Help'.

                 <if cond="a_fld > 5">
                     <throw event="event.MyApplicationEvent.OverFlow"/>
                     <goto next="#unavailable_form"/>

                 Give the following input for testing. No input. 5. 6. 0.
                 <assign name="help_evt_caught" expr="1"/>
                 <throw event="chk_result"/>

                 The event 'no match' is thrown.
                 <assign name="nomatch_evt_caught" expr="1"/>
                 <throw event="chk_result"/>

                 The event 'no input' is thrown.
                 <assign name="noinput_evt_caught" expr="1"/>
                 <throw event="chk_result"/>

             <catch event="event.MyApplicationEvent.OverFlow">
                 <assign name="overflow_appevt_caught" expr="1"/>
                 Overflow occured.
                 <clear namelist="a_fld"/>
                 <throw event="chk_result"/>

                 The error event is thrown.
                 <assign name="error_evt_caught" expr="1"/>
                 <clear namelist="a_fld"/>
                 <throw event="chk_result"/>


         <catch event="chk_result">
             <if cond="error_evt_caught == 1 
&amp;&amp;  overflow_appevt_caught  == 1 &amp;&amp; help_evt_caught == 1 
&amp;&amp; noinput_evt_caught == 1 &amp;&amp;  nomatch_evt_caught == 1" >
                 All tests completed and result is Pass.
                 Testing continues...<reprompt/>

All the catch works correctly ... but, if i press 5, there is a <goto 

--> Following this compliance test  (but i don't know if it is a compliance 
for w3c specs or for nuance server ;-))  ) , the goto error must be catch 
with the <error> in the <field> ...

My application doesn't catch this error ...
But, if i add
                 The form error event is thrown.
outside the <form>

it is catched ...

What do you think about that???

If I have a goto, it's because i leave the form ... but during the process 
of fetching new form, there is a problem ... thus, for me, the error event 
is throw outside the form, and the compliance test is not correct ... Is 
someone can give me the proof that i'm wrong?



Jean-Michel Reghem
Voice Technology Development Engineer
E-Mail : mailto:reghem@babeltech.com

Babel Technologies S.A.
Boulevard Dolez 33  B-7000 Mons (Belgium)
Tel: +32-(0)65 37.43.03
Received on Thursday, 21 February 2002 03:59:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:03:45 UTC