Re: VXML 2.1 compliance Suite question

On 17 Sep 2014, at 12:30 am, Shailendra Kumar Verma <> 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. <>

> 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