W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2013

RE: SCXML test 147: transition contains empty condition

From: Jim Barnett <Jim.Barnett@genesyslab.com>
Date: Thu, 28 Mar 2013 22:23:01 +0000
To: Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de>, "VBWG Public (www-voice@w3.org)" <www-voice@w3.org>
Message-ID: <57A15FAF9E58F841B2B1651FFE16D28103372A@GENSJZMBX02.msg.int.genesyslab.com>
Hmm, I'm not sure what the problem is.  I get the right result when I transform 147.txml into the ECMAScript data model using

<transition event="bar" cond="Var1==1" target="pass"/>
  <transition event="*" target="fail"/>

In the section  on the ECMAScript datamodel, it says that the processor must convert conds to Booleans using ToBoolean.  I assume that would yield 'false', but in any case it looks like you're having problems with the XSLT transformation.   

- Jim

-----Original Message-----
From: Stefan Radomski [mailto:radomski@tk.informatik.tu-darmstadt.de] 
Sent: Thursday, March 28, 2013 6:11 PM
To: VBWG Public (www-voice@w3.org)
Subject: SCXML test 147: transition contains empty condition 

Hey there,

I transformed the SCXML tests with XSLT for ecmascript[1]. As I was stepping through them, I realized that the generated test 147 contains a transition with an empty condition [1], which ought to be true for the test to be passed. Empty strings evaluate to false with my ecmascript implementation, so the test fails.

>From txml:
  <transition event="bar" conf:idVal="1=1" conf:targetpass=""/>

>From generated SCXML test:
  <transition event="bar" cond="" target="pass"/>

My XSLT knowledge is limited, I used perl's libxslt wrapper XML::LibXSLT and the official stylesheet provided at [3].

I guess the implied question (assuming the XSLT went fine) is, whether the empty condition really ought to evaluate to true?

[1] https://github.com/jbeard4/scxml-test-framework/blob/master/test/w3c-ecma/
[2] https://github.com/jbeard4/scxml-test-framework/blob/master/test/w3c-ecma/test147.txml.scxml#L23
[3] http://www.w3.org/Voice/2013/scxml-irp/
Received on Thursday, 28 March 2013 22:23:27 UTC

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