W3C home > Mailing lists > Public > www-voice@w3.org > October to December 2006

Re: private rules

From: Mihai Sucan <mihai.sucan@gmail.com>
Date: Fri, 20 Oct 2006 14:53:21 +0300
To: "Petrova Anastasia" <Anastasia.Petrova@bercut.com>, www-voice@w3.org
Message-ID: <op.thpxy71qmcpsjgr0b0dp@localhost.localdomain>

Le Fri, 20 Oct 2006 14:27:33 +0300, Petrova Anastasia  
<Anastasia.Petrova@bercut.com> a écrit:

> Hello. A private-scoped rule cannot be referenced in the rule
> definitions of other grammars and in other non-grammar documents and is
> directly accessible only within its containing grammar. But if I have a
> private rule, and user says something matching this rule, will this mean
> that e.g. a field is filled? Or only public rules can be matched by user
> input?
>
> Best regards, Anastasia Petrova

Hello!

Yes, a private-scoped rule cannot be referenced in the definition of other  
grammar rules, nor in non-grammar documents. It's only directly accessible  
within its containing grammar. Also, your VoiceXML <grammar /> element  
cannot use as a root a private rule.

However, a private rule which is not used will never match. The same  
applies to public rules.

So, given the following SRGS grammar:

START:--
root $whatever;

$pages = contact | services | portfolio;

$numbers = one | two | three;

$countries = romania | france | germany;

public $people = me | you | her;

public $whatever = $pages | $countries;
--EOF;

$numbers and $people will never match, even if the user says  
"one/two/three" or "me/you/her". This is because the root rule $whatever  
never makes use of $numbers nor $people rules.



-- 
http://www.robodesign.ro
ROBO Design - We bring you the future
Received on Friday, 20 October 2006 11:53:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 30 October 2006 12:49:04 GMT