<?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">

 <catch>
  <conf:fail expr="'document caught event ' + _event"/>
 </catch>
 
 <form id="phormOne">
  <var name="startTime" expr="new Date ( )"/>
  <var name="fetchTime" expr="20000"/>
  <var name="fudgeTime" expr="5000"/>

  <catch event="error.badfetch">
    <var name="elapsedTime" expr="( new Date ( ) ) - startTime"/>

    <conf:comment>
      Caught <value expr="_event"/> after <value expr="elapsedTime"/> milliseconds.
    </conf:comment>

    <if cond="_event == 'error.badfetch.http.404'">
      <if cond="elapsedTime &gt; fetchTime">
        <conf:fail expr="_event + ' when elapsed time ' + elapsedTime + 'ms exceeded fetchtimeout ' + fetchTime + 'ms.'"/>
      <else/>
        <!-- BUGBUG: Navigate to test that checks fetchtimeout -->
        <goto next="1149b.vxml"/>
      </if>
    <else/>
        <conf:fail expr="'expected error.badfetch.http.404 but caught ' + _event"/>    
    </if>
  </catch>

  <catch>
    <conf:fail expr="'catch-all caught ' + _event"/>
  </catch>

  <block>
    <submit next="http://example.com/badForm" maxage="0" fetchtimeout="20s"/>
  </block>
  
  <block>
    <conf:fail reason="block"/>
  </block>

 </form>

</vxml>

