W3C home > Mailing lists > Public > www-voice@w3.org > July to September 2014

Re: VXML 2.1 compliance Suite question

From: Dean, Kyle <KDean@west.com>
Date: Thu, 18 Sep 2014 00:12:31 +0000
To: Shailendra Kumar Verma <shailendra.kumar.verma@convergys.com>
CC: "www-voice@w3.org" <www-voice@w3.org>
Message-ID: <23D41713-C19A-4E1D-A2A1-7FF415E77B22@west.com>
On 17 Sep 2014, at 12:30 am, Shailendra Kumar Verma <shailendra.kumar.verma@convergys.com> wrote:
> 1)      Test case # 101, page is referring session variable lastresult$.recording. However, I feel that the page 101a.txml and 101b.txml should be referring application.lastresult$.recording. Isnít?

In this case, the variable name "lastresult$" resolves to "application.lastresult$".

The variable "lastresult$" is defined by the VXML processor in the "application" scope.
The ECMAScript is executing in the (anonymous) scope of the <block> element, and will look through the scope chain to find "lastresult$"
   (anonymous) -> dialog -> document -> application

But I usually write "application.lastresult$" to be clear.

See 5.1.2 Variable Scopes. <http://www.w3.org/TR/voicexml20/#dml5.1.2>

> 2)      Test case# 5, here we are trying to activate new grammar for every nomatch count. By implementing so, we feel that performance will be hit for VoiceXML browser. Do we see that browser should support that way?

This test is testing the @srcexpr attribute of grammar. Each loop, the srcexpr does evaluate to a different value.
So yes, you may have to activate a different grammar after each nomatch.

It is not a performance hit, because if you do not activate three different grammars during the test, you are not conforming.
- first.grxml
- second.grxml
- third.grxml

The first two look for "4", while the third looks for "1".
The test will send a "1", so only the third grammar will match.

Interestingly, first.grxml and second.grxml are exactly the same source code. Possibly, this may allow you an optimisation. If you detect the source is the same, you could avoid re-compiling the grammar, and leave the grammar activated.


In real life, the developer may use a nomatch to switch to a simpler grammar, or vary the language, or anything. Who knows what lurks in the hearts of VXML developers?
Received on Thursday, 18 September 2014 09:33:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:45 UTC