summaryrefslogtreecommitdiffstats
path: root/test/w3c/xpath
diff options
context:
space:
mode:
Diffstat (limited to 'test/w3c/xpath')
-rw-r--r--test/w3c/xpath/test159.scxml2
-rw-r--r--test/w3c/xpath/test179.scxml2
-rw-r--r--test/w3c/xpath/test193.scxml19
-rw-r--r--test/w3c/xpath/test233.scxml2
-rw-r--r--test/w3c/xpath/test286.scxml2
-rw-r--r--test/w3c/xpath/test298.scxml8
-rw-r--r--test/w3c/xpath/test311.scxml3
-rw-r--r--test/w3c/xpath/test330.scxml6
-rw-r--r--test/w3c/xpath/test331.scxml6
-rw-r--r--test/w3c/xpath/test350.scxml22
-rw-r--r--test/w3c/xpath/test354.scxml4
-rw-r--r--test/w3c/xpath/test401.scxml2
-rw-r--r--test/w3c/xpath/test402.scxml2
-rw-r--r--test/w3c/xpath/test446.scxml21
-rw-r--r--test/w3c/xpath/test459.scxml35
-rw-r--r--test/w3c/xpath/test496.scxml18
-rw-r--r--test/w3c/xpath/test528.scxml1
-rw-r--r--test/w3c/xpath/test529.scxml2
-rw-r--r--test/w3c/xpath/test545.scxml17
-rw-r--r--test/w3c/xpath/test561.scxml4
-rw-r--r--test/w3c/xpath/test577.scxml21
-rw-r--r--test/w3c/xpath/test578.scxml2
-rw-r--r--test/w3c/xpath/test579.scxml61
-rw-r--r--test/w3c/xpath/test580.scxml48
24 files changed, 260 insertions, 50 deletions
diff --git a/test/w3c/xpath/test159.scxml b/test/w3c/xpath/test159.scxml
index 1f2af35..779ed7c 100644
--- a/test/w3c/xpath/test159.scxml
+++ b/test/w3c/xpath/test159.scxml
@@ -6,7 +6,7 @@ The send tag will raise an error so var1 should not be incremented. If it is fa
<state id="s0">
<onentry>
- <send event="thisWillFail" conf:illegaltarget=""/>
+ <send event="thisWillFail" target="baz"/>
<assign location="$Var1" expr="$Var1 + 1"/>
</onentry>
<transition cond="$Var1/text() =1" target="fail"/>
diff --git a/test/w3c/xpath/test179.scxml b/test/w3c/xpath/test179.scxml
index 1c281b5..42d1533 100644
--- a/test/w3c/xpath/test179.scxml
+++ b/test/w3c/xpath/test179.scxml
@@ -8,7 +8,7 @@
</send>
</onentry>
- <transition event="event1" cond="$_event/data = '123'" target="pass"/>
+ <transition event="event1" cond="$_event/data = 123" target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/w3c/xpath/test193.scxml b/test/w3c/xpath/test193.scxml
index 58a5c67..54926cf 100644
--- a/test/w3c/xpath/test193.scxml
+++ b/test/w3c/xpath/test193.scxml
@@ -1,17 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?><!-- we test that omitting target and targetexpr of <send> when using the
-basichttp event i/o processor puts error.communication on the internal queue. --><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">
+SCXML event i/o processor puts the event on the external queue. --><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">
<onentry>
- <!-- this should put an error in the internal queue -->
- <send event="event1" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- <send event="fail"/>
+ <send event="internal"/>
+ <!-- this should put event1 in the external queue -->
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ <send event="timeout" delay="1s"/>
</onentry>
- <transition event="error.communication" target="pass"/>
- <transition event="*" target="fail"/>
+ <transition event="event1" target="fail"/>
+ <transition event="internal" target="s1"/>
</state>
+
+ <state id="s1">
+ <transition event="event1" target="pass"/>
+ <transition event="timeout" 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>
diff --git a/test/w3c/xpath/test233.scxml b/test/w3c/xpath/test233.scxml
index c4d7eb7..e7b4116 100644
--- a/test/w3c/xpath/test233.scxml
+++ b/test/w3c/xpath/test233.scxml
@@ -26,7 +26,7 @@ the transtitions. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf
</finalize>
</invoke>
- <transition event="childToParent" cond="" target="pass"/>
+ <transition event="childToParent" cond="$Var1/text() =2" target="pass"/>
<transition event="*" target="fail"/>
</state>
diff --git a/test/w3c/xpath/test286.scxml b/test/w3c/xpath/test286.scxml
index 80c0046..53aad73 100644
--- a/test/w3c/xpath/test286.scxml
+++ b/test/w3c/xpath/test286.scxml
@@ -4,7 +4,7 @@ where no error is raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns
<state id="s0">
<onentry>
- <assign location="$Var1" expr="1"/>
+ <assign location="foo.bar.baz " expr="1"/>
<raise event="foo"/>
</onentry>
diff --git a/test/w3c/xpath/test298.scxml b/test/w3c/xpath/test298.scxml
index ab8a5a9..8525192 100644
--- a/test/w3c/xpath/test298.scxml
+++ b/test/w3c/xpath/test298.scxml
@@ -1,9 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- refence a non-existent data model location in param in donedata and see that the right error is raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
+<?xml version="1.0" encoding="UTF-8"?><!-- reference a non-existent data model location in param in donedata and see that the right error is raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
<datamodel>
<data id="Var1" expr="0"/>
</datamodel>
<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
<transition event="error.execution" target="pass"/>
<transition event="*" target="fail"/>
@@ -12,7 +16,7 @@
</state>
<final id="s02">
<donedata>
- <param name="Var3" location="$Var2"/>
+ <param name="Var3" location="foo.bar.baz "/>
</donedata>
</final>
</state>
diff --git a/test/w3c/xpath/test311.scxml b/test/w3c/xpath/test311.scxml
index 487793c..1353b3e 100644
--- a/test/w3c/xpath/test311.scxml
+++ b/test/w3c/xpath/test311.scxml
@@ -3,7 +3,8 @@
<state id="s0">
<onentry>
- <assign location="$Var1" expr="1"/>
+ <send event="timeout" delay="1s"/>
+ <assign location="foo.bar.baz " expr="1"/>
</onentry>
<transition event="error.execution" target="pass"/>
<transition event=".*" target="fail"/>
diff --git a/test/w3c/xpath/test330.scxml b/test/w3c/xpath/test330.scxml
index 353c683..c95befd 100644
--- a/test/w3c/xpath/test330.scxml
+++ b/test/w3c/xpath/test330.scxml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- check that the required fields are present in both internal and external events --><scxml xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" name="machineName">
+<?xml version="1.0" encoding="UTF-8"?><!-- check that the required fields are present in both internal and external events --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" name="machineName">
<state id="s0">
<onentry>
@@ -17,7 +17,7 @@
</state>
- <final xmlns="http://www.w3.org/2005/07/scxml" id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final xmlns="http://www.w3.org/2005/07/scxml" id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+ <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
</scxml> \ No newline at end of file
diff --git a/test/w3c/xpath/test331.scxml b/test/w3c/xpath/test331.scxml
index aec6d98..e887869 100644
--- a/test/w3c/xpath/test331.scxml
+++ b/test/w3c/xpath/test331.scxml
@@ -24,7 +24,7 @@
<state id="s2">
<onentry>
<!-- this will generate an error, which is a platform event -->
- <assign location="$Var2" expr="1"/>
+ <assign location="foo.bar.baz " expr="1"/>
</onentry>
<transition event="error" target="s3">
<assign location="$Var1" expr="$_event/type/text()"/>
@@ -54,7 +54,7 @@
</state>
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+ <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
</scxml> \ No newline at end of file
diff --git a/test/w3c/xpath/test350.scxml b/test/w3c/xpath/test350.scxml
deleted file mode 100644
index ce94e9f..0000000
--- a/test/w3c/xpath/test350.scxml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that target value is used to decide what session to deliver the event to. A session should be
-able to send an event to itself using its own session ID as the target --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="'#_scxml_' + _sessionid"/>
- </datamodel>
-
-<state id="s0">
-
- <onentry>
- <send delay="5s" event="timeout"/>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="$Var1" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="pass"/>
- <transition event="*" 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> \ No newline at end of file
diff --git a/test/w3c/xpath/test354.scxml b/test/w3c/xpath/test354.scxml
index 93d768d..499b568 100644
--- a/test/w3c/xpath/test354.scxml
+++ b/test/w3c/xpath/test354.scxml
@@ -9,12 +9,12 @@ and that correct values are used --><scxml xmlns="http://www.w3.org/2005/07/scxm
<state id="s0">
<onentry>
<send delay="5s" event="timeout"/>
- <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" namelist="Var1">
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" namelist="$Var1">
<param name="param1" expr="2"/>
</send>
</onentry>
<transition event="event1" target="s1">
- <assign location="$Var2" expr="$_event/data/data[@id='Var1']/data/text()"/>
+ <assign location="$Var2" expr="$_event/data/data[@id=Var'1']/data/text()"/>
<assign location="$Var3" expr="$_event/data/data[@id='param1']/text()"/>
</transition>
<transition event="*" target="fail">
diff --git a/test/w3c/xpath/test401.scxml b/test/w3c/xpath/test401.scxml
index 7900490..586a049 100644
--- a/test/w3c/xpath/test401.scxml
+++ b/test/w3c/xpath/test401.scxml
@@ -7,7 +7,7 @@ it was raised second --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:co
<onentry>
<send event="foo"/>
<!-- assigning to a non-existent location should raise an error -->
- <assign location="$Var1" expr="2"/>
+ <assign location="foo.bar.baz " expr="2"/>
</onentry>
diff --git a/test/w3c/xpath/test402.scxml b/test/w3c/xpath/test402.scxml
index 4a822c8..798f992 100644
--- a/test/w3c/xpath/test402.scxml
+++ b/test/w3c/xpath/test402.scxml
@@ -14,7 +14,7 @@ are pulled off the internal queue in order, and that prefix matching works on th
<!-- the first internal event. The error will be the second, and event2 will be the third -->
<raise event="event1"/>
<!-- assigning to a non-existent location should raise an error -->
- <assign location="$Var1" expr="2"/>
+ <assign location="foo.bar.baz " expr="2"/>
</onentry>
<transition event="event1" target="s02">
diff --git a/test/w3c/xpath/test446.scxml b/test/w3c/xpath/test446.scxml
new file mode 100644
index 0000000..0fa8698
--- /dev/null
+++ b/test/w3c/xpath/test446.scxml
@@ -0,0 +1,21 @@
+<?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:test458.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="'pass'"/></onentry></final>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/xpath/test459.scxml b/test/w3c/xpath/test459.scxml
new file mode 100644
index 0000000..b631c25
--- /dev/null
+++ b/test/w3c/xpath/test459.scxml
@@ -0,0 +1,35 @@
+<?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> \ No newline at end of file
diff --git a/test/w3c/xpath/test496.scxml b/test/w3c/xpath/test496.scxml
new file mode 100644
index 0000000..a30064f
--- /dev/null
+++ b/test/w3c/xpath/test496.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><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">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event" target="#_scxml_foo"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.communication" target="pass"/>
+ <transition event="*" 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> \ No newline at end of file
diff --git a/test/w3c/xpath/test528.scxml b/test/w3c/xpath/test528.scxml
index f8f8416..eda36d2 100644
--- a/test/w3c/xpath/test528.scxml
+++ b/test/w3c/xpath/test528.scxml
@@ -6,7 +6,6 @@
<transition event="error.execution" target="s1"/>
<transition event="done.state.s0" target="fail"/>
- <transition event="done.state.s0" target="fail"/>
<state id="s01">
<transition target="s02"/>
diff --git a/test/w3c/xpath/test529.scxml b/test/w3c/xpath/test529.scxml
index 5a78529..d67af4b 100644
--- a/test/w3c/xpath/test529.scxml
+++ b/test/w3c/xpath/test529.scxml
@@ -3,7 +3,7 @@
<state id="s0" initial="s01">
- <transition event="done.state.s0" cond="$_event/data = '21'" target="pass">
+ <transition event="done.state.s0" cond="$_event/data = 21" target="pass">
</transition>
<transition event="done.state.s0" target="fail">
diff --git a/test/w3c/xpath/test545.scxml b/test/w3c/xpath/test545.scxml
new file mode 100644
index 0000000..1e12770
--- /dev/null
+++ b/test/w3c/xpath/test545.scxml
@@ -0,0 +1,17 @@
+<?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="'pass'"/></onentry></final>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/xpath/test561.scxml b/test/w3c/xpath/test561.scxml
index e50e00c..e94a813 100644
--- a/test/w3c/xpath/test561.scxml
+++ b/test/w3c/xpath/test561.scxml
@@ -1,5 +1,5 @@
-<?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">
+<?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">
diff --git a/test/w3c/xpath/test577.scxml b/test/w3c/xpath/test577.scxml
new file mode 100644
index 0000000..7652834
--- /dev/null
+++ b/test/w3c/xpath/test577.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that that <send> without target in basichttp event i/o processor
+causes error.communication to get added to internal queue . --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+
+
+<state id="s0">
+ <onentry>
+ <!-- sent by scxml event i/o processor, added to external queue -->
+ <send event="event1"/>
+ <!-- should put error.communication on internal queue -->
+ <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+
+ </onentry>
+
+
+ <transition event="error.communication" target="pass"/>
+ <transition event="*" 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> \ No newline at end of file
diff --git a/test/w3c/xpath/test578.scxml b/test/w3c/xpath/test578.scxml
index bdb5e2d..9a25195 100644
--- a/test/w3c/xpath/test578.scxml
+++ b/test/w3c/xpath/test578.scxml
@@ -5,7 +5,7 @@
<state id="s0">
<onentry>
<send event="foo">
- <content>{ productName : "bar", size : 27 }</content>
+ <content>{ "productName" : "bar", "size" : 27 }</content>
</send>
</onentry>
<transition event="foo" cond="_event.data.productName == 'bar'" target="pass"/>
diff --git a/test/w3c/xpath/test579.scxml b/test/w3c/xpath/test579.scxml
new file mode 100644
index 0000000..311c0a9
--- /dev/null
+++ b/test/w3c/xpath/test579.scxml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that default history content is executed correctly. The Process MUST execute any executable content in the transition after the parent state's onentry handlers, and, in the case where the history pseudo-state is the target of an <initial> transition,
+the executable content inside the <initial> transition. However the Processor MUST
+execute this content only if there is no stored history. Once the history state's
+parent state has been visited and exited, the default history content must not be executed --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="xpath">
+
+
+<state id="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <initial>
+ <transition target="sh1">
+ <raise event="event2"/>
+ </transition>
+ </initial>
+ <onentry>
+ <send delay="2s" event="timeout"/>
+ <raise event="event1"/>
+ </onentry>
+ <onexit>
+ <assign location="$Var1" expr="$Var1 + 1"/>
+ </onexit>
+ <history id="sh1">
+ <transition target="s01">
+ <raise event="event3"/>
+ </transition>
+ </history>
+
+ <state id="s01">
+ <transition event="event1" target="s02"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s02">
+ <transition event="event2" target="s03"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s03">
+
+ <transition cond="$Var1/text() ==0" event="event3" target="s0"/>
+ <transition cond="$Var1/text() ==1" event="event1" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+</state>
+
+<state id="s2">
+ <transition event="event2" target="s3"/>
+ <transition event="*" target="fail"/>
+
+ </state>
+
+<state id="s3">
+ <transition event="event3" target="fail"/>
+ <transition event="timeout" 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> \ No newline at end of file
diff --git a/test/w3c/xpath/test580.scxml b/test/w3c/xpath/test580.scxml
new file mode 100644
index 0000000..272bbce
--- /dev/null
+++ b/test/w3c/xpath/test580.scxml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a history state never ends up part of the configuration --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="p1" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+<parallel id="p1">
+ <onentry>
+ <send delay="2s" event="timeout"/>
+ </onentry>
+
+
+ <state id="s0">
+ <transition cond="In('sh1')" target="fail"/>
+ <transition event="timeout" target="fail"/>
+ </state>
+
+
+<state id="s1">
+ <initial>
+ <transition target="sh1"/>
+ </initial>
+
+
+ <history id="sh1">
+ <transition target="s11"/>
+ </history>
+
+ <state id="s11">
+ <transition cond="In('sh1')" target="fail"/>
+ <transition target="s12"/>
+ </state>
+
+ <state id="s12"/>
+ <transition cond="In('sh1')" target="fail"/>
+ <transition cond="$Var1/text() ==0" target="sh1"/>
+ <transition cond="$Var1/text() ==1" target="pass"/>
+ <onexit>
+ <assign location="$Var1" expr="$Var1 + 1"/>
+ </onexit>
+ </state>
+
+
+ </parallel>
+
+<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file