srgs grammar help
Posted: Wed Aug 27, 2008 4:57 pm
I'm having trouble working with srgs+xml grammars.
"field1.english" is empty but doesn't cause an error when I run this script. "field1" holds a string which is the contents of the tag with the semi colons removed. That's difficult to parse. What am I missing here?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0">
<form id="form1">
<field name="field1">
<grammar
root="grammar1"
type="application/srgs+xml"
mode="voice"
>
<rule id='grammar1'>
<one-of>
<item>
One
<tag>
english='One';integer='1'
</tag>
</item>
<item>
Two
<tag>
english='Two';integer='2'
</tag>
</item>
</one-of>
</rule>
</grammar>
<prompt>
One or two.
</prompt>
<filled>
<prompt>
You said.
<value expr="field1.english" />
</prompt>
</filled>
</field>
</form>
</vxml>