stateChange() behaviour of TestSuite for State 3.0 at W3C site.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

stateChange() behaviour of TestSuite for State 3.0 at W3C site.

Datta321
I have a problem understanding the behavior of this smil file located at http://www.w3.org/2007/SMIL30/testsuite/New-SMIL30/files/State/test-11-statechanged.txt

<?xml version="1.1"?>

<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language">
  <head>
    <layout>
      <root-layout width="400" height="100" backgroundColor="white"/>
    </layout>
    <state xml:id="mystate" language="http://www.w3.org/TR/1999/REC-xpath-19991116">
     <data xmlns="">
      <foo>0</foo>
      <bar>0</bar>
     </data>
    </state>
  </head>
  <body>
   <par>
    <seq>
     <setvalue begin="5s" ref="foo" value="42"/>
     <setvalue begin="5s" ref="bar" value="43"/>
     <setvalue begin="5s" ref="foo" value="44"/>
     <setvalue begin="5s" ref="bar" value="45"/>
    </seq>
    <seq>
     <text src="data:,you%20should%20see%20this%20from%20begin%20to%205%20seconds"
           end="mystate.stateChange(foo)" />
     <text src="data:,you%20should%20see%20this%20from%205%20to%2010%20seconds"
           end="mystate.stateChange(//*)" />
     <text src="data:,you%20should%20see%20this%20from%2010%20to%2020%20seconds"
           end="mystate.stateChange(bar)" />
    </seq>
   </par>
  </body>
</smil>

I 1st ran it with Ambulant Player 2.02 and then by 2.2 on Win XP. My observations were the following a)Ambulant player 2.02 - It displays only the 1st string "You should see this from 1 to 5 seconds."
b)Ambulant player 2.2  - It displays both the string namely
                                                                       
"You should see this from 1 to 5 seconds."  Followed by
"You should see this from 10 to 20 seconds."


Q1)Why do we have different outputs for 2 different versions of Ambulant player ?

Q2)Suppose I do the following changes while running it from 2.2 player

     <setvalue begin="5s" ref="foo" value="42"/>  --- Retain this line
     <setvalue begin="5s" ref="bar" value="43"/>  --- delete this line
     <setvalue begin="5s" ref="foo" value="44"/>  --- delete this line
     <setvalue begin="5s" ref="bar" value="45"/>  --- delete this line

The expected behavior would have been that only the 1st string, should have been displayed as variable "foo" would have been set and this would have resulted in mystate.stateChange(foo) being set to true.

However, both the strings, namely
 "You should see this from 1 to 5 seconds." Followed by  
 "You should see this from 10 to 20 seconds."

are displayed.

If variable "bar" is not set at all, then how is it that mystate.stateChange(bar) variable is set to true for the 2nd string to be displayed ?