Comment regarding <option>,<grammar> usage

Hey Folks,

Depending on what platform you are using, there seems to be confusion
on whether the <grammar> tag is a valid child of the <option> tag.

Here is where I think some of the confusion originates:

"The use of <option> does not preclude the simultaneous use of
<grammar>. The result would be the match from either 'grammar', not
unlike the occurrence of two <grammar> elements in the same <field>
representing a disjunction of choices."

But more importantly:
"When a simple set of alternatives is all that is needed to specify
the legal input values for a field, it may be more convenient to use
an option list than a grammar. An option list is represented by a set
of <option> elements contained in a <field> element. Each <option>
element contains PCDATA that is used to generate a speech grammar.
This follows the grammar generation method described for <choice> in
Section 2.2.5 ."

We are signaling that <option> should follow the grammar gen method of
<choice>.  Now, while I personally prefer to use field/option instead
of menu/choice for simple dialogs, the following could easily be
rewritten as a menu:

<vxml version="2.0" xml:lang="en-US"  xmlns="" >
<meta name="maintainer" content=""/>

<form id="softDrinkForm">

<field name="softDrinkField">

<option value="coke" dtmf="1">
  <grammar xml:lang="en-US" root = "TOPLEVEL" type="application/grammar-xml">
    <rule id="TOPLEVEL" scope="public">
        <item>new coke</item>
        <item>coca cola</item>

<option value="pepsi" dtmf="2">pepsi</option>

<option value="dew" dtmf="3">mountain dew</option>

    <prompt timeout="5s">
	<break time="500ms"/>
	What is your favorite soft drink?
	<break time="250ms"/>
	<prompt> I heard <value expr="softDrinkField"/>. Okay.</prompt>

This is invalid on most browsers, but were it to become valid, I think
it would supercede the need for a seperate <menu> tag altogether.  I'm
not sure what you folks have cooking for vxml3.0, but it seems to me
that the differences between field/option and menu/choice syntax isn't
enough to warrent keeping them seperate.  Does anyone have thoughts
regarding rolling these into one package?  Also, I would like to see
clarification on using grammar inside of option.  The 2.0 and 2.1
specs don't list much, and have left it up to the vendor to interpret.

Shane Smith

Received on Tuesday, 4 April 2006 08:58:48 UTC