Implementation Report test suite (36). Bug?

Hello,

While testing our voice platform with test suite (http://www.w3.org/Voice/2004/vxml-ir/irtests.zip)
we've got failure on 36th test.

Here is the part of the 36th test code:

  <field>
    <conf:grammar utterance="alpha" />
    <conf:speech value="alpha" />
    <filled>
      <assign name="x" expr="0" />
      <if cond="y = 1">
        <conf:fail reason="Error should have occured" />
      </if>
    </filled>
  </field>

Executing <if> tag it is expected error.semantic event raise because y
variable isn't declared before the usage. However the condition is
written like assignment operator expression.

My question: is it error and possibly here should be <if cond="y == 1">
expression to check the condition? (This would also coincide the
abstract "Catch elements are inherited by enclosing elements by copy.")

I'm asking about this because at least two JavaScript interpreters
(Mozilla spider monkey and internet explorer 6.0) allows variable assignments
without declaring it with var:
(the following code works, despite missing var)
<html>
<body>
<script language="JavaScript">
<!--
textToWrite = " of " + navigator.appName + "."
document.write(textToWrite)
-->
</script>
</body>
</html>

As a result the following voice application:

<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns="http://www.w3.org/2001/vxml" xmlns:conf="http://www.w3.org/2002/vxml-conformance" version="2.0">

  <catch>
    <prompt>exception</prompt>
    <exit/>
  </catch>

  <form>

    <block>
      <if cond="x=1"></if>
      <prompt>x = <value expr="x"/></prompt>

      <var name="y"/>
      <assign name="y" expr="2"/>
      <prompt>y = <value expr="y"/></prompt>

      <assign name="z" expr="3"/>
      <prompt>z = <value expr="z"/></prompt>
    </block>

  </form>

</vxml>

at our side produces prompts:
x = 1
y = 2
exception

-- 
Best regards,
 Andriy                          mailto:andriy.bychay@clarity-ag.net

Received on Friday, 4 March 2005 17:07:14 UTC