Page 1 of 1

Can I use my own grammar for a <choice> instead of the

Posted: Fri Jun 13, 2003 2:16 pm
by support
Yes. If you specify a <grammar> element within a <choice>, that grammar will be used instead of the automatically generated grammar.

Code: Select all

<menu>
  <prompt>Say sports, weather, or news</prompt>
  <choice next="#sports">
    <grammar>sports</grammar>
      One
  </choice>
  <choice next="#weather">
    <grammar>weather</grammar>
      Two
  </choice>
  <choice next="#news">
    <grammar>news</grammar>
      Three
  </choice>
</menu>

<form id="sports">
  <block>
    Sports
  </block>
</form>
<form id="weather">
  <block>
    Weather
  </block>
</form>
<form id="news">
  <block>
    News
  </block>
</form>