- From: Petr Kuba <kuba@optimsys.cz>
- Date: Thu, 13 Nov 2008 13:19:53 +0100
- 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 UTC