I thought I might be even more explicit, since I still can't get this grammar to work. If I use your recommendation and put the xml element back into the top of the document,
Code: Select all
<?xml version="1.0"?>
<grammar root="mainmenu" type="application/srgs+xml" mode="voice" version="1.0" >
<!-- does user want main menu? -->
<rule id="mainmenu" scope="public">
<token>main menu</token>
</rule>
</grammar>
I've also tried the item element and no element whatsoever to delineate the spoken text. All fail.
I get the following output from your XML validator with the xml element in place:
Code: Select all
ERROR:
Fatal Error at line 0, char 6
Message: No processing instruction starts with 'xml'
Using the full xml and DOCTYPE, as is my normal practice, gives the same error message. In other words, these lines at the top are also rejected by the validator:
Code: Select all
<?xml version="1.0" encoding ="UTF-8"?>
<!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN" "http://www.w3.org/TR/speech-grammar/grammar.dtd">
If I disregard the validator's assessment and attempt to use this grammar anyway, it still doesn't work. I call this grammar using
Code: Select all
<grammar src="http://assassin.homeip.net:15338/~moshe/devel/freewill/trunk/vxml/grammars/dailyupdate.grxml" type="application/srgs+xml" mode="voice" root="mainmenu"/>
[/code]