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

Incorrect example in the CCXML spec

From: Petr Kuba <kuba@optimsys.cz>
Date: Thu, 13 Nov 2008 13:19:53 +0100
Message-ID: <491C1B69.2080704@optimsys.cz>
To: www-voice@w3.org

Dear WBWG,

It seems that there is an incorrect example in the CCXML specification.
The problem is on the very last line in Section in the hints
attribute of the <createcall> tag:
hints="{callingDevice: 'notSpecified', callCharacteristics: 

When we tried to interpret a similar <createcall> using our OptimTalk 
CCXML interpreter, we received the following ECMAScript error:
"SyntaxError: invalid label"

We looked at the ECMAScript formal grammar in the ECMAScript 
specification and found out that reporting an error when evaluating the
"{callingDevice: 'notSpecified', callCharacteristics: 'voiceUnitCall'}"
script is a correct behavior.

Following the ECMAScript formal grammar, the script is an expression
statement and the ECMAScript spec says:

12.4 Expression Statement

ExpressionStatement :
[lookahead ? {{, function}] Expression ;

Note that an ExpressionStatement cannot start with an opening curly brace
because that might make it ambiguous with a Block. [...]

A solution is to use the hints attribute as follows:
hints="var tmp = {callingDevice: 'notSpecified', callCharacteristics: 
'voiceUnitCall'}; tmp"

Can you please correct the specification?

Petr Kuba

    Petr Kuba, Project Manager
    OptimSys, s.r.o
    Tel: +420 541 143 065
    Fax: +420 541 143 066
Received on Thursday, 13 November 2008 12:20:39 UTC

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