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 10.5.4.3 in the hints
attribute of the <createcall> tag:
hints="{callingDevice: 'notSpecified', callCharacteristics: 
'voiceUnitCall'}"

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:

<CITATION>
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. [...]
</CITATION>

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

Can you please correct the specification?

Regards,
Petr Kuba

-- 
    Petr Kuba, Project Manager
    OptimSys, s.r.o
    kuba@optimsys.cz
    Tel: +420 541 143 065
    Fax: +420 541 143 066
    http://www.optimsys.cz
Received on Thursday, 13 November 2008 12:20:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 November 2008 12:20:40 GMT