I'm getting a really strange grammar error that I'm just not seeing the root cause for:
Error creating grammar
Message from ASR engine:
---------
SWI_PARSER_XERCES_ERROR| XML syntax error| STRING_GRAMMAR | In XML grammar at line 3 char 6: No processing instruction starts with 'xml'
---------
This happens when I invoke the grammar from a field with the following parameters set, and I try and enter a DTMF input (which should be disallowed in the first place, per my property settings). Worth noting that I do have a single <link> grammar active at the application scope, but aside from this there are no other grammars active, and I have unsuccessfully tried setting modal to 'true' within the field to see if this makes a difference:
APPROOT LINK GRAMMAR:
Code: Select all
<link expr="application.basePath + 'recordVM.xml'" dtmf="0">
</link>
INVOKING DIALOG:
Code: Select all
<field name="loopResName" slot="boolSlot">
<property name="inputmodes" value="voice"/>
<grammar type="application/srgs+xml" srcexpr="'boolGrammar.xml'" mode="voice"/>
...
</field>
BOOLGRAMMAR.XML
Code: Select all
<?xml version="1.0">
<grammar type="application/srgs+xml" root="BOOL" xml:lang="en-US" mode="voice">
<rule id="BOOL">
<one-of>
<item>
<one-of>
<item>yes</item>
<item>yeah</item>
<item>yep</item>
<item>yup</item>
<item>sure</item>
<item>surely</item>
<item>fine</item>
<item>okay</item>
<item>all right</item>
<item>right</item>
<item>thats right</item>
<item>correct</item>
<item>thats correct</item>
<item>uh huh</item>
<item>yepper</item>
<item>affirmative</item>
<item>yes please</item>
</one-of>
<tag>boolSlot="true";</tag>
</item>
<item>
<one-of>
<item>no</item>
<item>no way</item>
<item>wrong</item>
<item>incorrect</item>
<item>nope</item>
<item>nah</item>
<item>thats wrong</item>
<item>thats incorrect</item>
<item>no thanks</item>
<item>negative</item>
<item>negatory</item>
<item>cancel</item>
<item>never</item>
</one-of>
<tag>boolSlot="false";</tag>
</item>
</one-of>
</rule>
</grammar>
Thanks,
Matt