W3C home > Mailing lists > Public > www-voice@w3.org > April to June 2009

Re: Matching a choice grammar

From: Pavel Cenek <cenek@optimsys.cz>
Date: Wed, 22 Apr 2009 10:36:31 +0200
Message-ID: <49EED70F.8000700@optimsys.cz>
To: raxitsheth2000@gmail.com
Cc: Rajesh N <rajeshn@huawei.com>, www-voice@w3.org, ranjit@huawei.com
Hi Raxit,

You definitely understand the correct context of the query and thank you 
for pointing this part of spec out. Unfortunately, this does not answer the 
question (but it makes it even more interesting).

The problem is that there is no definition of the "menu grammar" term. The 
text you cited could suggest that there can be some grammars placed as 
direct children of the <menu> tag. These could be called "menu grammars". 
However, this is not true - see the following snipped of the VoiceXML 2.0 
schema (available at 
http://www.w3.org/TR/2004/REC-voicexml20-20040316/vxml.xsd)

<xsd:element name="menu">
   <xsd:complexType mixed="true">
     <xsd:choice minOccurs="0" maxOccurs="unbounded">
       <xsd:group ref="audio"/>
       <xsd:element ref="choice"/>
       <xsd:group ref="event.handler"/>
       <xsd:element ref="property"/>
       <xsd:element ref="prompt"/>
     </xsd:choice>
     <xsd:attribute name="id" type="xsd:ID"/>
     <xsd:attributeGroup ref="GrammarScope.attrib"/>
     <xsd:attributeGroup ref="Accept.attrib"/>
     <xsd:attribute name="dtmf" type="Boolean.datatype" default="false"/>
   </xsd:complexType>
</xsd:element>

As I have written in the previous post, the only grammars in the menu 
subtree are the grammars related to <choice>s. Thus there is no other 
possibility that these are the "menu grammars".

Then the "Grammars contained in menu choices cannot specify a scope; if 
they do, an error.badfetch is thrown." sentence implies that they cannot 
specify a scope because the scope for them is specified globally in the 
respective <menu> tag.


Regarding the VoiceXML version number: there is clearly only one possibility

Thanks,

     Pavel

raxitsheth2000@gmail.com wrote:
> 1.
> 
> 
>  >The doubt is whether a <grammar> element, which is a child of a 
> <choice> of
>  >a <menu>, should be considered as a menu grammar or as choice's local
>  >grammar.
> 
> http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml3.1.3
> 
> 
> Menu grammars are also by default given dialog scope, and are active 
> only when the user is in the menu. But they can be given document scope 
> and be active throughout the document, and if their document is the 
> application root document, also be active in any other loaded document 
> belonging to the application. Grammars contained in menu choices cannot 
> specify a scope; if they do, an error.badfetch is thrown.
> 
> [note: i hope i understand the correct context of the query !]
> 
> 
> 2. C'mon its time to specify VoiceXml version number clearly in Original 
> post !!! :)
> 
> 
> 
> -Raxit Sheth
> www.m4mum.com
> www.mykavita.com
Received on Wednesday, 22 April 2009 08:38:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 22 April 2009 08:38:30 GMT