Page 1 of 1

Valid PHP-based grammar fails. Are GET-style URLs supported?

Posted: Tue Dec 25, 2007 9:40 am
by moshe
The following URL creates a valid grammar: http://assassin.homeip.net:15338/~moshe ... iator=true
For some reason the I get an error:

Code: Select all

Error creating grammar
received event: error.grammar 
I have tested this grammar and it does work on other (non plumVoice) platforms.

I've run the URL through the SRGS+XML validator and have seen no errors, but that doesn't give me any insight because (IIRC) the SRGS+XML validator web tool only works on inline grammars and gives a false "pass" on independent grammar files.

Right now I'm starting to believe that the grammar element does not support PHP-based grammars or perhaps does not support GET-style URLs.

Any insight would be appreciated.

Not the PHP, but the grammar

Posted: Wed Dec 26, 2007 9:22 am
by moshe
I've just run some additional tests, and it's clear that the problem isn't with GET style prompts (so far). The problem is that this completely legal grammar doesn't parse.

The grammar validator passes the grammar URL, but then again I get "no errors" encountered even if I enter a bogus URL.

Aha! Figured it out after some errant synapses fired...

Code: Select all

<?xml version="1.0" encoding ="UTF-8"?>
doesn't work for grammars; the encoding attribute crashes the grammar parser! Use

Code: Select all

<?xml version="1.0" encoding ="UTF-8"?>
instead.