summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/w3c/c89/test436.scxml23
-rw-r--r--test/w3c/c89/test444.scxml22
-rw-r--r--test/w3c/c89/test445.scxml21
-rw-r--r--test/w3c/c89/test446.scxml27
-rw-r--r--test/w3c/c89/test448.scxml38
-rw-r--r--test/w3c/c89/test449.scxml18
-rw-r--r--test/w3c/c89/test451.scxml21
-rw-r--r--test/w3c/c89/test452.scxml33
-rw-r--r--test/w3c/c89/test453.scxml27
-rw-r--r--test/w3c/c89/test456.scxml27
-rw-r--r--test/w3c/c89/test457.scxml61
-rw-r--r--test/w3c/c89/test459.scxml43
-rw-r--r--test/w3c/c89/test460.scxml30
-rw-r--r--test/w3c/c89/test463.scxml22
-rw-r--r--test/w3c/c89/test464.scxml21
-rw-r--r--test/w3c/c89/test465.scxml27
-rw-r--r--test/w3c/c89/test466.scxml21
-rw-r--r--test/w3c/c89/test467.scxml18
-rw-r--r--test/w3c/c89/test468.scxml30
-rw-r--r--test/w3c/c89/test469.scxml31
-rw-r--r--test/w3c/c89/test470.scxml30
-rw-r--r--test/w3c/c89/test473.scxml44
-rw-r--r--test/w3c/c89/test474.scxml43
-rw-r--r--test/w3c/c89/test475.scxml43
-rw-r--r--test/w3c/c89/test476.scxml43
-rw-r--r--test/w3c/c89/test477.scxml43
-rw-r--r--test/w3c/c89/test478.scxml42
-rw-r--r--test/w3c/c89/test479.scxml42
-rw-r--r--test/w3c/c89/test480.scxml38
-rw-r--r--test/w3c/c89/test481.scxml43
-rw-r--r--test/w3c/c89/test482.scxml22
-rw-r--r--test/w3c/c89/test483.scxml33
-rw-r--r--test/w3c/c89/test537.scxml22
-rw-r--r--test/w3c/c89/test539.scxml32
-rw-r--r--test/w3c/c89/test540.scxml28
-rw-r--r--test/w3c/c89/test542.scxml40
-rw-r--r--test/w3c/c89/test543.scxml24
-rw-r--r--test/w3c/c89/test544.scxml23
-rw-r--r--test/w3c/c89/test545.scxml27
-rw-r--r--test/w3c/c89/test546.scxml23
-rw-r--r--test/w3c/c89/test547.scxml39
-rw-r--r--test/w3c/c89/test555.scxml32
-rw-r--r--test/w3c/c89/test557.scxml32
-rw-r--r--test/w3c/c89/test558.scxml30
-rw-r--r--test/w3c/c89/test560.scxml24
-rw-r--r--test/w3c/c89/test561.scxml29
-rw-r--r--test/w3c/c89/test562.scxml27
-rw-r--r--test/w3c/c89/test568.scxml20
-rw-r--r--test/w3c/c89/test569.scxml20
-rw-r--r--test/w3c/c89/test578.scxml24
-rwxr-xr-xtest/w3c/convert-tests.sh4
51 files changed, 4 insertions, 1523 deletions
diff --git a/test/w3c/c89/test436.scxml b/test/w3c/c89/test436.scxml
deleted file mode 100644
index 3f60680..0000000
--- a/test/w3c/c89/test436.scxml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that in() predicate works in null data model -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="null" version="1.0" initial="p">
- <parallel id="p">
- <state id="ps0">
- <transition cond="In('s1')" target="fail"/>
- <transition cond="In('ps1')" target="pass"/>
- <transition target="fail"/>
- </state>
- <state id="ps1"/>
- </parallel>
- <state id="s1"/>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test444.scxml b/test/w3c/c89/test444.scxml
deleted file mode 100644
index 971a613..0000000
--- a/test/w3c/c89/test444.scxml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that <data> creates a new ecmascript variable. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0">
- <datamodel>
- <data id="var1" expr="1"/>
- </datamodel>
- <state id="s0">
- <!-- test that var1 can be used as an ecmascript variable -->
- <transition cond="++var1==2" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test445.scxml b/test/w3c/c89/test445.scxml
deleted file mode 100644
index fd15a6e..0000000
--- a/test/w3c/c89/test445.scxml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that ecmascript objects defined by <data> have value undefined if <data> does not assign a value -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0">
- <datamodel>
- <data id="var1"/>
- </datamodel>
- <state id="s0">
- <transition cond="var1==undefined" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test446.scxml b/test/w3c/c89/test446.scxml
deleted file mode 100644
index 4073cbd..0000000
--- a/test/w3c/c89/test446.scxml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- in the ECMA data model, test that if the child of <data> is JSON, the processor
- assigns it as the value of the var -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <datamodel>
- <data id="var1">[1, 2, 3]</data>
- <data id="var2" src="file:test446.txt"/>
- </datamodel>
- <state id="s0">
- <transition cond="var1 instanceof Array" target="s1"/>
- <transition target="fail"/>
- </state>
- <state id="s1">
- <transition cond="var2 instanceof Array" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test448.scxml b/test/w3c/c89/test448.scxml
deleted file mode 100644
index b568f99..0000000
--- a/test/w3c/c89/test448.scxml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that all ecmascript objects are placed in a single global scope -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0">
- <state id="s0">
- <!-- test that a parent state can access a variable defined in a child -->
- <transition cond="var1==1" target="s1"/>
- <transition target="fail"/>
- <state id="s01">
- <datamodel>
- <data id="var1" expr="1"/>
- </datamodel>
- </state>
- </state>
- <state id="s1" initial="s01p">
- <parallel id="s01p">
- <state id="s01p1">
- <!-- test that we can access a variable defined in a parallel sibling state -->
- <transition cond="var2==1" target="pass"/>
- <transition target="fail"/>
- </state>
- <state id="s01p2">
- <datamodel>
- <data id="var2" expr="1"/>
- </datamodel>
- </state>
- </parallel>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test449.scxml b/test/w3c/c89/test449.scxml
deleted file mode 100644
index d2f6be8..0000000
--- a/test/w3c/c89/test449.scxml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that ecmascript objects are converted to booleans inside cond -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0">
- <state id="s0">
- <transition cond="'foo'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test451.scxml b/test/w3c/c89/test451.scxml
deleted file mode 100644
index 487f532..0000000
--- a/test/w3c/c89/test451.scxml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- simple test of the in() predicate -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="p">
- <parallel id="p">
- <state id="s0">
- <transition cond="In('s1')" target="pass"/>
- <transition target="fail"/>
- </state>
- <state id="s1"/>
- </parallel>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test452.scxml b/test/w3c/c89/test452.scxml
deleted file mode 100644
index 4be9b4d..0000000
--- a/test/w3c/c89/test452.scxml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that we can assign to any location in the datamodel. In this case, we just test that we can assign
-to a substructure (not the top level variable). This may not be the most idiomatic way to write the test -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0">
- <datamodel>
- <data id="foo" expr="0"/>
- </datamodel>
- <script>
- function testobject() {
- this.bar = 0;}
- </script>
- <state id="s0">
- <onentry>
- <assign location="foo" expr="new testobject();"/>
- <!-- try to assign to foo's bar property -->
- <assign location="foo.bar" expr="1"/>
- <raise event="event1"/>
- </onentry>
- <!-- test that we have assigned to foo's bar property -->
- <transition event="event1" cond="foo.bar == 1" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test453.scxml b/test/w3c/c89/test453.scxml
deleted file mode 100644
index a50d5f7..0000000
--- a/test/w3c/c89/test453.scxml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that we can use any ecmascript expression as a value expression.
-In this case, we just test that we can assign
-a function to a variable and then call it. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0">
- <datamodel>
- <data id="var1" expr="function(invar) {return invar + 1;}"/>
- </datamodel>
- <state id="s0">
- <onentry>
- <raise event="event1"/>
- </onentry>
- <!-- test that we can call the function -->
- <transition event="event1" cond="var1(2) == 3" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test456.scxml b/test/w3c/c89/test456.scxml
deleted file mode 100644
index 3f400e4..0000000
--- a/test/w3c/c89/test456.scxml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- we can't test that _any_ ecmascript is valid inside <script>, so we
-just run a simple one and check that it can update the data model. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
- <state id="s0">
- <onentry>
- <script>
- Var1+=1
- </script>
- </onentry>
- <transition cond="Var1==1" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test457.scxml b/test/w3c/c89/test457.scxml
deleted file mode 100644
index 40ea9fd..0000000
--- a/test/w3c/c89/test457.scxml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that an the legal iterable collections are arrays, namely objects that satisfy instanceof(Array) in ECMAScript.
- the legal values for the 'item' attribute on foreach are legal ECMAScript variable names.. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0">
- <datamodel>
- <data id="Var1" expr="0"/>
- <data id="Var2"/>
- <data id="Var3"/>
- <data id="Var4" expr="7"/>
- <data id="Var5" expr="[1,2,3]"/>
- <data id="Var6"/>
- </datamodel>
- <state id="s0">
- <onentry>
- <!-- invalid array, legal item -->
- <foreach item="Var2" index="Var3" array="Var4">
- <assign location="Var1" expr="Var1 + 1"/>
- </foreach>
- <raise event="foo"/>
- </onentry>
- <transition event="error.execution" target="s1"/>
- <transition event="*" target="fail"/>
- </state>
- <state id="s1">
- <onentry>
- <!-- illegal item, legal array -->
- <foreach item="'continue'" index="Var3" array="Var5">
- <assign location="Var1" expr="Var1 + 1"/>
- </foreach>
- <raise event="bar"/>
- </onentry>
- <transition event="error.execution" target="s2"/>
- <transition event="bar" target="fail"/>
- </state>
- <state id="s2">
- <!-- check that var1 has its original value (so executable content never got executed -->
- <transition cond="Var1==0" target="s3"/>
- <transition target="fail"/>
- </state>
- <!-- finally check that a legal array works properly -->
- <state id="s3">
- <onentry>
- <assign location="Var6" expr="0"/>
- <foreach item="Var2" array="Var5">
- <assign location="Var6" expr="Var6 + Var2"/>
- </foreach>
- </onentry>
- <transition cond="Var6==6" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="'pass'"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="'fail'"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test459.scxml b/test/w3c/c89/test459.scxml
deleted file mode 100644
index 9037a93..0000000
--- a/test/w3c/c89/test459.scxml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that foreach goes over the array in the right order. since the array contains 1 2 3, we compare the current
-value with the previous value, which is stored in var1. The current value should always be larger. If
-it ever isn't, set Var4 to 0, indicating failure. Also check that the final value of the index
-is 2 (meaning that the initial value was 0, not 1) -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <datamodel>
- <data id="Var1" expr="0"/>
- <!-- contains the previous value -->
- <data id="Var2"/>
- <!-- the item which will contain the current value -->
- <data id="Var3"/>
- <!-- the index -->
- <data id="Var4" expr="[1,2,3]"/>
- <data id="Var5" expr="1"/>
- <!-- 1 if success, 0 if failure -->
- </datamodel>
- <state id="s0">
- <onentry>
- <foreach item="Var2" array="Var4" index="Var3">
- <if cond="Var1&lt;Var2">
- <assign location="Var1" expr="Var2"/>
- <else/>
- <!-- values are out of order, record failure -->
- <assign location="Var5" expr="0"/>
- </if>
- </foreach>
- </onentry>
- <!-- check that var1 has its original value -->
- <transition cond="Var4==0 | Var3 != 2" target="fail"/>
- <transition target="pass"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="'pass'"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="'fail'"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test460.scxml b/test/w3c/c89/test460.scxml
deleted file mode 100644
index 3e05b0e..0000000
--- a/test/w3c/c89/test460.scxml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that <foreach> does a shallow copy, so that modifying the array does not change
-the iteration behavior. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0">
- <datamodel>
- <data id="Var1" expr="[1,2,3]"/>
- <data id="Var2" expr="0"/>
- <!-- counts the number of iterations -->
- </datamodel>
- <state id="s0">
- <onentry>
- <foreach item="Var3" array="Var1">
- <assign location="Var1" expr="[].concat(Var1, [4])"/>
- <assign location="Var2" expr="Var2 + 1"/>
- </foreach>
- </onentry>
- <transition cond="Var2==3" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="'pass'"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="'fail'"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test463.scxml b/test/w3c/c89/test463.scxml
deleted file mode 100644
index 8a4e774..0000000
--- a/test/w3c/c89/test463.scxml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that the <data> tag creates an element in the XML datamodel with the correct name and id attr
-and binds an XPath variable to it -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="foo" expr="2"/>
- </datamodel>
- <state id="s0">
- <transition cond="local-name($foo)='data'and $foo/@id ='foo'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test464.scxml b/test/w3c/c89/test464.scxml
deleted file mode 100644
index afaf97b..0000000
--- a/test/w3c/c89/test464.scxml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that an unassigned variable creates an empty <data> element -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="foo"/>
- </datamodel>
- <state id="s0">
- <transition cond="count($foo) = 1 and count($foo/*) = 0" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test465.scxml b/test/w3c/c89/test465.scxml
deleted file mode 100644
index 1c32bd2..0000000
--- a/test/w3c/c89/test465.scxml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that all xpath variables are in a single global scope-->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="foo" expr="2"/>
- </datamodel>
- <state id="s0">
- <transition cond="count($foo) = 1 and count($bar) = 1" target="s1"/>
- <transition target="fail"/>
- </state>
- <state id="s1">
- <datamodel>
- <data id="bar" expr="1"/>
- </datamodel>
- <transition target="pass"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test466.scxml b/test/w3c/c89/test466.scxml
deleted file mode 100644
index 0b6baf5..0000000
--- a/test/w3c/c89/test466.scxml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that xpath expressions are converted to boolean when used as conditional expressions-->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="foo" expr="2"/>
- </datamodel>
- <state id="s0">
- <transition cond="$foo" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test467.scxml b/test/w3c/c89/test467.scxml
deleted file mode 100644
index 1ca867c..0000000
--- a/test/w3c/c89/test467.scxml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that in() is available -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <state id="s0">
- <transition cond="In('s0')" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test468.scxml b/test/w3c/c89/test468.scxml
deleted file mode 100644
index 25794b6..0000000
--- a/test/w3c/c89/test468.scxml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that XPath expressions can be used as location expressions.
- This example is taken from the spec -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cities">
- <list xmlns="">
- <city id="nyc" count="0">New York</city>
- <city id="bos" count="0">Boston</city>
- </list>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cities/list/city[@id='nyc']/@count" expr="1"/>
- </onentry>
- <transition cond="$cities/list/city[@id='nyc']/@count = 1" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test469.scxml b/test/w3c/c89/test469.scxml
deleted file mode 100644
index 1ca90e8..0000000
--- a/test/w3c/c89/test469.scxml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that XPath expressions can be used as value expressions. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="copyOfEventData"/>
- </datamodel>
- <state id="s0">
- <onentry>
- <send event="event1">
- <param name="param1" expr="1"/>
- </send>
- </onentry>
- <transition event="event1" target="s1">
- <assign location="$copyOfEventData" expr="$_event/data"/>
- </transition>
- </state>
- <state id="s1">
- <transition cond="$copyOfEventData/data/data[@id='param1'] =1" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test470.scxml b/test/w3c/c89/test470.scxml
deleted file mode 100644
index 55e5b91..0000000
--- a/test/w3c/c89/test470.scxml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that the processor makes a deep copy of a node set when assigning. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="var1">
- <foo xmlns="">
- <bar>2</bar>
- </foo>
- </data>
- <data id="var2"/>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$var2" expr="$var1/foo"/>
- <assign location="$var1/foo/bar" expr="3"/>
- </onentry>
- <transition cond="$var2/foo/bar=2" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test473.scxml b/test/w3c/c89/test473.scxml
deleted file mode 100644
index ea3d4d3..0000000
--- a/test/w3c/c89/test473.scxml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that 'replacechildren' in <assign> replaces all children with the new value.
- This example is taken from the doc -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/books/book[1]">
- <bookinfo xmlns="">
- <isdn>12334455</isdn>
- <author>some author</author>
- </bookinfo>
- </assign>
- </onentry>
- <transition cond="$cart/myCart/books/book[1]/bookinfo/isdn/text() = '12334455' and not($cart/myCart/books/book[1]/title)" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test474.scxml b/test/w3c/c89/test474.scxml
deleted file mode 100644
index 463961c..0000000
--- a/test/w3c/c89/test474.scxml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that 'firstchild' in <assign> inserts the new value before the other children. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/books/book[1]" type="firstchild">
- <bookinfo xmlns="">
- <isdn>12334455</isdn>
- <author>some author</author>
- </bookinfo>
- </assign>
- </onentry>
- <transition cond="$cart/myCart/books/book[1]/*[1]/isdn/text() = '12334455' and $cart/myCart/books/book[1]/*[2]/text() = 'The Zen Mind'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test475.scxml b/test/w3c/c89/test475.scxml
deleted file mode 100644
index 2a71312..0000000
--- a/test/w3c/c89/test475.scxml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that 'lastchild' in <assign> inserts the new value after the other children. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/books/book[1]" type="lastchild">
- <bookinfo xmlns="">
- <isdn>12334455</isdn>
- <author>some author</author>
- </bookinfo>
- </assign>
- </onentry>
- <transition cond="$cart/myCart/books/book[1]/*[2]/isdn/text() = '12334455' and $cart/myCart/books/book[1]/*[1]/text() = 'The Zen Mind'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test476.scxml b/test/w3c/c89/test476.scxml
deleted file mode 100644
index 174d334..0000000
--- a/test/w3c/c89/test476.scxml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that 'nextsibling' in <assign> inserts the new value after the location. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/books/book[1]/title" type="nextsibling">
- <bookinfo xmlns="">
- <isdn>12334455</isdn>
- <author>some author</author>
- </bookinfo>
- </assign>
- </onentry>
- <transition cond="$cart/myCart/books/book[1]/*[2]/isdn/text() = '12334455' and $cart/myCart/books/book[1]/*[1]/text() = 'The Zen Mind'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test477.scxml b/test/w3c/c89/test477.scxml
deleted file mode 100644
index 92f0feb..0000000
--- a/test/w3c/c89/test477.scxml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that 'previoussibling' in <assign> inserts the new value before the location. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/books/book[1]/title" type="previoussibling">
- <bookinfo xmlns="">
- <isdn>12334455</isdn>
- <author>some author</author>
- </bookinfo>
- </assign>
- </onentry>
- <transition cond="$cart/myCart/books/book[1]/*[1]/isdn/text() = '12334455' and $cart/myCart/books/book[1]/*[2]/text() = 'The Zen Mind'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test478.scxml b/test/w3c/c89/test478.scxml
deleted file mode 100644
index 6712330..0000000
--- a/test/w3c/c89/test478.scxml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that 'replace' in <assign> replaces the value at the location. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/books/book[2]" type="replace">
- <cd xmlns="">
- <title>This is not a book</title>
- </cd>
- </assign>
- </onentry>
- <transition cond="$cart/myCart/books/cd/title = 'This is not a book'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test479.scxml b/test/w3c/c89/test479.scxml
deleted file mode 100644
index 9abfa7e..0000000
--- a/test/w3c/c89/test479.scxml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that 'delete' in <assign> deletes the value at the location. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/cds" type="delete">
- <cd xmlns="">
- <title>This is not a book</title>
- </cd>
- </assign>
- </onentry>
- <transition cond="not($cart/myCart/cds)" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test480.scxml b/test/w3c/c89/test480.scxml
deleted file mode 100644
index df3ca0a..0000000
--- a/test/w3c/c89/test480.scxml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that 'addattr' in <assign> adds an attribute to the specified node. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/books/book[1]" type="addattribute" attr="author" expr="'somebody'"/>
- </onentry>
- <transition cond="$cart/myCart/books/book[1]/@author = 'somebody'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test481.scxml b/test/w3c/c89/test481.scxml
deleted file mode 100644
index fb46595..0000000
--- a/test/w3c/c89/test481.scxml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that illegal assignments fail and have no side effects. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
- <assign location="$cart/myCart/cds/cd/@name">
- <foo>
- <bar/>
- </foo>
- </assign>
- </onentry>
- <transition event="error.execution" cond="$cart/myCart/cds/cd/@name = 'Something'" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test482.scxml b/test/w3c/c89/test482.scxml
deleted file mode 100644
index 832ce14..0000000
--- a/test/w3c/c89/test482.scxml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that system vars are created and bound to XPath variables -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
- <state id="s0">
- <onentry>
- <!-- event isn't bound until an event is raised -->
- <raise event="someevent"/>
- </onentry>
- <transition event="*" cond="local-name($_event) = 'data' and local-name($_sessionid) = 'data' and local-name($_name) = 'data' and local-name($_ioprocessors) = 'data'" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test483.scxml b/test/w3c/c89/test483.scxml
deleted file mode 100644
index 84f3e0f..0000000
--- a/test/w3c/c89/test483.scxml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that foreach works correctly, iterating over node set in document order.
- This tests assertions 483-485 -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="var1">
- <nodes xmlns="">
- <node/>
- <node/>
- <node/>
- </nodes>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <foreach array="$var1/nodes/node" item="item" index="pos">
- <assign location="$item" type="addattribute" attr="position" expr="$pos"/>
- </foreach>
- </onentry>
- <transition cond="$var1/nodes/node[1]/@position = 1 and $var1/nodes/node[2]/@position = 2 and $var1/nodes/node[3]/@position = 3" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test537.scxml b/test/w3c/c89/test537.scxml
deleted file mode 100644
index bdde730..0000000
--- a/test/w3c/c89/test537.scxml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that the root element of the datamodel is <datamodel> and that <data> elements are its
-children-->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="foo" expr="2"/>
- </datamodel>
- <state id="s0">
- <transition cond="local-name($foo/..)='datamodel'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test539.scxml b/test/w3c/c89/test539.scxml
deleted file mode 100644
index 78ac02f..0000000
--- a/test/w3c/c89/test539.scxml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that if the child of <data> is XML, or if XML is loaded via src=, the processor
- assigns it as the value of the var -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="var1">
- <books xmlns="">
- <book title="title1"/>
- <book title="title2"/>
- </books>
- </data>
- <data id="var2" src="file:test539.txt"/>
- </datamodel>
- <state id="s0">
- <transition cond="$var1/books/book[2]/@title = 'title2'" target="s1"/>
- <transition target="fail"/>
- </state>
- <state id="s1">
- <transition cond="$var2/books/book[2]/@title = 'title2'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test540.scxml b/test/w3c/c89/test540.scxml
deleted file mode 100644
index 6f32ce2..0000000
--- a/test/w3c/c89/test540.scxml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that if the child of <data> is a string or if a string is loaded via src=, the processor
- does white space normalization on it and assigns it as the value of the var -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="var1">123
-4 5
-</data>
- <data id="var2" src="file:test540.txt"/>
- </datamodel>
- <state id="s0">
- <onentry>
- <log label="var1 " expr="$var1"/>
- </onentry>
- <transition cond="$var1 = '123 4 5' and $var2 = '123 4 5'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test542.scxml b/test/w3c/c89/test542.scxml
deleted file mode 100644
index c3ff728..0000000
--- a/test/w3c/c89/test542.scxml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that <content> inside <donedata> handles XML and strings,
- including white space normalization. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <state id="s0" initial="s01">
- <transition event="done.state.s0" cond="$_event/data/books/book[1]/@title = 'title1'" target="s1"/>
- <transition event="done" target="fail"/>
- <final id="s01">
- <donedata>
- <content>
- <books xmlns="">
- <book title="title1"/>
- <book title="title2"/>
- </books>
- </content>
- </donedata>
- </final>
- </state>
- <state id="s1" initial="s11">
- <transition event="done.state.s1" cond="$_event/data = '123 4 5'" target="pass"/>
- <transition event="done" target="fail"/>
- <final id="s11">
- <donedata>
- <content>123
-4 5
- </content>
- </donedata>
- </final>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test543.scxml b/test/w3c/c89/test543.scxml
deleted file mode 100644
index c22b769..0000000
--- a/test/w3c/c89/test543.scxml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that event fields are present as children of _event -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
- <state id="s0">
- <onentry>
- <!-- event isn't bound until an event is raised -->
- <raise event="someevent"/>
- </onentry>
- <!-- origintype sendid, invokeid and data will not be bound in this event. name, type, and origin
- are guaranteed to be there. -->
- <transition event="*" cond="$_event/name and $_event/origin and $_event/type" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test544.scxml b/test/w3c/c89/test544.scxml
deleted file mode 100644
index 0e57ac2..0000000
--- a/test/w3c/c89/test544.scxml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that kvps are represented as <data> elements under event/data -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
- <state id="s0">
- <onentry>
- <send event="someevent">
- <param name="key1" expr="2"/>
- </send>
- </onentry>
- <transition event="*" cond="$_event/data/data[@id='key1'] = 2" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test545.scxml b/test/w3c/c89/test545.scxml
deleted file mode 100644
index e06445a..0000000
--- a/test/w3c/c89/test545.scxml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that xml content in send is place as XML under event/data -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
- <state id="s0">
- <onentry>
- <send event="someevent">
- <content>
- <foo xmlns="">
- <bar>3</bar>
- </foo>
- </content>
- </send>
- </onentry>
- <transition event="*" cond="$_event/data/foo/bar = 3" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test546.scxml b/test/w3c/c89/test546.scxml
deleted file mode 100644
index d2bfa13..0000000
--- a/test/w3c/c89/test546.scxml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that string content in send is place as a string under event/data -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
- <state id="s0">
- <onentry>
- <send event="someevent">
- <content>some string</content>
- </send>
- </onentry>
- <transition event="*" cond="$_event/data = 'some string'" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test547.scxml b/test/w3c/c89/test547.scxml
deleted file mode 100644
index f004e68..0000000
--- a/test/w3c/c89/test547.scxml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that assiging to a node set performs the assignment to each node.
- This example is taken from the spec. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="cart">
- <myCart xmlns="">
- <books>
- <book>
- <title>The Zen Mind</title>
- </book>
- <book>
- <title>Freakonomics</title>
- </book>
- </books>
- <cds>
- <cd name="Something"/>
- </cds>
- </myCart>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <assign location="$cart/myCart/books/book" expr="'The Zen Mind'"/>
- </onentry>
- <transition cond="$cart/myCart/books/book[1] = 'The Zen Mind' and $cart/myCart/books/book[2] = 'The Zen Mind'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test555.scxml b/test/w3c/c89/test555.scxml
deleted file mode 100644
index 475ffac..0000000
--- a/test/w3c/c89/test555.scxml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- in the XPATH data model, test that processor coerces types to produce a string
- where it's needed -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="var1">
- <books xmlns="">
- <book title="title1"/>
- <book title="title2"/>
- </books>
- </data>
- </datamodel>
- <state id="s0">
- <onentry>
- <send eventexpr="$var1"/>
- </onentry>
- <transition event="error" target="fail"/>
- <!-- don't really know what the stringification of that xml structure should be, but if
- we get something other than an error, we assume that it worked. -->
- <transition event="*" target="pass"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test557.scxml b/test/w3c/c89/test557.scxml
deleted file mode 100644
index 75ea35a..0000000
--- a/test/w3c/c89/test557.scxml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- in the ECMA data model, test that if the child of <data> is XML, or if XML is loaded via src=, the processor
- assigns it as the value of the var -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <datamodel>
- <data id="var1">
- <books xmlns="">
- <book title="title1"/>
- <book title="title2"/>
- </books>
- </data>
- <data id="var2" src="file:test557.txt"/>
- </datamodel>
- <state id="s0">
- <transition cond="var1.getElementsByTagName('book')[0].getAttribute('title') == 'title1'" target="s1"/>
- <transition target="fail"/>
- </state>
- <state id="s1">
- <transition cond="var2.getElementsByTagName('book')[1].getAttribute('title') == 'title2'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test558.scxml b/test/w3c/c89/test558.scxml
deleted file mode 100644
index 7cb5c01..0000000
--- a/test/w3c/c89/test558.scxml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- in the ECMA data model, test that if the child of <data> is not XML, or if XML is loaded via src=,
- the processor treats the value as a string, does whitespace normalization and assigns it to the var.-->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <datamodel>
- <data id="var1">
-this is
-a string
-</data>
- <data id="var2" src="file:test558.txt"/>
- </datamodel>
- <state id="s0">
- <transition cond="var1 == 'this is a string'" target="s1"/>
- <transition target="fail"/>
- </state>
- <state id="s1">
- <transition cond="var2 == 'this is a string'" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test560.scxml b/test/w3c/c89/test560.scxml
deleted file mode 100644
index bb571b3..0000000
--- a/test/w3c/c89/test560.scxml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- in the ECMA data model, test that processor creates correct structure in
- _event.data when receiving KVPs in an event -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <state id="s0">
- <onentry>
- <send event="foo">
- <param name="aParam" expr="1"/>
- </send>
- </onentry>
- <transition event="foo" cond="_event.data.aParam == 1" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test561.scxml b/test/w3c/c89/test561.scxml
deleted file mode 100644
index 2949275..0000000
--- a/test/w3c/c89/test561.scxml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- in the ECMA data model, test that processor creates an ECMAScript DOM object
- _event.data when receiving XML in an event -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <state id="s0">
- <onentry>
- <send event="foo">
- <content>
- <books xmlns="">
- <book title="title1"/>
- <book title="title2"/>
- </books>
- </content>
- </send>
- </onentry>
- <transition event="foo" cond="_event.data.getElementsByTagName('book')[1].getAttribute('title') == 'title2'" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test562.scxml b/test/w3c/c89/test562.scxml
deleted file mode 100644
index 22be678..0000000
--- a/test/w3c/c89/test562.scxml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- in the ECMA data model, test that processor creates space normalized string in
- _event.data when receiving anything other than KVPs or XML in an event -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <state id="s0">
- <onentry>
- <send event="foo">
- <content>
-this is a
-string
-</content>
- </send>
- </onentry>
- <transition event="foo" cond="_event.data == 'this is a string'" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test568.scxml b/test/w3c/c89/test568.scxml
deleted file mode 100644
index ab48af6..0000000
--- a/test/w3c/c89/test568.scxml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that location field is found inside entry for SCXML Event I/O processor in the XPath
-data model. The tests for the relevant event i/o processors will test that it can be used to
-send events. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <state id="s0">
- <transition cond="$_ioprocessors/[@name='http://www.w3.org/TR/scxml/#SCXMLEventProcessor']/location/text()" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test569.scxml b/test/w3c/c89/test569.scxml
deleted file mode 100644
index c6e2158..0000000
--- a/test/w3c/c89/test569.scxml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that location field is found inside entry for SCXML Event I/O processor in the ECMAScript
-data model. The tests for the relevant event i/o processors will test that it can be used to
-send events. -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <state id="s0">
- <transition cond="_ioprocessors['scxml'].location" target="pass"/>
- <transition target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/c89/test578.scxml b/test/w3c/c89/test578.scxml
deleted file mode 100644
index 3243687..0000000
--- a/test/w3c/c89/test578.scxml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- in the ECMA data model, test that processor creates an ECMAScript object
- _event.data when receiving JSON in an event -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <state id="s0">
- <onentry>
- <send event="foo">
- <content>{ "productName" : "bar", "size" : 27 }</content>
- </send>
- </onentry>
- <transition event="foo" cond="_event.data.productName == 'bar'" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="&amp;pass&amp;"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/convert-tests.sh b/test/w3c/convert-tests.sh
index bdac001..464c5cb 100755
--- a/test/w3c/convert-tests.sh
+++ b/test/w3c/convert-tests.sh
@@ -122,6 +122,10 @@ find ./prolog -type f -exec grep -Ili 'datamodel="xpath"' {} \; |xargs rm -fv
find ./prolog -type f -exec grep -Ili 'datamodel="ecmascript"' {} \; |xargs rm -fv
find ./prolog -type f -exec grep -Ili 'datamodel="null"' {} \; |xargs rm -fv
+find ./c89 -type f -exec grep -Ili 'datamodel="xpath"' {} \; |xargs rm -fv
+find ./c89 -type f -exec grep -Ili 'datamodel="ecmascript"' {} \; |xargs rm -fv
+find ./c89 -type f -exec grep -Ili 'datamodel="null"' {} \; |xargs rm -fv
+
find ./lua -type f -exec grep -Ili 'datamodel="xpath"' {} \; |xargs rm -fv
find ./lua -type f -exec grep -Ili 'datamodel="ecmascript"' {} \; |xargs rm -fv
find ./lua -type f -exec grep -Ili 'datamodel="null"' {} \; |xargs rm -fv