FIA explanation and example problem

I just sent a message out with an example of a problem introduced by
a clarification of FIA but the message does not include a statement of
the problem.
This is a statement of the problem.

PROBLEM STATEMENT:


.....
However, one thing that I wanted to comment on immediately,
which should probably be addressed to Steph Tryphonas concerns a change
to the FIA which introduces ambiguity.

The previous version (and this new version) states in section 2.4 that

"If the <filled> element appears inside a field item, it specifies an
action
to perform after that field is filled in by user input. This is a
notational convenience for a form-level <filled> element that triggers
on a
single field item:..."

Thus,

<field name="ABC">
  <filled>
  ...
  </filled>
</field>

is equivalent to

<form id=XYZ>
  ...
  <field name="ABC">
  ...
  </filed>
  <filled namelist="ABC">
  ...
  </filled>
</form>

the former being a notational convenience for the latter.

Unfortunately, the addition to the FIA (in this new version) of the
phrase:

"If an event is thrown during the execution of a <filled>, event handler

selection starts in the scope of the <filled>, which could be a form
item or
the form itself."

changes things so that the above are NO LONGER EQUIVALENT, and renders
the
"notational convenience" statement FALSE.  It will also CHANGE THE
SEMANTICS
for existing VXML applications, and as a side effect, make life more
difficult
for implementors who may have to reenter a form item scope before
processing
a <filled> element after exiting that scope in order to process previous
<filled>
elements.

I understand that it may be convenient for an application to look at the

value of a filled form item and reject it by undefining the form item
and
throwing a nomatch event, but this can be accomplished by a subdialog.

If this change is actually desired, I think it should be made by
considering
form item <filled> elements as having different execution semantics than

form <filled> elements, as to when they are executed.  I would define
form
item <filled> elements to be executed immediately after their form item
is
filled and before any form level <filled> elements which may apply, even

if they precede in document order.  Then the form item <filled> element
can be executed in the scope of the form item.  However, doing this
would also
force us to answer the question "if a form item <filled> element clears
its
form item, is the form item filled with regard to form level <filled>
elements?"
Currently, since logically all <filled> elements execute at the form
level,
even if one of them clears a filled form item, all others which are
applicable
will still execute because of the just_filled flag.  It would probably
also
be necessary to clear the just_filled flag in this case.

--------------------------------------------------------------------------------------------------

EXAMPLE


Try this:

<?xml version="1.0"?>
<vxml version="1.0">
<form id="x">
  <field name="abc" type="boolean">
    <prompt>Is this a test?</prompt>
    <filled>
      <prompt>Executing filled element for form item abc.</prompt>
      <if cond="!abc">
        <throw event="nomatch"/>
      </if>
    </filled>
    <nomatch>
      <prompt>Executing form item abc nomatch handler.</prompt>
    </nomatch>
  </field>
  <nomatch>
    <prompt>Executing form level nomatch handler.</prompt>
  </nomatch>
</form>
</vxml>

Under current standard, I believe this should execute as:

--> speakingTTS ' Is this a test?'
--> activating field grammar boolean(boolean)
--> enter voice data
no
--> speakingTTS ' Executing filled element for form item abc.'
--> deactivating field grammar boolean
--> speakingTTS ' Executing form level nomatch handler.'

Under the reworded FIA, it would execute as:

--> speakingTTS ' Is this a test?'
--> activating field grammar boolean(boolean)
--> enter voice data
no
--> speakingTTS ' Executing filled element for form item abc.'
--> deactivating field grammar boolean
--> speakingTTS ' Executing form item abc nomatch handler.'

The current standard says that a form item <filled> element is a
notational
convenience for a form level <filled> element which explicitly names
the form item, so that the following transformation of the program
should
be equivalent:

<?xml version="1.0"?>
<vxml version="1.0">
<form id="x">
  <field name="abc" type="boolean">
    <prompt>Is this a test?</prompt>
    <nomatch>
      <prompt>Executing form item abc nomatch handler.</prompt>
    </nomatch>
  </field>
  <filled namelist="abc">
    <prompt>Executing filled element for form item abc.</prompt>
    <if cond="!abc">
      <throw event="nomatch"/>
    </if>
  </filled>
  <nomatch>
    <prompt>Executing form level nomatch handler.</prompt>
  </nomatch>
</form>
</vxml>

but under the new wording, it would not be the same.

Hope this helps.

Dan


--
The road of excess leads to the palace of wisdom. (William Blake - The
Marriage of Heaven and Hell)

Received on Tuesday, 5 December 2000 10:30:55 UTC