<?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">

<!--
    If in the collect phase an event occurs the appropriate catch
    element is identified and executed in the process phase.
-->

  <noinput>
    <conf:fail reason="This document catch should not be used."/>
  </noinput>

  <noinput count="3">
    <conf:pass/>
  </noinput>

  <catch>
    <conf:comment>
      Toplevel caught event <value expr="_event"/>
    </conf:comment>
    <conf:fail expr="_event"/>
  </catch>


  <!-- This form tests form item scoped catches. -->
  <form id="form1">
    <property name="timeout" value="0s"/>
    <noinput>
      <conf:fail reason="This form catch should not have been selected."/>
    </noinput>
    <field name="a">
      <conf:grammar utterance="alpha"/>
      <noinput count="1">
        <reprompt/>
      </noinput>
      <noinput count="2">
        <goto next="#form2"/>
      </noinput>
      <noinput>
        <conf:fail reason="This form item catch should not have been selected."/>
      </noinput>
    </field>
    <block>
      <conf:fail reason="Should not get here."/>
    </block>
  </form>


  <!-- This form tests the form scoped handler. -->
  <form id="form2">
    <property name="timeout" value="0s"/>
    <noinput count="1">
      <reprompt/>
    </noinput>
    <noinput>
      <conf:fail reason="This form catch should not have been selected."/>
    </noinput>
    <noinput count="2">
      <goto next="#form3"/>
    </noinput>
    <field name="a">
      <conf:grammar utterance="bravo"/>
    </field>
    <block>
      <conf:fail reason="Should not get here."/>
    </block>
  </form>


  <!-- This form tests the document scoped handler. -->
  <form id="form3">
    <property name="timeout" value="0s"/>
    <noinput count="1">
      <reprompt/>
    </noinput>
    <noinput count="2">
      <reprompt/>
    </noinput>
    <noinput count="4">
      <goto next="#form3"/>
    </noinput>
    <noinput>
      <conf:fail reason="This form catch should not have been selected."/>
    </noinput>
    <field name="a">
      <conf:grammar utterance="charlie"/>
    </field>
    <block>
      <conf:fail reason="Should not get here."/>
    </block>
  </form>

</vxml>
