<?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="'catch-all caught ' + _event"/></catch>
  <script><![CDATA[
    var reset = false;
    // see if v (one) was reset
    function check_reset(v)
    {
      if (typeof(v) == 'undefined' || (typeof(v) != 'undefined' && v != 'oneValue'))
      {
        reset = true;
      }
      return true;
    }
  ]]></script>
  <form>
    <field name="one">
      <prompt cond="check_reset(one)"/>
      <conf:speech value="alpha"/>
      <conf:grammar utterance="alpha">
        <conf:key name="one" value="oneValue"/>
      </conf:grammar>
      <filled> 
        <if cond="two == undefined"> <!-- first time --> 
          <assign name="reset" expr="false"/>
        <else/> <!-- second time -->
          <if cond="reset">
            <conf:fail reason="field one was reset"/>
          <else/>
            <conf:pass/>
          </if>
        </if>
       </filled>
    </field>

    <field name="two">
      <conf:speech value="bravo"/>
      <conf:grammar utterance="bravo"/>
      <filled> 
        <goto nextitem="one"/> 
      </filled>
    </field>

    <block>
      <conf:fail reason="block"/>
    </block>
  </form>

</vxml>
