|
Author
|
Topic: grammar values to multiple fields
|
alessiodt
Junior Member
Member # 3304
Rate Member
|
posted November 22, 2005 07:37 AM
Hi, I have an external grammar and i want to fill multiple fields with one utterance. For instance:
code:
<vxml xmlns="http://www.w3.org/2001/vxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd" version="2.0"> <form> <grammar type="application/srgs+xml" src="grammar.grxml"/> <block> <prompt>What's your name?</prompt> </block> <field name="myname" slot="name"/> <field name="mysurname" slot="surname"/> </form> </vxml>
............
grammar.grxml:
code:
<grammar xmlns="http://www.w3.org/2001/06/grammar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd" version="1.0" xml:lang="en-US" root="main"> <rule id="main" scope="public"> <ruleref uri="#name"/> <ruleref uri="#surname"/> </rule> <rule id="name"> <one-of> <item>Alessio</item> <item>Giovanni</item> <item>Giulio</item> </one-of> </rule> <rule id="surname"> <one-of> <item>Rossi</item> <item>Bianchi</item> <item>Verdi</item> </one-of> </rule> </grammar>
How can i do this?
Thanks
Alessio
Posts: 2 | From: Italy | Registered: Nov 2005
| IP: Logged
|
|
mheadd
Member
Member # 3181
Member Rated:
|
posted November 22, 2005 07:36 PM
Alessio:
You can designate the slots that receive returned values from a grammar using the <tag> element, part of the SRGS specification.
It is possible to return values to multiple slots using the <tag> element -- there is a reference to this on the Voxeo website using both the GSL grammar format and the XML grammar format.
Hope this helps.
-------------------- Mark VoiceinGov.org http://www.voiceingov.org
Posts: 55 | Registered: Jun 2005
| IP: Logged
|
|
|
|