<?xml version="1.0"?>
<!-- @ Copyright 1998-2003 W3C (MIT, ERCIM, Keio), All Rights Reserved. See http://www.w3.org/Consortium/Legal/. @ -->
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
      xmlns:conf="http://www.w3.org/2002/vxml-conformance">

<!--
    1082: If execution of a block throws an event, the appropriate
          event handler is executed.
-->

  <catch event="org.w3c.foo">
    <conf:pass/>
  </catch>

  <catch>
    <conf:comment>
      Toplevel caught event <value expr="_event"/>
    </conf:comment>
    <conf:fail expr="_event"/>
  </catch>


  <!-- This form tests the form scoped handler. -->
  <form id="form1">
    <catch event="org.w3c.foo">
      <goto next="#form2"/>
    </catch>
    <catch event="org.w3c.foo">
      <conf:fail reason="This form catch should not have been selected."/>
    </catch>
    <block>
      <throw event="org.w3c.foo"/>
    </block>
    <block>
      <conf:fail reason="Should not get here."/>
    </block>
  </form>


  <!-- This form tests the document scoped handler. -->
  <form id="form2">
    <block>
      <throw event="org.w3c.foo"/>
    </block>
    <block>
      <conf:fail reason="Should not get here."/>
    </block>
  </form>

</vxml>
