VoiceXML Forum Community Message Board


Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» VoiceXML Forum Community Message Board   » Newbies   » grammar values to multiple fields

 - UBBFriend: Email this page to someone!    
Author Topic: grammar values to multiple fields
alessiodt
Junior Member
Member # 3304

Rate Member
Icon 5 posted November 22, 2005 07:37 AM      Profile for alessiodt     Send New Private Message       Edit/Delete Post   Reply With Quote 
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? [Confused]

Thanks

Alessio

Posts: 2 | From: Italy | Registered: Nov 2005  |  IP: Logged
mheadd
Member
Member # 3181

Member Rated:
4
Icon 1 posted November 22, 2005 07:36 PM      Profile for mheadd   Author's Homepage   Email mheadd   Send New Private Message       Edit/Delete Post   Reply With Quote 
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
alessiodt
Junior Member
Member # 3304

Rate Member
Icon 1 posted November 23, 2005 08:41 AM      Profile for alessiodt     Send New Private Message       Edit/Delete Post   Reply With Quote 
thanks a lot [Smile]

Alessio

Posts: 2 | From: Italy | Registered: Nov 2005  |  IP: Logged


All times are Eastern  
Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | VoiceXML Forum



Powered by Infopop Corporation
UBB.classicTM 6.3.1.2