summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/uscxml/Factory.h9
-rw-r--r--src/uscxml/Interpreter.cpp220
-rw-r--r--src/uscxml/Interpreter.h2
-rw-r--r--src/uscxml/URL.cpp1
-rw-r--r--src/uscxml/interpreter/InterpreterDraft6.cpp16
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp46
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h4
-rw-r--r--test/samples/w3c/tests/test144.scxml23
-rw-r--r--test/samples/w3c/tests/test147.scxml30
-rw-r--r--test/samples/w3c/tests/test148.scxml31
-rw-r--r--test/samples/w3c/tests/test149.scxml25
-rw-r--r--test/samples/w3c/tests/test150.scxml41
-rw-r--r--test/samples/w3c/tests/test151.scxml41
-rw-r--r--test/samples/w3c/tests/test152.scxml48
-rw-r--r--test/samples/w3c/tests/test153.scxml35
-rw-r--r--test/samples/w3c/tests/test155.scxml26
-rw-r--r--test/samples/w3c/tests/test156.scxml28
-rw-r--r--test/samples/w3c/tests/test158.scxml23
-rw-r--r--test/samples/w3c/tests/test159.scxml20
-rw-r--r--test/samples/w3c/tests/test172.scxml20
-rw-r--r--test/samples/w3c/tests/test173.scxml21
-rw-r--r--test/samples/w3c/tests/test174.scxml21
-rw-r--r--test/samples/w3c/tests/test175.scxml27
-rw-r--r--test/samples/w3c/tests/test176.scxml30
-rw-r--r--test/samples/w3c/tests/test178.scxml27
-rw-r--r--test/samples/w3c/tests/test179.scxml18
-rw-r--r--test/samples/w3c/tests/test183.scxml21
-rw-r--r--test/samples/w3c/tests/test185.scxml23
-rw-r--r--test/samples/w3c/tests/test186.scxml31
-rw-r--r--test/samples/w3c/tests/test187.scxml33
-rw-r--r--test/samples/w3c/tests/test194.scxml22
-rw-r--r--test/samples/w3c/tests/test198.scxml19
-rw-r--r--test/samples/w3c/tests/test199.scxml18
-rw-r--r--test/samples/w3c/tests/test200.scxml18
-rw-r--r--test/samples/w3c/tests/test201.scxml19
-rw-r--r--test/samples/w3c/tests/test205.scxml30
-rw-r--r--test/samples/w3c/tests/test207.scxml56
-rw-r--r--test/samples/w3c/tests/test208.scxml21
-rw-r--r--test/samples/w3c/tests/test210.scxml24
-rw-r--r--test/samples/w3c/tests/test215.scxml29
-rw-r--r--test/samples/w3c/tests/test216.scxml22
-rw-r--r--test/samples/w3c/tests/test216sub1.scxml5
-rw-r--r--test/samples/w3c/tests/test220.scxml21
-rw-r--r--test/samples/w3c/tests/test223.scxml29
-rw-r--r--test/samples/w3c/tests/test224.scxml33
-rw-r--r--test/samples/w3c/tests/test225.scxml38
-rw-r--r--test/samples/w3c/tests/test226.scxml23
-rw-r--r--test/samples/w3c/tests/test226sub1.scxml16
-rw-r--r--test/samples/w3c/tests/test228.scxml33
-rw-r--r--test/samples/w3c/tests/test229.scxml42
-rw-r--r--test/samples/w3c/tests/test230.scxml62
-rw-r--r--test/samples/w3c/tests/test232.scxml40
-rw-r--r--test/samples/w3c/tests/test233.scxml35
-rw-r--r--test/samples/w3c/tests/test234.scxml66
-rw-r--r--test/samples/w3c/tests/test235.scxml23
-rw-r--r--test/samples/w3c/tests/test236.scxml39
-rw-r--r--test/samples/w3c/tests/test237.scxml41
-rw-r--r--test/samples/w3c/tests/test239.scxml32
-rw-r--r--test/samples/w3c/tests/test239sub1.scxml5
-rw-r--r--test/samples/w3c/tests/test240.scxml67
-rw-r--r--test/samples/w3c/tests/test241.scxml98
-rw-r--r--test/samples/w3c/tests/test242.scxml53
-rw-r--r--test/samples/w3c/tests/test242sub1.scxml5
-rw-r--r--test/samples/w3c/tests/test243.scxml36
-rw-r--r--test/samples/w3c/tests/test244.scxml39
-rw-r--r--test/samples/w3c/tests/test245.scxml34
-rw-r--r--test/samples/w3c/tests/test247.scxml22
-rw-r--r--test/samples/w3c/tests/test250.scxml42
-rw-r--r--test/samples/w3c/tests/test252.scxml47
-rw-r--r--test/samples/w3c/tests/test253.scxml79
-rw-r--r--test/samples/w3c/tests/test276.scxml17
-rw-r--r--test/samples/w3c/tests/test276sub1.scxml21
-rw-r--r--test/samples/w3c/tests/test278.scxml21
-rw-r--r--test/samples/w3c/tests/test279.scxml21
-rw-r--r--test/samples/w3c/tests/test280.scxml28
-rw-r--r--test/samples/w3c/tests/test286.scxml18
-rw-r--r--test/samples/w3c/tests/test287.scxml19
-rw-r--r--test/samples/w3c/tests/test294.scxml46
-rw-r--r--test/samples/w3c/tests/test298.scxml23
-rw-r--r--test/samples/w3c/tests/test301.scxml13
-rw-r--r--test/samples/w3c/tests/test302.scxml15
-rw-r--r--test/samples/w3c/tests/test303.scxml20
-rw-r--r--test/samples/w3c/tests/test304.scxml13
-rw-r--r--test/samples/w3c/tests/test307.scxml42
-rw-r--r--test/samples/w3c/tests/test309.scxml12
-rw-r--r--test/samples/w3c/tests/test310.scxml18
-rw-r--r--test/samples/w3c/tests/test311.scxml16
-rw-r--r--test/samples/w3c/tests/test312.scxml20
-rw-r--r--test/samples/w3c/tests/test313.scxml21
-rw-r--r--test/samples/w3c/tests/test314.scxml34
-rw-r--r--test/samples/w3c/tests/test318.scxml27
-rw-r--r--test/samples/w3c/tests/test319.scxml20
-rw-r--r--test/samples/w3c/tests/test321.scxml15
-rw-r--r--test/samples/w3c/tests/test322.scxml36
-rw-r--r--test/samples/w3c/tests/test323.scxml15
-rw-r--r--test/samples/w3c/tests/test324.scxml21
-rw-r--r--test/samples/w3c/tests/test325.scxml18
-rw-r--r--test/samples/w3c/tests/test326.scxml35
-rw-r--r--test/samples/w3c/tests/test329.scxml53
-rw-r--r--test/samples/w3c/tests/test330.scxml23
-rw-r--r--test/samples/w3c/tests/test331.scxml60
-rw-r--r--test/samples/w3c/tests/test332.scxml29
-rw-r--r--test/samples/w3c/tests/test333.scxml16
-rw-r--r--test/samples/w3c/tests/test335.scxml16
-rw-r--r--test/samples/w3c/tests/test336.scxml25
-rw-r--r--test/samples/w3c/tests/test337.scxml16
-rw-r--r--test/samples/w3c/tests/test338.scxml39
-rw-r--r--test/samples/w3c/tests/test339.scxml16
-rw-r--r--test/samples/w3c/tests/test342.scxml25
-rw-r--r--test/samples/w3c/tests/test343.scxml34
-rw-r--r--test/samples/w3c/tests/test344.scxml20
-rw-r--r--test/samples/w3c/tests/test346.scxml53
-rw-r--r--test/samples/w3c/tests/test355.scxml14
-rw-r--r--test/samples/w3c/tests/test364.scxml73
-rw-r--r--test/samples/w3c/tests/test372.scxml28
-rw-r--r--test/samples/w3c/tests/test375.scxml26
-rw-r--r--test/samples/w3c/tests/test376.scxml22
-rw-r--r--test/samples/w3c/tests/test377.scxml31
-rw-r--r--test/samples/w3c/tests/test378.scxml25
-rw-r--r--test/samples/w3c/tests/test387.scxml97
-rw-r--r--test/samples/w3c/tests/test388.scxml76
-rw-r--r--test/samples/w3c/tests/test396.scxml16
-rw-r--r--test/samples/w3c/tests/test399.scxml66
-rw-r--r--test/samples/w3c/tests/test401.scxml21
-rw-r--r--test/samples/w3c/tests/test402.scxml40
-rw-r--r--test/samples/w3c/tests/test403a.scxml43
-rw-r--r--test/samples/w3c/tests/test403b.scxml40
-rw-r--r--test/samples/w3c/tests/test403c.scxml54
-rw-r--r--test/samples/w3c/tests/test404.scxml60
-rw-r--r--test/samples/w3c/tests/test405.scxml67
-rw-r--r--test/samples/w3c/tests/test406.scxml64
-rw-r--r--test/samples/w3c/tests/test407.scxml20
-rw-r--r--test/samples/w3c/tests/test409.scxml32
-rw-r--r--test/samples/w3c/tests/test411.scxml32
-rw-r--r--test/samples/w3c/tests/test412.scxml52
-rw-r--r--test/samples/w3c/tests/test413.scxml45
-rw-r--r--test/samples/w3c/tests/test416.scxml22
-rw-r--r--test/samples/w3c/tests/test417.scxml34
-rw-r--r--test/samples/w3c/tests/test419.scxml17
-rw-r--r--test/samples/w3c/tests/test421.scxml28
-rw-r--r--test/samples/w3c/tests/test422.scxml75
-rw-r--r--test/samples/w3c/tests/test423.scxml25
-rw-r--r--test/samples/w3c/tests/test436.scxml21
-rw-r--r--test/samples/w3c/tests/test441a.scxml44
-rw-r--r--test/samples/w3c/tests/test441b.scxml44
-rw-r--r--test/samples/w3c/tests/test444.scxml16
-rw-r--r--test/samples/w3c/tests/test445.scxml16
-rw-r--r--test/samples/w3c/tests/test448.scxml31
-rw-r--r--test/samples/w3c/tests/test449.scxml11
-rw-r--r--test/samples/w3c/tests/test451.scxml18
-rw-r--r--test/samples/w3c/tests/test452.scxml24
-rw-r--r--test/samples/w3c/tests/test453.scxml19
-rw-r--r--test/samples/w3c/tests/test456.scxml19
-rw-r--r--test/samples/w3c/tests/test457.scxml59
-rw-r--r--test/samples/w3c/tests/test460.scxml24
-rw-r--r--test/samples/w3c/tests/test463.scxml17
-rw-r--r--test/samples/w3c/tests/test464.scxml16
-rw-r--r--test/samples/w3c/tests/test465.scxml22
-rw-r--r--test/samples/w3c/tests/test466.scxml14
-rw-r--r--test/samples/w3c/tests/test467.scxml12
-rw-r--r--test/samples/w3c/tests/test468.scxml23
-rw-r--r--test/samples/w3c/tests/test469.scxml25
-rw-r--r--test/samples/w3c/tests/test470.scxml24
-rw-r--r--test/samples/w3c/tests/test473.scxml37
-rw-r--r--test/samples/w3c/tests/test474.scxml36
-rw-r--r--test/samples/w3c/tests/test475.scxml36
-rw-r--r--test/samples/w3c/tests/test476.scxml36
-rw-r--r--test/samples/w3c/tests/test477.scxml36
-rw-r--r--test/samples/w3c/tests/test478.scxml36
-rw-r--r--test/samples/w3c/tests/test479.scxml36
-rw-r--r--test/samples/w3c/tests/test480.scxml32
-rw-r--r--test/samples/w3c/tests/test481.scxml37
-rw-r--r--test/samples/w3c/tests/test482.scxml16
-rw-r--r--test/samples/w3c/tests/test486b.scxml14
-rw-r--r--test/samples/w3c/tests/test487.scxml17
-rw-r--r--test/samples/w3c/tests/test488.scxml34
-rw-r--r--test/samples/w3c/tests/test503.scxml37
-rw-r--r--test/samples/w3c/tests/test504.scxml75
-rw-r--r--test/samples/w3c/tests/test505.scxml47
-rw-r--r--test/samples/w3c/tests/test506.scxml53
-rw-r--r--test/samples/w3c/tests/test521.scxml23
-rw-r--r--test/samples/w3c/tests/test525.scxml26
-rw-r--r--test/samples/w3c/tests/test527.scxml25
-rw-r--r--test/samples/w3c/tests/test528.scxml34
-rw-r--r--test/samples/w3c/tests/test529.scxml25
-rw-r--r--test/samples/w3c/tests/test530.scxml26
-rw-r--r--test/samples/w3c/tests/test533.scxml62
-rw-r--r--test/samples/w3c/tests/test537.scxml17
-rw-r--r--test/samples/w3c/tests/test539.scxml26
-rw-r--r--test/samples/w3c/tests/test540.scxml21
-rw-r--r--test/samples/w3c/tests/test542.scxml34
-rw-r--r--test/samples/w3c/tests/test544.scxml17
-rw-r--r--test/samples/w3c/tests/test546.scxml17
-rw-r--r--test/samples/w3c/tests/test547.scxml33
-rw-r--r--test/samples/w3c/tests/test550.scxml20
-rw-r--r--test/samples/w3c/tests/test551.scxml23
-rw-r--r--test/samples/w3c/tests/test552.scxml18
-rw-r--r--test/samples/w3c/tests/test553.scxml23
-rw-r--r--test/samples/w3c/tests/test554.scxml25
-rw-r--r--test/samples/w3c/tests/test555.scxml27
-rw-r--r--test/samples/w3c/tests/test557.scxml26
-rw-r--r--test/samples/w3c/tests/test558.scxml24
-rw-r--r--test/samples/w3c/tests/test560.scxml19
-rw-r--r--test/samples/w3c/tests/test561.scxml24
-rw-r--r--test/samples/w3c/tests/test562.scxml22
-rw-r--r--test/samples/w3c/tests/test569.scxml15
-rw-r--r--test/samples/w3c/tests/test570.scxml45
-rw-r--r--test/samples/w3c/tests/test576.scxml37
-rw-r--r--test/samples/w3c/txml/test144.txml27
-rw-r--r--test/samples/w3c/txml/test147.txml34
-rw-r--r--test/samples/w3c/txml/test148.txml35
-rw-r--r--test/samples/w3c/txml/test149.txml28
-rw-r--r--test/samples/w3c/txml/test150.txml45
-rw-r--r--test/samples/w3c/txml/test151.txml45
-rw-r--r--test/samples/w3c/txml/test152.txml52
-rw-r--r--test/samples/w3c/txml/test153.txml39
-rw-r--r--test/samples/w3c/txml/test155.txml30
-rw-r--r--test/samples/w3c/txml/test156.txml32
-rw-r--r--test/samples/w3c/txml/test158.txml27
-rw-r--r--test/samples/w3c/txml/test159.txml24
-rw-r--r--test/samples/w3c/txml/test172.txml23
-rw-r--r--test/samples/w3c/txml/test173.txml24
-rw-r--r--test/samples/w3c/txml/test174.txml24
-rw-r--r--test/samples/w3c/txml/test175.txml30
-rw-r--r--test/samples/w3c/txml/test176.txml33
-rw-r--r--test/samples/w3c/txml/test178.txml31
-rw-r--r--test/samples/w3c/txml/test179.txml21
-rw-r--r--test/samples/w3c/txml/test183.txml24
-rw-r--r--test/samples/w3c/txml/test185.txml26
-rw-r--r--test/samples/w3c/txml/test186.txml34
-rw-r--r--test/samples/w3c/txml/test187.txml36
-rw-r--r--test/samples/w3c/txml/test194.txml26
-rw-r--r--test/samples/w3c/txml/test198.txml23
-rw-r--r--test/samples/w3c/txml/test199.txml22
-rw-r--r--test/samples/w3c/txml/test200.txml22
-rw-r--r--test/samples/w3c/txml/test201.txml23
-rw-r--r--test/samples/w3c/txml/test205.txml34
-rw-r--r--test/samples/w3c/txml/test207.txml60
-rw-r--r--test/samples/w3c/txml/test208.txml25
-rw-r--r--test/samples/w3c/txml/test210.txml28
-rw-r--r--test/samples/w3c/txml/test215.txml33
-rw-r--r--test/samples/w3c/txml/test216.txml26
-rw-r--r--test/samples/w3c/txml/test216sub1.txml9
-rw-r--r--test/samples/w3c/txml/test216sub1.txml.19
-rw-r--r--test/samples/w3c/txml/test220.txml25
-rw-r--r--test/samples/w3c/txml/test223.txml33
-rw-r--r--test/samples/w3c/txml/test224.txml35
-rw-r--r--test/samples/w3c/txml/test225.txml42
-rw-r--r--test/samples/w3c/txml/test226.txml27
-rw-r--r--test/samples/w3c/txml/test226sub1.txml20
-rw-r--r--test/samples/w3c/txml/test228.txml37
-rw-r--r--test/samples/w3c/txml/test229.txml46
-rw-r--r--test/samples/w3c/txml/test230.txml66
-rw-r--r--test/samples/w3c/txml/test232.txml44
-rw-r--r--test/samples/w3c/txml/test233.txml39
-rw-r--r--test/samples/w3c/txml/test234.txml70
-rw-r--r--test/samples/w3c/txml/test235.txml27
-rw-r--r--test/samples/w3c/txml/test236.txml43
-rw-r--r--test/samples/w3c/txml/test237.txml45
-rw-r--r--test/samples/w3c/txml/test239.txml36
-rw-r--r--test/samples/w3c/txml/test239sub1.txml9
-rw-r--r--test/samples/w3c/txml/test240.txml71
-rw-r--r--test/samples/w3c/txml/test241.txml102
-rw-r--r--test/samples/w3c/txml/test242.txml57
-rw-r--r--test/samples/w3c/txml/test242sub1.txml9
-rw-r--r--test/samples/w3c/txml/test243.txml40
-rw-r--r--test/samples/w3c/txml/test244.txml43
-rw-r--r--test/samples/w3c/txml/test245.txml38
-rw-r--r--test/samples/w3c/txml/test247.txml26
-rw-r--r--test/samples/w3c/txml/test250.txml46
-rw-r--r--test/samples/w3c/txml/test252.txml51
-rw-r--r--test/samples/w3c/txml/test253.txml83
-rw-r--r--test/samples/w3c/txml/test276.txml21
-rw-r--r--test/samples/w3c/txml/test276sub1.txml24
-rw-r--r--test/samples/w3c/txml/test278.txml22
-rw-r--r--test/samples/w3c/txml/test279.txml25
-rw-r--r--test/samples/w3c/txml/test280.txml34
-rw-r--r--test/samples/w3c/txml/test286.txml23
-rw-r--r--test/samples/w3c/txml/test287.txml23
-rw-r--r--test/samples/w3c/txml/test294.txml49
-rw-r--r--test/samples/w3c/txml/test298.txml28
-rw-r--r--test/samples/w3c/txml/test301.txml17
-rw-r--r--test/samples/w3c/txml/test302.txml20
-rw-r--r--test/samples/w3c/txml/test303.txml24
-rw-r--r--test/samples/w3c/txml/test304.txml17
-rw-r--r--test/samples/w3c/txml/test307.txml43
-rw-r--r--test/samples/w3c/txml/test309.txml16
-rw-r--r--test/samples/w3c/txml/test310.txml23
-rw-r--r--test/samples/w3c/txml/test311.txml21
-rw-r--r--test/samples/w3c/txml/test312.txml25
-rw-r--r--test/samples/w3c/txml/test313.txml26
-rw-r--r--test/samples/w3c/txml/test314.txml39
-rw-r--r--test/samples/w3c/txml/test318.txml31
-rw-r--r--test/samples/w3c/txml/test319.txml25
-rw-r--r--test/samples/w3c/txml/test321.txml19
-rw-r--r--test/samples/w3c/txml/test322.txml37
-rw-r--r--test/samples/w3c/txml/test323.txml19
-rw-r--r--test/samples/w3c/txml/test324.txml25
-rw-r--r--test/samples/w3c/txml/test325.txml22
-rw-r--r--test/samples/w3c/txml/test326.txml38
-rw-r--r--test/samples/w3c/txml/test329.txml55
-rw-r--r--test/samples/w3c/txml/test330.txml27
-rw-r--r--test/samples/w3c/txml/test331.txml62
-rw-r--r--test/samples/w3c/txml/test332.txml33
-rw-r--r--test/samples/w3c/txml/test333.txml20
-rw-r--r--test/samples/w3c/txml/test335.txml20
-rw-r--r--test/samples/w3c/txml/test336.txml29
-rw-r--r--test/samples/w3c/txml/test337.txml20
-rw-r--r--test/samples/w3c/txml/test338.txml43
-rw-r--r--test/samples/w3c/txml/test339.txml20
-rw-r--r--test/samples/w3c/txml/test342.txml28
-rw-r--r--test/samples/w3c/txml/test343.txml37
-rw-r--r--test/samples/w3c/txml/test344.txml24
-rw-r--r--test/samples/w3c/txml/test346.txml57
-rw-r--r--test/samples/w3c/txml/test355.txml18
-rw-r--r--test/samples/w3c/txml/test364.txml77
-rw-r--r--test/samples/w3c/txml/test372.txml32
-rw-r--r--test/samples/w3c/txml/test375.txml30
-rw-r--r--test/samples/w3c/txml/test376.txml26
-rw-r--r--test/samples/w3c/txml/test377.txml35
-rw-r--r--test/samples/w3c/txml/test378.txml29
-rw-r--r--test/samples/w3c/txml/test387.txml101
-rw-r--r--test/samples/w3c/txml/test388.txml80
-rw-r--r--test/samples/w3c/txml/test396.txml20
-rw-r--r--test/samples/w3c/txml/test399.txml70
-rw-r--r--test/samples/w3c/txml/test401.txml25
-rw-r--r--test/samples/w3c/txml/test402.txml44
-rw-r--r--test/samples/w3c/txml/test403a.txml47
-rw-r--r--test/samples/w3c/txml/test403b.txml44
-rw-r--r--test/samples/w3c/txml/test403c.txml58
-rw-r--r--test/samples/w3c/txml/test404.txml64
-rw-r--r--test/samples/w3c/txml/test405.txml71
-rw-r--r--test/samples/w3c/txml/test406.txml68
-rw-r--r--test/samples/w3c/txml/test407.txml24
-rw-r--r--test/samples/w3c/txml/test409.txml36
-rw-r--r--test/samples/w3c/txml/test411.txml36
-rw-r--r--test/samples/w3c/txml/test412.txml56
-rw-r--r--test/samples/w3c/txml/test413.txml49
-rw-r--r--test/samples/w3c/txml/test416.txml26
-rw-r--r--test/samples/w3c/txml/test417.txml39
-rw-r--r--test/samples/w3c/txml/test419.txml22
-rw-r--r--test/samples/w3c/txml/test421.txml33
-rw-r--r--test/samples/w3c/txml/test422.txml78
-rw-r--r--test/samples/w3c/txml/test423.txml28
-rw-r--r--test/samples/w3c/txml/test436.txml24
-rw-r--r--test/samples/w3c/txml/test441a.txml47
-rw-r--r--test/samples/w3c/txml/test441b.txml47
-rw-r--r--test/samples/w3c/txml/test444.txml20
-rw-r--r--test/samples/w3c/txml/test445.txml20
-rw-r--r--test/samples/w3c/txml/test448.txml35
-rw-r--r--test/samples/w3c/txml/test449.txml15
-rw-r--r--test/samples/w3c/txml/test451.txml23
-rw-r--r--test/samples/w3c/txml/test452.txml27
-rw-r--r--test/samples/w3c/txml/test453.txml22
-rw-r--r--test/samples/w3c/txml/test456.txml22
-rw-r--r--test/samples/w3c/txml/test457.txml62
-rw-r--r--test/samples/w3c/txml/test460.txml26
-rw-r--r--test/samples/w3c/txml/test463.txml22
-rw-r--r--test/samples/w3c/txml/test464.txml21
-rw-r--r--test/samples/w3c/txml/test465.txml27
-rw-r--r--test/samples/w3c/txml/test466.txml19
-rw-r--r--test/samples/w3c/txml/test467.txml17
-rw-r--r--test/samples/w3c/txml/test468.txml28
-rw-r--r--test/samples/w3c/txml/test469.txml29
-rw-r--r--test/samples/w3c/txml/test470.txml28
-rw-r--r--test/samples/w3c/txml/test473.txml44
-rw-r--r--test/samples/w3c/txml/test474.txml43
-rw-r--r--test/samples/w3c/txml/test475.txml43
-rw-r--r--test/samples/w3c/txml/test476.txml43
-rw-r--r--test/samples/w3c/txml/test477.txml43
-rw-r--r--test/samples/w3c/txml/test478.txml40
-rw-r--r--test/samples/w3c/txml/test479.txml40
-rw-r--r--test/samples/w3c/txml/test480.txml36
-rw-r--r--test/samples/w3c/txml/test481.txml41
-rw-r--r--test/samples/w3c/txml/test482.txml23
-rw-r--r--test/samples/w3c/txml/test486b.txml18
-rw-r--r--test/samples/w3c/txml/test487.txml21
-rw-r--r--test/samples/w3c/txml/test488.txml37
-rw-r--r--test/samples/w3c/txml/test503.txml41
-rw-r--r--test/samples/w3c/txml/test504.txml79
-rw-r--r--test/samples/w3c/txml/test505.txml51
-rw-r--r--test/samples/w3c/txml/test506.txml57
-rw-r--r--test/samples/w3c/txml/test521.txml27
-rw-r--r--test/samples/w3c/txml/test525.txml30
-rw-r--r--test/samples/w3c/txml/test527.txml28
-rw-r--r--test/samples/w3c/txml/test528.txml37
-rw-r--r--test/samples/w3c/txml/test529.txml28
-rw-r--r--test/samples/w3c/txml/test530.txml30
-rw-r--r--test/samples/w3c/txml/test533.txml66
-rw-r--r--test/samples/w3c/txml/test537.txml22
-rw-r--r--test/samples/w3c/txml/test539.txml30
-rw-r--r--test/samples/w3c/txml/test539.txt4
-rw-r--r--test/samples/w3c/txml/test540.txml25
-rw-r--r--test/samples/w3c/txml/test540.txt3
-rw-r--r--test/samples/w3c/txml/test542.txml38
-rw-r--r--test/samples/w3c/txml/test544.txml21
-rw-r--r--test/samples/w3c/txml/test546.txml21
-rw-r--r--test/samples/w3c/txml/test547.txml38
-rw-r--r--test/samples/w3c/txml/test550.txml24
-rw-r--r--test/samples/w3c/txml/test551.txml27
-rw-r--r--test/samples/w3c/txml/test552.txml22
-rw-r--r--test/samples/w3c/txml/test552.txt1
-rw-r--r--test/samples/w3c/txml/test553.txml27
-rw-r--r--test/samples/w3c/txml/test554.txml29
-rw-r--r--test/samples/w3c/txml/test555.txml31
-rw-r--r--test/samples/w3c/txml/test557.txml30
-rw-r--r--test/samples/w3c/txml/test557.txt4
-rw-r--r--test/samples/w3c/txml/test558.txml28
-rw-r--r--test/samples/w3c/txml/test558.txt3
-rw-r--r--test/samples/w3c/txml/test560.txml23
-rw-r--r--test/samples/w3c/txml/test561.txml29
-rw-r--r--test/samples/w3c/txml/test562.txml26
-rw-r--r--test/samples/w3c/txml/test569.txml19
-rw-r--r--test/samples/w3c/txml/test570.txml49
-rw-r--r--test/samples/w3c/txml/test576.txml41
415 files changed, 13302 insertions, 158 deletions
diff --git a/src/uscxml/Factory.h b/src/uscxml/Factory.h
index b86c5d1..e257e45 100644
--- a/src/uscxml/Factory.h
+++ b/src/uscxml/Factory.h
@@ -246,13 +246,10 @@ public:
virtual bool evalAsBool(const std::string& expr) = 0;
virtual void assign(const std::string& location, const std::string& expr) = 0;
virtual void assign(const std::string& location, const Data& data) = 0;
- virtual bool isDefined(const std::string& expr) = 0;
+ virtual bool isDeclared(const std::string& expr) = 0;
protected:
Interpreter* _interpreter;
- std::string _sessionId;
- std::string _name;
-
};
class DataModel {
@@ -320,8 +317,8 @@ public:
return _impl->assign(location, data);
}
- virtual bool isDefined(const std::string& expr) {
- return _impl->isDefined(expr);
+ virtual bool isDeclared(const std::string& expr) {
+ return _impl->isDeclared(expr);
}
protected:
diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp
index 7289b82..366b6d6 100644
--- a/src/uscxml/Interpreter.cpp
+++ b/src/uscxml/Interpreter.cpp
@@ -361,31 +361,43 @@ void Interpreter::internalDoneSend(const Arabica::DOM::Node<std::string>& state)
if (doneChilds.item(i).getNodeType() != Node_base::ELEMENT_NODE)
continue;
if (boost::iequals(TAGNAME(doneChilds.item(i)), _xmlNSPrefix + "param")) {
- if (!HAS_ATTR(doneChilds.item(i), "name")) {
- LOG(ERROR) << "param element is missing name attribut";
- continue;
- }
- std::string paramValue;
- if (HAS_ATTR(doneChilds.item(i), "expr") && _dataModel) {
- std::string location = _dataModel.evalAsString(ATTR(doneChilds.item(i), "expr"));
- paramValue = _dataModel.evalAsString(location);
- } else if(HAS_ATTR(doneChilds.item(i), "location") && _dataModel) {
- paramValue = _dataModel.evalAsString(ATTR(doneChilds.item(i), "location"));
- } else {
- LOG(ERROR) << "param element is missing expr or location or no datamodel is specified";
- continue;
+ try {
+ if (!HAS_ATTR(doneChilds.item(i), "name")) {
+ LOG(ERROR) << "param element is missing name attribut";
+ continue;
+ }
+ std::string paramValue;
+ if (HAS_ATTR(doneChilds.item(i), "expr") && _dataModel) {
+ std::string expr = _dataModel.evalAsString(ATTR(doneChilds.item(i), "expr"));
+ paramValue = _dataModel.evalAsString(expr);
+ } else if(HAS_ATTR(doneChilds.item(i), "location") && _dataModel) {
+ paramValue = _dataModel.evalAsString(ATTR(doneChilds.item(i), "location"));
+ } else {
+ LOG(ERROR) << "param element is missing expr or location or no datamodel is specified";
+ continue;
+ }
+ /// test 294
+ event.data.compound[ATTR(doneChilds.item(i), "name")] = paramValue;
+ } catch (Event e) {
+ e.name = "error.execution";
+ _internalQueue.push_back(e);
}
- event.data.compound[ATTR(doneChilds.item(i), "name")] = paramValue;
}
if (boost::iequals(TAGNAME(doneChilds.item(i)), _xmlNSPrefix + "content")) {
if (HAS_ATTR(doneChilds.item(i), "expr")) {
- if (_dataModel) {
- event.data.compound["content"] = Data(_dataModel.evalAsString(ATTR(doneChilds.item(i), "expr")), Data::VERBATIM);
- } else {
- LOG(ERROR) << "content element has expr attribute but no datamodel is specified.";
+ try {
+ if (_dataModel) {
+ /// test 294
+ event.data = Data(_dataModel.evalAsString(ATTR(doneChilds.item(i), "expr")), Data::VERBATIM);
+ } else {
+ LOG(ERROR) << "content element has expr attribute but no datamodel is specified.";
+ }
+ } catch (Event e) {
+ e.name = "error.execution";
+ _internalQueue.push_back(e);
}
} else if (doneChilds.item(i).hasChildNodes()) {
- event.data.compound["content"] = Data(doneChilds.item(i).getFirstChild().getNodeValue(), Data::VERBATIM);
+ event.data = Data(doneChilds.item(i).getFirstChild().getNodeValue(), Data::VERBATIM);
} else {
LOG(ERROR) << "content element does not specify any content.";
}
@@ -399,6 +411,60 @@ void Interpreter::internalDoneSend(const Arabica::DOM::Node<std::string>& state)
}
+void Interpreter::processContentElement(const Arabica::DOM::Node<std::string>& content, Arabica::DOM::Document<std::string>& dom, std::string& text) {
+ if (HAS_ATTR(content, "expr")) {
+ if (_dataModel) {
+ /// this is out of spec
+ std::string contentValue = _dataModel.evalAsString(ATTR(content, "expr"));
+ text = contentValue;
+ // sendReq.data.atom = contentValue;
+ // sendReq.data.type = Data::VERBATIM;
+ } else {
+ LOG(ERROR) << "content element has expr attribute but no datamodel is specified.";
+ }
+ } else if (content.hasChildNodes()) {
+ bool presentAsDOM = false;
+ NodeList<std::string> contentChilds = content.getChildNodes();
+ for (int i = 0; i < contentChilds.getLength(); i++) {
+ if (contentChilds.item(i).getNodeType() == Node_base::ELEMENT_NODE) {
+ presentAsDOM = true;
+ break;
+ }
+ }
+ if (presentAsDOM) {
+ // use the whole dom
+ Arabica::DOM::DOMImplementation<std::string> domFactory = Arabica::SimpleDOM::DOMImplementation<std::string>::getDOMImplementation();
+ dom = domFactory.createDocument(content.getNamespaceURI(), "", 0);
+ Node<std::string> newNode = dom.importNode(content, true);
+ dom.appendChild(newNode);
+ } else {
+ Node<std::string> textChild = content.getFirstChild();
+ while(textChild && textChild.getNodeType() != Node_base::TEXT_NODE) {
+ textChild = textChild.getNextSibling();
+ }
+ if (textChild && textChild.getNodeType() == Node_base::TEXT_NODE) {
+ /// create space normalized string
+ std::istringstream iss(content.getFirstChild().getNodeValue());
+ std::stringstream content;
+ std::string seperator;
+ do {
+ std::string token;
+ iss >> token;
+ if (token.length() > 0) {
+ content << seperator << token;
+ seperator = " ";
+ }
+ } while (iss);
+ text = content.str();
+ } else {
+ LOG(ERROR) << "content element has neither text nor element children.";
+ }
+ }
+ } else {
+ LOG(ERROR) << "content element does not specify any content.";
+ }
+}
+
void Interpreter::send(const Arabica::DOM::Node<std::string>& element) {
SendRequest sendReq;
try {
@@ -544,63 +610,12 @@ void Interpreter::send(const Arabica::DOM::Node<std::string>& element) {
return;
}
try {
-
// content
NodeSet<std::string> contents = filterChildElements(_xmlNSPrefix + "content", element);
if (contents.size() > 1)
LOG(ERROR) << "Only a single content element is allowed for send elements - using first one";
if (contents.size() > 0) {
- if (HAS_ATTR(contents[0], "expr")) {
- if (_dataModel) {
- /// this is out of spec
- std::string contentValue = _dataModel.evalAsString(ATTR(contents[0], "expr"));
- sendReq.content = contentValue;
-// sendReq.data.atom = contentValue;
-// sendReq.data.type = Data::VERBATIM;
- } else {
- LOG(ERROR) << "content element has expr attribute but no datamodel is specified.";
- }
- } else if (contents[0].hasChildNodes()) {
- bool presentAsDOM = false;
- NodeList<std::string> contentChilds = contents[0].getChildNodes();
- for (int i = 0; i < contentChilds.getLength(); i++) {
- if (contentChilds.item(i).getNodeType() == Node_base::ELEMENT_NODE) {
- presentAsDOM = true;
- break;
- }
- }
- if (presentAsDOM) {
- // use the whole dom
- Arabica::DOM::DOMImplementation<std::string> domFactory = Arabica::SimpleDOM::DOMImplementation<std::string>::getDOMImplementation();
- sendReq.dom = domFactory.createDocument(contents[0].getNamespaceURI(), "", 0);
- Node<std::string> newNode = sendReq.dom.importNode(contents[0], true);
- sendReq.dom.appendChild(newNode);
- } else {
- Node<std::string> textChild = contents[0].getFirstChild();
- while(textChild && textChild.getNodeType() != Node_base::TEXT_NODE) {
- textChild = textChild.getNextSibling();
- }
- if (textChild && textChild.getNodeType() == Node_base::TEXT_NODE) {
- /// create space normalized string
- std::istringstream iss(contents[0].getFirstChild().getNodeValue());
- std::stringstream content;
- std::string seperator;
- do {
- std::string token;
- iss >> token;
- if (token.length() > 0) {
- content << seperator << token;
- seperator = " ";
- }
- } while (iss);
- sendReq.content = content.str();
- } else {
- LOG(ERROR) << "content element has neither text nor element children.";
- }
- }
- } else {
- LOG(ERROR) << "content element does not specify any content.";
- }
+ processContentElement(contents[0], sendReq.dom, sendReq.content);
}
} catch (Event e) {
LOG(ERROR) << "Syntax error in send element content:" << std::endl << e << std::endl;
@@ -764,63 +779,11 @@ void Interpreter::invoke(const Arabica::DOM::Node<std::string>& element) {
// content
try {
-
- // content
NodeSet<std::string> contents = filterChildElements(_xmlNSPrefix + "content", element);
if (contents.size() > 1)
LOG(ERROR) << "Only a single content element is allowed for send elements - using first one";
if (contents.size() > 0) {
- if (HAS_ATTR(contents[0], "expr")) {
- if (_dataModel) {
- /// this is out of spec
- std::string contentValue = _dataModel.evalAsString(ATTR(contents[0], "expr"));
- invokeReq.content = contentValue;
- // sendReq.data.atom = contentValue;
- // sendReq.data.type = Data::VERBATIM;
- } else {
- LOG(ERROR) << "content element has expr attribute but no datamodel is specified.";
- }
- } else if (contents[0].hasChildNodes()) {
- bool presentAsDOM = false;
- NodeList<std::string> contentChilds = contents[0].getChildNodes();
- for (int i = 0; i < contentChilds.getLength(); i++) {
- if (contentChilds.item(i).getNodeType() == Node_base::ELEMENT_NODE) {
- presentAsDOM = true;
- break;
- }
- }
- if (presentAsDOM) {
- // use the whole dom
- Arabica::DOM::DOMImplementation<std::string> domFactory = Arabica::SimpleDOM::DOMImplementation<std::string>::getDOMImplementation();
- invokeReq.dom = domFactory.createDocument(contents[0].getNamespaceURI(), "", 0);
- Node<std::string> newNode = invokeReq.dom.importNode(contents[0], true);
- invokeReq.dom.appendChild(newNode);
- } else {
- Node<std::string> textChild = contents[0].getFirstChild();
- while(textChild && textChild.getNodeType() != Node_base::TEXT_NODE) {
- textChild = textChild.getNextSibling();
- }
- if (textChild && textChild.getNodeType() == Node_base::TEXT_NODE) {
- /// create space normalized string
- std::istringstream iss(contents[0].getFirstChild().getNodeValue());
- std::stringstream content;
- std::string seperator;
- do {
- std::string token;
- iss >> token;
- if (token.length() > 0) {
- content << seperator << token;
- seperator = " ";
- }
- } while (iss);
- invokeReq.content = content.str();
- } else {
- LOG(ERROR) << "content element has neither text nor element children.";
- }
- }
- } else {
- LOG(ERROR) << "content element does not specify any content.";
- }
+ processContentElement(contents[0], invokeReq.dom, invokeReq.content);
}
} catch (Event e) {
LOG(ERROR) << "Syntax error in send element content:" << std::endl << e << std::endl;
@@ -1088,10 +1051,12 @@ void Interpreter::executeContent(const Arabica::DOM::Node<std::string>& content,
// --- ASSIGN --------------------------
if (_dataModel && HAS_ATTR(content, "location") && HAS_ATTR(content, "expr")) {
try {
- if (!_dataModel.isDefined(ATTR(content, "location"))) {
+ if (!_dataModel.isDeclared(ATTR(content, "location"))) {
// test 286
LOG(ERROR) << "Assigning to undeclared location '" << ATTR(content, "location") << "' not allowed." << std::endl;
- _internalQueue.push_back(Event("error.execution"));
+ Event e("error.execution");
+ _internalQueue.push_back(e);
+ throw e;
return;
} else {
_dataModel.assign(ATTR(content, "location"), ATTR(content, "expr"));
@@ -1124,6 +1089,9 @@ void Interpreter::executeContent(const Arabica::DOM::Node<std::string>& content,
srcContent << _cachedURLs[scriptUrl.asString()];
} else {
srcContent << scriptUrl;
+ if (scriptUrl.downloadFailed()) {
+ LOG(ERROR) << "script element source cannot be downloaded";
+ }
_cachedURLs[scriptUrl.asString()] = scriptUrl;
}
diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h
index 9d21ab4..b48080a 100644
--- a/src/uscxml/Interpreter.h
+++ b/src/uscxml/Interpreter.h
@@ -282,6 +282,8 @@ protected:
void executeContent(const Arabica::DOM::NodeList<std::string>& content, bool rethrow = false);
void executeContent(const Arabica::XPath::NodeSet<std::string>& content, bool rethrow = false);
+ void processContentElement(const Arabica::DOM::Node<std::string>& element, Arabica::DOM::Document<std::string>& dom, std::string& text);
+
void send(const Arabica::DOM::Node<std::string>& element);
void invoke(const Arabica::DOM::Node<std::string>& element);
void cancelInvoke(const Arabica::DOM::Node<std::string>& element);
diff --git a/src/uscxml/URL.cpp b/src/uscxml/URL.cpp
index a31b0c4..b441bbf 100644
--- a/src/uscxml/URL.cpp
+++ b/src/uscxml/URL.cpp
@@ -500,6 +500,7 @@ void URLFetcher::perform() {
LOG(ERROR) << "Unhandled curl status";
case CURLM_BAD_HANDLE:
case CURLM_BAD_EASY_HANDLE:
+ case CURLE_FILE_COULDNT_READ_FILE:
case CURLM_OUT_OF_MEMORY:
case CURLM_INTERNAL_ERROR:
case CURLM_BAD_SOCKET:
diff --git a/src/uscxml/interpreter/InterpreterDraft6.cpp b/src/uscxml/interpreter/InterpreterDraft6.cpp
index 8682b8d..b53ba4e 100644
--- a/src/uscxml/interpreter/InterpreterDraft6.cpp
+++ b/src/uscxml/interpreter/InterpreterDraft6.cpp
@@ -64,7 +64,7 @@ void InterpreterDraft6::interpret() {
}
// executeGlobalScriptElements
- NodeSet<std::string> globalScriptElems = _xpath.evaluate("/" + _xpathPrefix + "script", _scxml).asNodeSet();
+ NodeSet<std::string> globalScriptElems = filterChildElements(_xmlNSPrefix + "script", _scxml);
for (unsigned int i = 0; i < globalScriptElems.size(); i++) {
if (_dataModel)
executeContent(globalScriptElems[i]);
@@ -303,11 +303,17 @@ void InterpreterDraft6::mainEventLoop() {
for (unsigned int j = 0; j < invokes.size(); j++) {
Arabica::DOM::Element<std::string> invokeElem = (Arabica::DOM::Element<std::string>)invokes[j];
std::string invokeId;
- if (HAS_ATTR(invokeElem, "id"))
+ if (HAS_ATTR(invokeElem, "id")) {
invokeId = ATTR(invokeElem, "id");
- if (HAS_ATTR(invokeElem, "idlocation") && _dataModel)
- invokeId = _dataModel.evalAsString(ATTR(invokeElem, "idlocation"));
-
+ } else {
+ if (HAS_ATTR(invokeElem, "idlocation") && _dataModel) {
+ try {
+ invokeId = _dataModel.evalAsString(ATTR(invokeElem, "idlocation"));
+ } catch(Event e) {
+ LOG(ERROR) << "Syntax error while assigning idlocation from invoke:" << std::endl << e << std::endl;
+ }
+ }
+ }
std::string autoForward = invokeElem.getAttribute("autoforward");
if (boost::iequals(invokeId, _currEvent.invokeid)) {
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
index 0663db4..affd641 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
@@ -57,14 +57,13 @@ boost::shared_ptr<DataModelImpl> V8DataModel::create(Interpreter* interpreter) {
docObj->SetInternalField(0, Arabica::DOM::V8DOM::toExternal(privData));
context->Global()->Set(v8::String::New("document"), docObj);
+ context->Global()->Set(v8::String::New("_sessionid"), v8::String::New(interpreter->getSessionId().c_str()), v8::ReadOnly);
+ context->Global()->Set(v8::String::New("_name"), v8::String::New(interpreter->getName().c_str()), v8::ReadOnly);
+ context->Global()->Set(v8::String::New("_ioprocessors"), v8::Object::New(), v8::ReadOnly);
dm->_contexts.push_back(context);
// instantiate objects - we have to have a context for that!
-
- dm->setName(interpreter->getName());
- dm->setSessionId(interpreter->getSessionId());
- dm->eval("_ioprocessors = {};");
dm->eval("_invokers = {};");
dm->eval("_x = {};");
@@ -72,17 +71,12 @@ boost::shared_ptr<DataModelImpl> V8DataModel::create(Interpreter* interpreter) {
}
void V8DataModel::registerIOProcessor(const std::string& name, const IOProcessor& ioprocessor) {
- assign("_ioprocessors['" + name + "']", ioprocessor.getDataModelVariables());
-}
-
-void V8DataModel::setSessionId(const std::string& sessionId) {
- _sessionId = sessionId;
- assign("_sessionId", "'" + sessionId + "'");
-}
-
-void V8DataModel::setName(const std::string& name) {
- _name = name;
- assign("_name", "'" + name + "'");
+ v8::Locker locker;
+ v8::HandleScope handleScope;
+ v8::Context::Scope contextScope(_contexts.front());
+ v8::Handle<v8::Object> global = _contexts.front()->Global();
+ v8::Handle<v8::Object> ioProcessors = global->Get(v8::String::New("_ioprocessors"))->ToObject();
+ ioProcessors->Set(v8::String::New(name.c_str()),getDataAsValue(ioprocessor.getDataModelVariables()));
}
V8DataModel::~V8DataModel() {
@@ -285,12 +279,28 @@ void V8DataModel::eval(const std::string& expr) {
evalAsValue(expr);
}
-bool V8DataModel::isDefined(const std::string& expr) {
+bool V8DataModel::isDeclared(const std::string& expr) {
+ /**
+ * Undeclared variables can be checked by trying to access them and catching
+ * a reference error.
+ */
+
v8::Locker locker;
v8::HandleScope handleScope;
v8::Context::Scope contextScope(_contexts.back());
- v8::Handle<v8::Value> result = evalAsValue(expr);
- return !result->IsUndefined();
+
+ v8::TryCatch tryCatch;
+ v8::Handle<v8::String> source = v8::String::New(expr.c_str());
+ v8::Handle<v8::Script> script = v8::Script::Compile(source);
+
+ v8::Handle<v8::Value> result;
+ if (!script.IsEmpty())
+ result = script->Run();
+
+ if (result.IsEmpty())
+ return false;
+
+ return true;
}
bool V8DataModel::evalAsBool(const std::string& expr) {
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h
index a9db5ca..441297d 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.h
@@ -31,8 +31,6 @@ public:
}
virtual void initialize();
- virtual void setSessionId(const std::string& sessionId);
- virtual void setName(const std::string& name);
virtual void setEvent(const Event& event);
virtual void registerIOProcessor(const std::string& name, const IOProcessor& ioprocessor);
@@ -49,7 +47,7 @@ public:
virtual Data getStringAsData(const std::string& content);
virtual Data getValueAsData(const v8::Handle<v8::Value>& value);
- virtual bool isDefined(const std::string& expr);
+ virtual bool isDeclared(const std::string& expr);
virtual std::string evalAsString(const std::string& expr);
virtual bool evalAsBool(const std::string& expr);
diff --git a/test/samples/w3c/tests/test144.scxml b/test/samples/w3c/tests/test144.scxml
new file mode 100644
index 0000000..fcec83a
--- /dev/null
+++ b/test/samples/w3c/tests/test144.scxml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that events are inserted into the queue in the order in which they are raised. If
+foo occurs before bar, success, otherwise failure --><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>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition event="foo" target="s1"/>
+ <transition event="*" target="fail"/>
+
+ </state>
+
+<state id="s1">
+ <transition event="bar" 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/samples/w3c/tests/test147.scxml b/test/samples/w3c/tests/test147.scxml
new file mode 100644
index 0000000..f877ecf
--- /dev/null
+++ b/test/samples/w3c/tests/test147.scxml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the first clause that evaluates to true - and only that clause - is executed.
+Only one event should be raised, and it should be bar --><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>
+ <if cond="false">
+ <raise event="foo"/>
+ <assign location="Var1" expr="Var1 + 1"/>
+ <elseif cond="true"/>
+ <raise event="bar"/>
+ <assign location="Var1" expr="Var1 + 1"/>
+ <else/>
+ <raise event="baz"/>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </if>
+ <raise event="bat"/>
+ </onentry>
+ <transition event="bar" cond="Var1==1" 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/samples/w3c/tests/test148.scxml b/test/samples/w3c/tests/test148.scxml
new file mode 100644
index 0000000..acebba7
--- /dev/null
+++ b/test/samples/w3c/tests/test148.scxml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the else clause executes if <if> and <elseif> evaluate to false.
+Baz should be the only event generated by the <if>. bat is raised to catch the case where the <else> clause
+fails and baz is not generated, i.e. it makes sure that the test doesn't hang. --><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>
+ <if cond="false">
+ <raise event="foo"/>
+ <assign location="Var1" expr="Var1 + 1"/>
+ <elseif cond="false"/>
+ <raise event="bar"/>
+ <assign location="Var1" expr="Var1 + 1"/>
+ <else/>
+ <raise event="baz"/>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </if>
+ <raise event="bat"/>
+ </onentry>
+ <transition event="baz" cond="Var1==1" 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/samples/w3c/tests/test149.scxml b/test/samples/w3c/tests/test149.scxml
new file mode 100644
index 0000000..b7626c6
--- /dev/null
+++ b/test/samples/w3c/tests/test149.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that neither if clause executes, so that bat is the only event raised. --><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>
+ <if cond="false">
+ <raise event="foo"/>
+ <assign location="Var1" expr="Var1 + 1"/>
+ <elseif cond="false"/>
+ <raise event="bar"/>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </if>
+ <raise event="bat"/>
+ </onentry>
+ <transition event="bat" cond="Var1==0" 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/samples/w3c/tests/test150.scxml b/test/samples/w3c/tests/test150.scxml
new file mode 100644
index 0000000..41e1895
--- /dev/null
+++ b/test/samples/w3c/tests/test150.scxml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that foreach causes a new variable to be declared if 'item' doesn't already exist. Also
+test that it will use an existing var if it does exist. --><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"/>
+ <data id="Var2"/>
+ <data id="Var3">
+ [1,2,3]
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+<!-- first use declared variables -->
+ <foreach item="Var1" index="Var2" array="Var3"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error" target="fail"/>
+ <transition event="*" target="s1"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+<!-- now use undeclared variables -->
+ <foreach item="Var4" index="Var5" array="Var3"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition event="error" target="fail"/>
+ <transition event="*" target="s2"/>
+ </state>
+
+<state id="s2">
+ <!-- check that var4 is bound -->
+ <transition cond="Var4" 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/samples/w3c/tests/test151.scxml b/test/samples/w3c/tests/test151.scxml
new file mode 100644
index 0000000..119bb65
--- /dev/null
+++ b/test/samples/w3c/tests/test151.scxml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that foreach causes a new variable to be declared if 'item' doesn't already exist. Also
+test that it will use an existing var if it does exist. --><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"/>
+ <data id="Var2"/>
+ <data id="Var3">
+ [1,2,3]
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+<!-- first use declared variables -->
+ <foreach item="Var1" index="Var2" array="Var3"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error" target="fail"/>
+ <transition event="*" target="s1"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+<!-- now use undeclared variables -->
+ <foreach item="Var4" index="Var5" array="Var3"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition event="error" target="fail"/>
+ <transition event="*" target="s2"/>
+ </state>
+
+<state id="s2">
+ <!-- check that var5 is bound -->
+ <transition cond="Var5" 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/samples/w3c/tests/test152.scxml b/test/samples/w3c/tests/test152.scxml
new file mode 100644
index 0000000..8af51a8
--- /dev/null
+++ b/test/samples/w3c/tests/test152.scxml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that an illegal array or item value causes error.execution and results in executable content
+not being executed. --><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">
+ [1,2,3]
+ </data>
+ </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="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/samples/w3c/tests/test153.scxml b/test/samples/w3c/tests/test153.scxml
new file mode 100644
index 0000000..c904232
--- /dev/null
+++ b/test/samples/w3c/tests/test153.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 --><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">
+ [1,2,3]
+ </data>
+ <data id="Var4" expr="1"/> <!-- 1 if success, 0 if failure -->
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <foreach item="Var2" array="Var3">
+ <if cond="Var1 &lt;Var2">
+ <assign location="Var1" expr="Var2"/>
+ <else/>
+ <!-- values are out of order, record failure -->
+ <assign location="Var4" expr="0"/>
+ </if>
+ </foreach>
+ </onentry>
+
+ <!-- check that var1 has its original value -->
+ <transition cond="Var4==0" 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/samples/w3c/tests/test155.scxml b/test/samples/w3c/tests/test155.scxml
new file mode 100644
index 0000000..17d3a70
--- /dev/null
+++ b/test/samples/w3c/tests/test155.scxml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that foreach executes the executable content once for each item in the list '(1,2,3)'. The executable
+content sums the items into var1 so it should be 6 at the end --><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"/>
+ <data id="Var2"/>
+ <data id="Var3">
+ [1,2,3]
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <foreach item="Var2" array="Var3">
+ <assign location="Var1" expr="Var1 + Var2"/>
+ </foreach>
+ </onentry>
+
+ <transition cond="Var1==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> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test156.scxml b/test/samples/w3c/tests/test156.scxml
new file mode 100644
index 0000000..aa9e2b0
--- /dev/null
+++ b/test/samples/w3c/tests/test156.scxml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that an error causes the foreach to stop execution. The second piece of executable content
+should cause an error, so var1 should be incremented only once --><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"/>
+ <data id="Var2"/>
+ <data id="Var3">
+ [1,2,3]
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <foreach item="Var2" array="Var3">
+ <assign location="Var1" expr="Var1 + 1"/>
+ <!-- assign an illegal value to a non-existent var -->
+ <assign location="Var5" expr="return"/>
+ </foreach>
+ </onentry>
+
+ <transition cond="Var1==1" 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/samples/w3c/tests/test158.scxml b/test/samples/w3c/tests/test158.scxml
new file mode 100644
index 0000000..f1a583f
--- /dev/null
+++ b/test/samples/w3c/tests/test158.scxml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that executable content executes in document order. if event1 occurs then event2, succeed, otherwise fail --><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"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <raise event="event1"/>
+ <raise event="event2"/>
+ </onentry>
+ <transition event="event1" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition event="event2" 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/samples/w3c/tests/test159.scxml b/test/samples/w3c/tests/test159.scxml
new file mode 100644
index 0000000..d144855
--- /dev/null
+++ b/test/samples/w3c/tests/test159.scxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that any error raised by an element of executable content causes all subsequent elements to be skipped.
+The send tag will raise an error so var1 should not be incremented. If it is fail, otherwise succeed --><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"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="thisWillFail" conf:illegaltarget=""/>
+ <conf:incrementId id="1"/>
+ </onentry>
+ <transition cond="Var1==1" 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/samples/w3c/tests/test172.scxml b/test/samples/w3c/tests/test172.scxml
new file mode 100644
index 0000000..28f2bcb
--- /dev/null
+++ b/test/samples/w3c/tests/test172.scxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that eventexpr uses the current value of var1, not its initial value --><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="'event1'"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="Var1" expr="'event2'"/>
+ <send eventexpr="Var1"/>
+ </onentry>
+
+ <transition event="event2" 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/samples/w3c/tests/test173.scxml b/test/samples/w3c/tests/test173.scxml
new file mode 100644
index 0000000..fa2a289
--- /dev/null
+++ b/test/samples/w3c/tests/test173.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that targetexpr uses the current value of var1, not its initial value
+(If it uses the initial value, it will generate an error. If it uses the current value, event1 will be raised --><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="27"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="Var1" expr="'#_internal'"/>
+ <send targetexpr="Var1" event="event1"/>
+ </onentry>
+
+ <transition event="event1" 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/samples/w3c/tests/test174.scxml b/test/samples/w3c/tests/test174.scxml
new file mode 100644
index 0000000..f78feee
--- /dev/null
+++ b/test/samples/w3c/tests/test174.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that typeexpr uses the current value of var1, not its initial value
+(If it uses the initial value, it will generate an error. If it uses the current value, event1 will be raised --><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="27"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="Var1" expr="'http://www.w3.org/TR/scxml/#SCXMLEventProcessor'"/>
+ <send typeexpr="Var1" event="event1"/>
+ </onentry>
+
+ <transition event="event1" 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/samples/w3c/tests/test175.scxml b/test/samples/w3c/tests/test175.scxml
new file mode 100644
index 0000000..4876821
--- /dev/null
+++ b/test/samples/w3c/tests/test175.scxml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that delayexpr uses the current value of var1, not its initial value
+(If it uses the initial value, event2 will be generated first, before event1. If it uses the current value,
+event1 will be raised first. Succeed if event1 occurs before event2, otherwise fail --><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="'0s'"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="Var1" expr="'3s'"/>
+ <send delayexpr="Var1" event="event2"/>
+ <send delay="1s" event="event1"/>
+ </onentry>
+
+ <transition event="event1" target="s1"/>
+ <transition event="event2" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition event="event2" 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/samples/w3c/tests/test176.scxml b/test/samples/w3c/tests/test176.scxml
new file mode 100644
index 0000000..4b120ec
--- /dev/null
+++ b/test/samples/w3c/tests/test176.scxml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that <param> uses the current value of var1, not its initial value. If the value of
+aParam in event1 is 2 so that var2 gets set to 2, success, otherwise failure --><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="1"/>
+ <data id="Var2"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="Var1" expr="2"/>
+ <send event="event1">
+ <param name="aParam" expr="Var1"/>
+ </send>
+ </onentry>
+
+ <transition event="event1" target="s1">
+ <assign location="Var2" expr="_event.data.aParam"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition cond="Var2==2" 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/samples/w3c/tests/test178.scxml b/test/samples/w3c/tests/test178.scxml
new file mode 100644
index 0000000..91b4681
--- /dev/null
+++ b/test/samples/w3c/tests/test178.scxml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that multiple key/value pairs are included, even when the keys are the same.
+This is a manual test. The tester must look at the log output and verify that both
+keys are there. (This test uses the SCXML Event I/O processor, which is the only
+one that all platforms must support. It does not specify the message format, so
+we cannot test _event.raw directly. Therefore we print it out for visual
+inspection.) --><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="event1">
+ <param name="Var1" expr="2"/>
+ <param name="Var1" expr="3"/>
+ </send>
+ </onentry>
+
+ <transition event="event1" target="final">
+ <log label="_event " expr="_event.raw"/>
+ </transition>
+ <transition event="*" target="fail"/>
+
+ </state>
+
+
+<final id="final"/>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test179.scxml b/test/samples/w3c/tests/test179.scxml
new file mode 100644
index 0000000..170b105
--- /dev/null
+++ b/test/samples/w3c/tests/test179.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that <content> can be used to populate body of a message --><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="event1">
+ <content>123</content>
+ </send>
+ </onentry>
+
+ <transition event="event1" cond="_event.data === '123'" 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/samples/w3c/tests/test183.scxml b/test/samples/w3c/tests/test183.scxml
new file mode 100644
index 0000000..2c17ea8
--- /dev/null
+++ b/test/samples/w3c/tests/test183.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that <send> stores the value of the sendid in idlocation. If it does,
+var1 has a value and we pass. Otherwise we fail --><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"/>
+
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="event1" idlocation="Var1"/>
+ </onentry>
+
+ <transition cond="Var1" 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/samples/w3c/tests/test185.scxml b/test/samples/w3c/tests/test185.scxml
new file mode 100644
index 0000000..cdf8a77
--- /dev/null
+++ b/test/samples/w3c/tests/test185.scxml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that <send> respects the delay specification. If it does, event1 arrives before event2
+ and we pass. Otherwise we fail --><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="event2" delay="2s"/>
+ <send event="event1"/>
+ </onentry>
+
+ <transition event="event1" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition event="event2" 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/samples/w3c/tests/test186.scxml b/test/samples/w3c/tests/test186.scxml
new file mode 100644
index 0000000..20f0063
--- /dev/null
+++ b/test/samples/w3c/tests/test186.scxml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that <send> evals its args when it is evaluated, not when the delay interval expires and the
+message is actually sent. If it does, aParam will have the value of 1 (even though var1 has been incremented
+in the interval.) If var2 ends up == 1, we pass. Otherwise we fail --><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="1"/>
+ <data id="Var2"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="event1" delay="2s">
+ <param name="aParam" expr="Var1"/>
+ </send>
+ <assign location="Var1" expr="2"/>
+ </onentry>
+
+ <transition event="event1" target="s1">
+ <assign location="Var2" expr="_event.data.aParam"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition cond="Var2==1" 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/samples/w3c/tests/test187.scxml b/test/samples/w3c/tests/test187.scxml
new file mode 100644
index 0000000..d03c16d
--- /dev/null
+++ b/test/samples/w3c/tests/test187.scxml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that delayed <send> is not sent if the sending session terminates. In this case,
+a subscript is invoked which sends the event childToParent delayed by 1 second, and then terminates. The
+parent session, should not receive childToParent. If it does, we fail. Otherwise the
+10 sec timer expires and we pass --><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="timeout" delay="10s"/>
+ </onentry>
+ <invoke type="scxml">
+ <content>
+ <!-- exit before the delayed send can execute -->
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
+ <onentry>
+ <send event="childToParent" target="#_parent" delay="1s"/>
+ </onentry>
+ <transition target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="childToParent" 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/samples/w3c/tests/test194.scxml b/test/samples/w3c/tests/test194.scxml
new file mode 100644
index 0000000..e7dcd76
--- /dev/null
+++ b/test/samples/w3c/tests/test194.scxml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that specifying an illegal target for <send> causes the event error.execution to be raised. If it does,
+we succeed. Otherwise we eventually timeout and fail. --><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>
+ <!-- should cause an error -->
+ <send target="baz" event="event2"/>
+ <!-- this will get added to the external event queue after the error has been raised -->
+ <send event="timeout"/>
+ </onentry>
+
+ <!-- once we've entered the state, we should check for internal events first -->
+ <transition event="error.execution" 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/samples/w3c/tests/test198.scxml b/test/samples/w3c/tests/test198.scxml
new file mode 100644
index 0000000..e804625
--- /dev/null
+++ b/test/samples/w3c/tests/test198.scxml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that if type is not provided <send> uses the scxml event i/o processor. The only way to tell
+what processor was used is to look at the origintype of the resulting 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="event1"/>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="event1" cond=" _event.origintype == 'http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" 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/samples/w3c/tests/test199.scxml b/test/samples/w3c/tests/test199.scxml
new file mode 100644
index 0000000..2119cd8
--- /dev/null
+++ b/test/samples/w3c/tests/test199.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that using an invalid send type results in error.execution --><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 type="27" event="event1"/>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="error.execution" 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/samples/w3c/tests/test200.scxml b/test/samples/w3c/tests/test200.scxml
new file mode 100644
index 0000000..2aa85a9
--- /dev/null
+++ b/test/samples/w3c/tests/test200.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that the processor supports the scxml event i/o processor --><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">
+
+<state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event1"/>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="event1" 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/samples/w3c/tests/test201.scxml b/test/samples/w3c/tests/test201.scxml
new file mode 100644
index 0000000..6460bbb
--- /dev/null
+++ b/test/samples/w3c/tests/test201.scxml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that the processor supports the basic http event i/o processor. This is an optional
+test since platforms are not required to support basic http event i/o --><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 type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" event="event1"/>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="event1" 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/samples/w3c/tests/test205.scxml b/test/samples/w3c/tests/test205.scxml
new file mode 100644
index 0000000..5adefbe
--- /dev/null
+++ b/test/samples/w3c/tests/test205.scxml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that the processor doesn't change the message. We can't test that it never does this, but
+at least we can check that the event name and included data are the same as we sent. --><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"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="event1">
+ <param name="aParam" expr="1"/>
+ </send>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="event1" target="s1">
+ <assign location="Var1" expr="_event.data.aParam"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition cond="Var1==1" 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/samples/w3c/tests/test207.scxml b/test/samples/w3c/tests/test207.scxml
new file mode 100644
index 0000000..aa5786a
--- /dev/null
+++ b/test/samples/w3c/tests/test207.scxml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that that we can't cancel an event in another session. We invoke a child process. It notifies
+us when it has generated a delayed event with sendid foo. We try to cancel foo. The child process sends us event
+ event success if the event is not cancelled, event fail otherwise. This doesn't test that there is absolutely no way to cancel an event
+raised in another session, but the spec doesn't define any way to refer to an event in another process --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="10s"/>
+ </onentry>
+ <invoke type="scxml">
+ <content>
+ <!-- when invoked, we raise a delayed event1 with sendid 'foo' and notify our parent. Then we wait.
+ If event1 occurs, the parent hasn't succeeded in canceling it and we return pass. If event2 occurs
+ it means event1 was canceled (because event2 is delayed longer than event1) and we return 'fail'. -->
+
+
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
+ <onentry>
+ <send event="event1" id="foo" delay="3s"/>
+ <send event="event2" delay="5s"/>
+ <send target="#_parent" event="childToParent"/>
+ </onentry>
+
+ <transition event="event1" target="subFinal">
+ <send target="#_parent" event="pass"/>
+ </transition>
+ <transition event="*" target="subFinal">
+ <send target="#_parent" event="fail"/>
+ </transition>
+
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <state id="s01">
+ <transition event="childToParent" target="s02">
+ <cancel sendid="foo"/>
+ </transition>
+ </state>
+
+ <state id="s02">
+ <transition event="pass" target="pass"/>
+ <transition event="fail" target="fail"/>
+ <transition event="timeout" target="fail"/>
+ </state>
+
+</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/samples/w3c/tests/test208.scxml b/test/samples/w3c/tests/test208.scxml
new file mode 100644
index 0000000..6faa9c1
--- /dev/null
+++ b/test/samples/w3c/tests/test208.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that cancel works. We cancel delayed event1. If cancel works, we get event2 first and pass. If
+we get event1 or an error first, cancel didn't work and we fail. --><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 id="foo" event="event1" delay="1s"/>
+ <send event="event2" delay="5s"/>
+ <cancel sendid="foo"/>
+ </onentry>
+
+ <transition event="event2" 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/samples/w3c/tests/test210.scxml b/test/samples/w3c/tests/test210.scxml
new file mode 100644
index 0000000..e29b65d
--- /dev/null
+++ b/test/samples/w3c/tests/test210.scxml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that sendidexpr works with cancel. If it takes the most recent value of var1, it should cancel
+delayed event1. Thus we get event2 first and pass. If we get event1 or an error first, cancel didn't work and we fail. --><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="'bar'"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send id="foo" event="event1" delay="1s"/>
+ <send event="event2" delay="5s"/>
+ <assign location="Var1" expr="'foo'"/>
+ <cancel sendidexpr="Var1"/>
+ </onentry>
+
+ <transition event="event2" 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/samples/w3c/tests/test215.scxml b/test/samples/w3c/tests/test215.scxml
new file mode 100644
index 0000000..97e6a39
--- /dev/null
+++ b/test/samples/w3c/tests/test215.scxml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that typexpr is evaluated at runtime. If the original value of var1 is used, the invocation
+will fail (test215sub1.scxml is not of type 'foo', even if the platform supports foo as a type). If
+the runtime value is used, the invocation will succeed --><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="'foo'"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ <assign location="Var1" expr="'http://www.w3.org/TR/scxml/'"/>
+ </onentry>
+ <invoke typeexpr="Var1">
+ <content>
+ <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+ <scxml initial="subFinal" datamodel="ecmascript" version="1.0">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="done.invoke" 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/samples/w3c/tests/test216.scxml b/test/samples/w3c/tests/test216.scxml
new file mode 100644
index 0000000..97b2a77
--- /dev/null
+++ b/test/samples/w3c/tests/test216.scxml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that srcexpr is evaluated at runtime. If the original value of var1 is used, the invocation
+will fail (assuming that there is no script named 'foo'). If
+the runtime value is used, the invocation will succeed --><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="'foo'"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ <assign location="Var1" expr="'file:test216sub1.scxml'"/>
+ </onentry>
+ <invoke srcexpr="Var1" type="http://www.w3.org/TR/scxml"/>
+ <transition event="done.invoke" 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/samples/w3c/tests/test216sub1.scxml b/test/samples/w3c/tests/test216sub1.scxml
new file mode 100644
index 0000000..3c3a88d
--- /dev/null
+++ b/test/samples/w3c/tests/test216sub1.scxml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="final" version="1.0" datamodel="ecmascript">
+
+<final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test220.scxml b/test/samples/w3c/tests/test220.scxml
new file mode 100644
index 0000000..2d447c4
--- /dev/null
+++ b/test/samples/w3c/tests/test220.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that the scxml type is supported. --><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="timeout" delay="5s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+ <scxml initial="subFinal" version="1.0" datamodel="ecmascript">
+ <final id="subFinal"/>
+ </scxml></content>
+ </invoke>
+ <transition event="done.invoke" 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/samples/w3c/tests/test223.scxml b/test/samples/w3c/tests/test223.scxml
new file mode 100644
index 0000000..63ceadd
--- /dev/null
+++ b/test/samples/w3c/tests/test223.scxml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that idlocation is supported. --><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"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" idlocation="Var1">
+ <content>
+ <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+ <scxml initial="subFinal" version="1.0" datamodel="ecmascript">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+ <transition cond="Var1" 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/samples/w3c/tests/test224.scxml b/test/samples/w3c/tests/test224.scxml
new file mode 100644
index 0000000..585d014
--- /dev/null
+++ b/test/samples/w3c/tests/test224.scxml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that the automatically generated id has the form stateid.platformid. --><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"/>
+ <data id="Var2" expr="'s0.'"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" idlocation="Var1">
+ <content>
+ <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+ <scxml version="1.0" initial="subFinal" datamodel="ecmascript">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+ <transition cond="(function(str, starts){if (starts === '') return true;if (str == null || starts == null) return false;str = String(str); starts = String(starts);return str.length &gt;= starts.length &amp;&amp; str.slice(0, starts.length) === starts;})(Var1, Var2)" target="pass"/>
+ <transition target="fail">
+ <log expr="Var1"/>
+ </transition>
+ </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/samples/w3c/tests/test225.scxml b/test/samples/w3c/tests/test225.scxml
new file mode 100644
index 0000000..467d1ba
--- /dev/null
+++ b/test/samples/w3c/tests/test225.scxml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that the automatically generated id is unique, we call invoke twice and compare the ids. --><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"/>
+ <data id="Var2"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" idlocation="Var1">
+ <content>
+ <scxml initial="subFinal1" version="1.0" datamodel="ecmascript">
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <invoke type="http://www.w3.org/TR/scxml/" idlocation="Var2">
+ <content>
+ <scxml initial="subFinal2" version="1.0" datamodel="ecmascript">
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+ <transition cond="Var1===Var2" 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/samples/w3c/tests/test226.scxml b/test/samples/w3c/tests/test226.scxml
new file mode 100644
index 0000000..e1c6d3f
--- /dev/null
+++ b/test/samples/w3c/tests/test226.scxml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- this is basically just a test that invoke works correctly and that you can pass data
+to the invoked process. If the invoked session finds aParam==1, it exits, signalling
+success. otherwise it will hang and the timeout in this doc signifies failure. --><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="timeout" delay="3s"/>
+ </onentry>
+
+
+ <invoke type="http://www.w3.org/TR/scxml/" src="file:test226sub1.scxml">
+ <param name="Var1" expr="1"/>
+ </invoke>
+
+ <transition event="varBound" 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/samples/w3c/tests/test226sub1.scxml b/test/samples/w3c/tests/test226sub1.scxml
new file mode 100644
index 0000000..809efb0
--- /dev/null
+++ b/test/samples/w3c/tests/test226sub1.scxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- when invoked, if var1 has a value notify parent. Then terminate. --><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"/>
+ </datamodel>
+
+<state id="s0">
+ <transition cond="Var1" target="final">
+ <send target="#_parent" event="varBound"/>
+ </transition>
+ <transition target="final"/>
+ </state>
+
+<final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test228.scxml b/test/samples/w3c/tests/test228.scxml
new file mode 100644
index 0000000..b44de56
--- /dev/null
+++ b/test/samples/w3c/tests/test228.scxml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the invokeid is included in events returned from the invoked process. --><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"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" id="foo">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="ecmascript">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="done.invoke" target="s1">
+ <assign location="Var1" expr="_event.invokeid"/>
+ </transition>
+ <transition event="*" target="fail"/>
+</state>
+
+<state id="s1">
+ <transition cond="Var1=='foo'" 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/samples/w3c/tests/test229.scxml b/test/samples/w3c/tests/test229.scxml
new file mode 100644
index 0000000..e3aeecb
--- /dev/null
+++ b/test/samples/w3c/tests/test229.scxml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that autofoward works. If the child process receives back a copy of the
+childToParent event that it sends to this doc, it sends eventReceived, signalling success. (Note
+that this doc is not required to process that event explicitly. It should be forwarded in any case.) Otherwise
+it eventually times out and the done.invoke signals failure --><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="timeout" delay="3s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" autoforward="true">
+ <content>
+ <!-- when invoked, send childToParent to parent.
+ If it is forwarded back to us, send
+ eventReceived to signal success and terminate.
+ Otherwise wait for timer to expire and terminate. -->
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
+ <onentry>
+ <send target="#_parent" event="childToParent"/>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <transition event="childToParent" target="subFinal">
+ <send target="#_parent" event="eventReceived"/>
+ </transition>
+ <transition event="*" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="childToParent"/>
+ <transition event="eventReceived" 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/samples/w3c/tests/test230.scxml b/test/samples/w3c/tests/test230.scxml
new file mode 100644
index 0000000..ae13476
--- /dev/null
+++ b/test/samples/w3c/tests/test230.scxml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- a manual test that an autofowarded event has the same fields and values as the original event.
+the child process sends the parent process an event which is forwarded back to it.
+Both the parent and child process print out the contents of the event. The tester
+must check if they are the same and report his result. --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" autoforward="true">
+ <content>
+ <!-- when invoked, send childToParent to parent. If it is forwarded back to us, print out its
+ fields and terminate. -->
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
+ <onentry>
+ <send target="#_parent" event="childToParent"/>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="childToParent" target="subFinal">
+ <log label="name is " expr="_event.name"/>
+ <log label="type is " expr="_event.type"/>
+ <log label="sendid is " expr="_event.sendid"/>
+ <log label="origin is " expr="_event.origin"/>
+ <log label="origintype is " expr="_event.origintype"/>
+ <log label="invokeid is " expr="_event.invokeid"/>
+ <log label="data is " expr="_event.data"/>
+ </transition>
+ <transition event="*" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="timeout" target="final"/>
+
+
+ <state id="s01">
+ <transition event="childToParent" target="s02">
+ <log label="name is " expr="_event.name"/>
+ <log label="type is " expr="_event.type"/>
+ <log label="sendid is " expr="_event.sendid"/>
+ <log label="origin is " expr="_event.origin"/>
+ <log label="origintype is " expr="_event.origintype"/>
+ <log label="invokeid is " expr="_event.invokeid"/>
+ <log label="data is " expr="_event.data"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s02">
+ <!-- wait till we get the done event to ensure that the child process has time to print out its results -->
+ <transition event="done.invoke" target="final"/>
+ </state>
+
+</state>
+
+<final id="final"/>
+<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test232.scxml b/test/samples/w3c/tests/test232.scxml
new file mode 100644
index 0000000..9515e15
--- /dev/null
+++ b/test/samples/w3c/tests/test232.scxml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a parent process can receive multiple events from a child process --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="ecmascript">
+ <final id="subFinal">
+ <onentry>
+ <send target="#_parent" event="childToParent1"/>
+ <send target="#_parent" event="childToParent2"/>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="timeout" target="fail"/>
+
+
+ <state id="s01">
+ <transition event="childToParent1" target="s02"/>
+ </state>
+
+ <state id="s02">
+ <transition event="childToParent2" target="s03"/>
+ </state>
+
+<state id="s03">
+ <transition event="done.invoke" target="pass"/>
+ </state>
+
+</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/samples/w3c/tests/test233.scxml b/test/samples/w3c/tests/test233.scxml
new file mode 100644
index 0000000..3900d28
--- /dev/null
+++ b/test/samples/w3c/tests/test233.scxml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that finalize markup runs before the event is processed. The invoked process will
+return 2 in _event.data.aParam, so that new value should be in force when we select
+the transtitions. --><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="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="ecmascript">
+ <final id="subFinal">
+ <onentry>
+ <send target="#_parent" event="childToParent">
+ <param name="aParam" expr="2"/>
+ </send>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ <finalize>
+ <assign location="Var1" expr="_event.data.aParam"/>
+ </finalize>
+ </invoke>
+
+ <transition event="childToParent" cond="" 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/samples/w3c/tests/test234.scxml b/test/samples/w3c/tests/test234.scxml
new file mode 100644
index 0000000..b874fe9
--- /dev/null
+++ b/test/samples/w3c/tests/test234.scxml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that only finalize markup in the invoking state runs. the first invoked process will
+return 2 in _event.data.aParam, while second invoked process sleeps without returning any events.
+Only the first finalize should execute. So when we get to s1 var1 should have value 2 but
+var2 should still be set to 1 --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="p0" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="1"/>
+ <data id="Var2" expr="1"/>
+ </datamodel>
+<parallel id="p0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <state id="p01">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml version="1.0" initial="subFinal1" datamodel="ecmascript">
+ <final id="subFinal1">
+ <onentry>
+ <send target="#_parent" event="childToParent">
+ <param name="aParam" expr="2"/>
+ </send>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ <finalize>
+ <assign location="Var1" expr="_event.data.aParam"/>
+ </finalize>
+ </invoke>
+
+ <transition event="childToParent" cond="Var1==2" target="s1"/>
+ <transition event="childToParent" target="fail"/>
+ </state>
+
+ <state id="p02">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml version="1.0" initial="sub0" datamodel="ecmascript">
+ <state id="sub0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="subFinal2"/>
+ </state>
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ <finalize>
+ <assign location="Var2" expr="_event.data.aParam"/>
+ </finalize>
+ </invoke>
+ </state>
+
+</parallel>
+
+
+<state id="s1">
+ <transition cond="Var2==1" 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/samples/w3c/tests/test235.scxml b/test/samples/w3c/tests/test235.scxml
new file mode 100644
index 0000000..17d0cf0
--- /dev/null
+++ b/test/samples/w3c/tests/test235.scxml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that done.invoke.id event has the right id. the invoked child terminates immediately
+and should generate done.invoke.foo --><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="timeout" delay="2s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" id="foo">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="ecmascript">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="done.invoke.foo" 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/samples/w3c/tests/test236.scxml b/test/samples/w3c/tests/test236.scxml
new file mode 100644
index 0000000..700c6f8
--- /dev/null
+++ b/test/samples/w3c/tests/test236.scxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that done.invoke.id event is the last event we receive. the invoked process sends childToParent
+in the exit handler of its final state. We should get it before the done.invoke, and we should get no
+events after the done.invoke. Hence timeout indicates success --><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="timeout" delay="2s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="ecmascript">
+ <final id="subFinal">
+ <onexit>
+ <send target="#_parent" event="childToParent"/>
+ </onexit>
+ </final>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="childToParent" target="s1"/>
+ <transition event="done.invoke" target="fail"/>
+</state>
+
+<state id="s1">
+ <!-- here we should get done.invoke -->
+ <transition event="done.invoke" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s2">
+ <transition event="timeout" 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/samples/w3c/tests/test237.scxml b/test/samples/w3c/tests/test237.scxml
new file mode 100644
index 0000000..b23811d
--- /dev/null
+++ b/test/samples/w3c/tests/test237.scxml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that cancelling works. invoked child sleeps for two seconds, then terminates. We
+sleep for 1 sec in s0, then move to s1. This should cause the invocation to get cancelled.
+If we receive done.invoke, the invocation wasn't cancelled, and we fail. If we receive no events by
+the time timeout2 fires, success --><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="timeout1" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <!-- when invoked, sleep for 2 secs then terminate. Parent will try to cancel this session -->
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="timeout1" target="s1"/>
+
+</state>
+
+<state id="s1">
+ <onentry>
+ <send event="timeout2" delay="2s"/>
+ </onentry>
+ <!-- here we should NOT get done.invoke -->
+ <transition event="done.invoke" target="fail"/>
+ <transition event="*" 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/samples/w3c/tests/test239.scxml b/test/samples/w3c/tests/test239.scxml
new file mode 100644
index 0000000..4fcfc92
--- /dev/null
+++ b/test/samples/w3c/tests/test239.scxml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that markup can be specified both by 'src' and by <content> --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <state id="s01">
+ <invoke type="http://www.w3.org/TR/scxml/" src="file:test239sub1.scxml"/>
+ <transition event="done.invoke" target="s02"/>
+ </state>
+
+<state id="s02">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <!-- identical to test239sub1.scxml. -->
+ <content>
+ <scxml version="1.0" initial="final" datamodel="ecmascript">
+ <final id="final"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="done.invoke" target="pass"/>
+ </state>
+
+</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/samples/w3c/tests/test239sub1.scxml b/test/samples/w3c/tests/test239sub1.scxml
new file mode 100644
index 0000000..0f099d3
--- /dev/null
+++ b/test/samples/w3c/tests/test239sub1.scxml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- when invoked, just terminate. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="final" version="1.0" datamodel="ecmascript">
+
+ <final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test240.scxml b/test/samples/w3c/tests/test240.scxml
new file mode 100644
index 0000000..6d74d4c
--- /dev/null
+++ b/test/samples/w3c/tests/test240.scxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that datamodel values can be specified both by 'namelist' and by <param>.
+invoked child will return success if its Var1 is set to 1, failure otherwise. This
+test will fail schema validation because of the multiple occurences of Var1, but
+should run correctly. --><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="1"/>
+ </datamodel>
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <state id="s01">
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="Var1">
+ <content>
+ <scxml initial="sub01" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="sub01">
+ <transition cond="Var1===1" target="subFinal1">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal1">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" target="s02"/>
+ <transition event="failure" target="fail"/>
+ </state>
+
+<state id="s02">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param name="Var1" expr="1"/>
+ <content>
+ <scxml initial="sub02" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="sub02">
+ <transition cond="Var1==1" target="subFinal2">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal1">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" target="pass"/>
+ <transition event="failure" target="fail"/>
+ </state>
+
+</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/samples/w3c/tests/test241.scxml b/test/samples/w3c/tests/test241.scxml
new file mode 100644
index 0000000..af1471f
--- /dev/null
+++ b/test/samples/w3c/tests/test241.scxml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- The child process will return success ifits Var1 is set to 1, failure otherwise. For this test
+we try passing in Var1 by param and by namelist and check that we either get two successes
+or two failures. This test will fail schema validation due to multiple declarations of
+Var1, but should run correctly. --><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="1"/>
+ </datamodel>
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <state id="s01">
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="Var1">
+ <content>
+ <scxml initial="sub01" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="sub01">
+ <transition cond="Var1==1" target="subFinal1">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal1">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" target="s02"/>
+ <transition event="failure" target="s03"/>
+ </state>
+
+<state id="s02">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param name="Var1" expr="1"/>
+ <content>
+ <scxml initial="sub02" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="sub02">
+ <transition cond="Var1==1" target="subFinal2">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal2">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+ <!-- we got success in s01, so we need to do so here -->
+ <transition event="success" target="pass"/>
+ <transition event="failure" target="fail"/>
+ </state>
+
+<state id="s03">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param name="Var1" expr="1"/>
+ <content>
+ <scxml initial="sub03" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="sub03">
+ <transition cond="Var1==1" target="subFinal3">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal3">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+
+ <final id="subFinal3"/>
+ </scxml>
+ </content>
+ </invoke>
+ <!-- we got failure in s01, so we need to do so here -->
+ <transition event="failure" target="pass"/>
+ <transition event="success" target="fail"/>
+ </state>
+
+</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/samples/w3c/tests/test242.scxml b/test/samples/w3c/tests/test242.scxml
new file mode 100644
index 0000000..f0fa504
--- /dev/null
+++ b/test/samples/w3c/tests/test242.scxml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that markup specified by 'src' and by <content> is treated the same way. That means that
+either we get done.invoke in both cases or in neither case (in which case we timeout) --><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="timeout1" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <invoke type="http://www.w3.org/TR/scxml/" src="file:test242sub1.scxml"/>
+ <transition event="done.invoke" target="s02"/>
+ <transition event="timeout1" target="s03"/>
+ </state>
+
+<state id="s02">
+ <onentry>
+ <send event="timeout2" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <!-- identical to test242sub1.scxml. -->
+ <content>
+ <scxml version="1.0" initial="subFinal1" datamodel="ecmascript">
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <!-- we got done.invoke last time, so we need it this time too -->
+ <transition event="done.invoke" target="pass"/>
+ <transition event="timeout2" target="fail"/>
+ </state>
+
+<state id="s03">
+ <onentry>
+ <send event="timeout3" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <!-- identical to test242sub1.scxml. -->
+ <content>
+ <scxml version="1.0" initial="subFinal2" datamodel="ecmascript">
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+ <!-- we got timeout last time, so we need it this time too -->
+ <transition event="timeout3" target="pass"/>
+ <transition event="done.invoke" 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/samples/w3c/tests/test242sub1.scxml b/test/samples/w3c/tests/test242sub1.scxml
new file mode 100644
index 0000000..0f099d3
--- /dev/null
+++ b/test/samples/w3c/tests/test242sub1.scxml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- when invoked, just terminate. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="final" version="1.0" datamodel="ecmascript">
+
+ <final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test243.scxml b/test/samples/w3c/tests/test243.scxml
new file mode 100644
index 0000000..18f2175
--- /dev/null
+++ b/test/samples/w3c/tests/test243.scxml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that datamodel values can be specified by param.
+test240sub1 will return success ifits Var1 is set to 1, failure otherwise. --><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="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param name="Var1" expr="1"/>
+ <content>
+ <scxml version="1.0" initial="sub0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="sub0">
+ <transition cond="Var1==1" target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" 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/samples/w3c/tests/test244.scxml b/test/samples/w3c/tests/test244.scxml
new file mode 100644
index 0000000..d251c59
--- /dev/null
+++ b/test/samples/w3c/tests/test244.scxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that datamodel values can be specified by namelist.
+invoked child will return success ifits Var1 is set to 1, failure otherwise.
+This test will fail schema validation due to multiple occurrences of Var1,
+but should run correctly. --><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="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="Var1">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="sub0">
+ <transition cond="Var1==1" target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" 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/samples/w3c/tests/test245.scxml b/test/samples/w3c/tests/test245.scxml
new file mode 100644
index 0000000..58838b2
--- /dev/null
+++ b/test/samples/w3c/tests/test245.scxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that non-existent datamodel values are not set. Var2 is not defined in
+invoked child's datamodel. It will will return success if its Var2 remains unbound, failure otherwise. --><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="Var2" expr="3"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="Var2">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
+ <transition cond="Var2" target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="success" 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/samples/w3c/tests/test247.scxml b/test/samples/w3c/tests/test247.scxml
new file mode 100644
index 0000000..b543bf1
--- /dev/null
+++ b/test/samples/w3c/tests/test247.scxml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that we get done.invoke. timeout indicates failure --><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="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml version="1.0" initial="subFinal" datamodel="ecmascript">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="done.invoke" 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>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test250.scxml b/test/samples/w3c/tests/test250.scxml
new file mode 100644
index 0000000..f5228ab
--- /dev/null
+++ b/test/samples/w3c/tests/test250.scxml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the onexit handlers run in the invoked process if it is cancelled. This has to be a
+manual test, since this process won't accept any events from the child process once it has been cancelled.
+Tester must examine log output from child process to determine success --><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"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0" initial="sub01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="subFinal"/>
+ <onexit>
+ <log expr="'Exiting sub0'"/>
+ </onexit>
+ <state id="sub01">
+ <onexit>
+ <log expr="'Exiting sub01'"/>
+ </onexit>
+ </state>
+ </state>
+ <final id="subFinal">
+ <onentry>
+ <log expr="'entering final state, invocation was not cancelled'"/>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ </invoke>
+
+ <!-- this transition will cause the invocation to be cancelled -->
+ <transition event="foo" target="final"/>
+ </state>
+
+<final id="final"/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test252.scxml b/test/samples/w3c/tests/test252.scxml
new file mode 100644
index 0000000..14c6686
--- /dev/null
+++ b/test/samples/w3c/tests/test252.scxml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that we don't process any events received from the invoked process once it is cancelled. child
+process tries to send us childToParent in an onexit handler. If we get it, we fail.
+timeout indicates success. --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <transition event="timeout" target="pass"/>
+ <transition event="childToParent" target="fail"/>
+ <transition event="done.invoke" target="fail"/>
+
+ <state id="s01">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="subFinal"/>
+ <onexit>
+ <send target="#_parent" event="childToParent"/>
+ </onexit>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <!-- this transition will cause the invocation to be cancelled -->
+ <transition event="foo" target="s02"/>
+ </state>
+
+ <state id="s02"/>
+
+</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/samples/w3c/tests/test253.scxml b/test/samples/w3c/tests/test253.scxml
new file mode 100644
index 0000000..e8924ec
--- /dev/null
+++ b/test/samples/w3c/tests/test253.scxml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the scxml event processor is used in both directions. If child process uses the
+scxml event i/o processor to communicate with us, send it an event. It will send back success if
+this process uses the scxml processor to send the message to it, otherwise failure. For this test we allow
+'scxml' as an alternative to the full url. --><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"/>
+ </datamodel>
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <transition event="timeout" target="fail"/>
+
+ <invoke type="scxml" id="foo">
+ <content>
+ <!-- inform parent we're running then wait for it to send us an event. If it uses the scxml event i/o
+ processor to do so, return success, otherwise return failure. -->
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var2"/>
+ </datamodel>
+ <state id="sub0">
+ <onentry>
+ <send target="#_parent" event="childRunning"/>
+ </onentry>
+
+ <transition event="parentToChild" target="sub1">
+ <assign location="Var2" expr="_event.origintype"/>
+ </transition>
+ </state>
+ <state id="sub1">
+ <transition cond="Var2=='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition cond="Var2=='scxml'" target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <state id="s01">
+ <transition event="childRunning" target="s02">
+ <assign location="Var1" expr="_event.origintype"/>
+ </transition>
+ </state>
+
+ <state id="s02">
+
+ <transition cond="Var1=='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" target="s03">
+ <send target="#_foo" event="parentToChild"/>
+ </transition>
+ <transition cond="Var1=='scxml'" target="s03">
+ <send target="#_foo" event="parentToChild"/>
+ </transition>
+
+ <transition target="fail"/>
+
+ </state>
+
+
+ <state id="s03">
+ <transition event="success" target="pass"/>
+ <transition event="fail" target="fail"/>
+
+ </state>
+
+</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/samples/w3c/tests/test276.scxml b/test/samples/w3c/tests/test276.scxml
new file mode 100644
index 0000000..233c171
--- /dev/null
+++ b/test/samples/w3c/tests/test276.scxml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that values passed in from parent process override default values specified in the child, test276sub1.scxml.
+The child returns event1 if var1 has value 1, event0 if it has default value 0. --><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">
+ <invoke type="scxml" src="file:test276sub1.scxml">
+ <param name="Var1" expr="1"/>
+ </invoke>
+ <transition event="event1" target="pass"/>
+ <transition event="event0" 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/samples/w3c/tests/test276sub1.scxml b/test/samples/w3c/tests/test276sub1.scxml
new file mode 100644
index 0000000..b18ceb2
--- /dev/null
+++ b/test/samples/w3c/tests/test276sub1.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- define var1 with default value 0. Parent will invoke this process setting var1 = 1. Return event1 if var1 == 1, event0 otherwise --><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">
+
+
+ <transition cond="Var1==1" target="final">
+ <send target="#_parent" event="event1"/>
+ </transition>
+
+ <transition target="final">
+ <send target="#_parent" event="event0"/>
+ </transition>
+
+ </state>
+
+ <final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test278.scxml b/test/samples/w3c/tests/test278.scxml
new file mode 100644
index 0000000..b26c6f2
--- /dev/null
+++ b/test/samples/w3c/tests/test278.scxml
@@ -0,0 +1,21 @@
+<?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="ecmascript">
+
+<!-- test that a variable can be accessed from a state that is outside its lexical scope -->
+
+ <state id="s0">
+ <transition cond="Var1==1" target="pass"/>
+
+ <transition target="fail"/>
+
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+ </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/samples/w3c/tests/test279.scxml b/test/samples/w3c/tests/test279.scxml
new file mode 100644
index 0000000..2de6fd2
--- /dev/null
+++ b/test/samples/w3c/tests/test279.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- testing that in case of early binding variables are assigned values at init time, before
+ the state containing them is visited --><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="Var1==1" target="pass"/>
+
+ <transition target="fail"/>
+
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+ </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/samples/w3c/tests/test280.scxml b/test/samples/w3c/tests/test280.scxml
new file mode 100644
index 0000000..78865bf
--- /dev/null
+++ b/test/samples/w3c/tests/test280.scxml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test late binding. var2 won't get bound until s1 is entered, so it shouldn't have a value in s0 and
+accessing it should cause an error. It should get bound before the onentry code in s1 so it should be
+possible access it there and assign its value to var1 --><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" binding="late">
+
+ <datamodel>
+ <data id="Var1"/>
+ </datamodel>
+
+ <state id="s0">
+ <transition cond="typeof Var2 === 'undefined' " target="s1"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data id="Var2" expr="1"/>
+ </datamodel>
+ <onentry>
+ <assign location="Var1" expr="Var2"/>
+ </onentry>
+ <transition cond="Var1===Var2" 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/samples/w3c/tests/test286.scxml b/test/samples/w3c/tests/test286.scxml
new file mode 100644
index 0000000..596f2ba
--- /dev/null
+++ b/test/samples/w3c/tests/test286.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that assigment to a non-declared var causes an error. the transition on foo catches the case
+where no 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="ecmascript" initial="s0">
+
+
+ <state id="s0">
+ <onentry>
+ <assign location="Var1" expr="1"/>
+ <raise event="foo"/>
+ </onentry>
+
+ <transition event="error.execution" 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/samples/w3c/tests/test287.scxml b/test/samples/w3c/tests/test287.scxml
new file mode 100644
index 0000000..030c6b5
--- /dev/null
+++ b/test/samples/w3c/tests/test287.scxml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- a simple test that a legal value may be assigned to a valid data model location --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0" initial="s0">
+
+<datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <assign location="Var1" expr="1"/>
+ </onentry>
+
+ <transition cond="Var1==1" 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/samples/w3c/tests/test294.scxml b/test/samples/w3c/tests/test294.scxml
new file mode 100644
index 0000000..efd26f4
--- /dev/null
+++ b/test/samples/w3c/tests/test294.scxml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a param inside donedata ends up in the data field of the done event and
+that content inside donedata sets the full value of the event.data field --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="s0" initial="s01">
+
+ <transition event="done.state.s0" cond="_event.data['Var1']==1" target="s1">
+ </transition>
+
+ <transition event="done.state.s0" target="fail">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param name="Var1" expr="1"/>
+ </donedata>
+ </final>
+ </state>
+
+ <state id="s1" initial="s11">
+
+ <transition event="done.state.s1" cond="_event.data === 'foo'" target="pass">
+ </transition>
+
+ <transition event="done.state.s1" target="fail">
+ </transition>
+
+ <state id="s11">
+ <transition target="s12"/>
+ </state>
+ <final id="s12">
+ <donedata>
+ <content>foo</content>
+ </donedata>
+ </final>
+ </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/samples/w3c/tests/test298.scxml b/test/samples/w3c/tests/test298.scxml
new file mode 100644
index 0000000..6a82a95
--- /dev/null
+++ b/test/samples/w3c/tests/test298.scxml
@@ -0,0 +1,23 @@
+<?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="ecmascript" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+ <state id="s0" initial="s01">
+ <transition event="error.execution" target="pass"/>
+ <transition event="*" target="fail"/>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param name="Var3" location="Var2"/>
+ </donedata>
+ </final>
+ </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/samples/w3c/tests/test301.scxml b/test/samples/w3c/tests/test301.scxml
new file mode 100644
index 0000000..1c25c6d
--- /dev/null
+++ b/test/samples/w3c/tests/test301.scxml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- the processor should reject this document because it can't download the script.
+Therefore we fail if it runs at all. This test is valid only for datamodels that support scripting --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0" initial="s0">
+ <script src="D:\foo"/>
+
+ <state id="s0">
+ <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/samples/w3c/tests/test302.scxml b/test/samples/w3c/tests/test302.scxml
new file mode 100644
index 0000000..21ccdb3
--- /dev/null
+++ b/test/samples/w3c/tests/test302.scxml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a script is evaluated at load time. <conf:script> shoudl assign the value 1 to
+Var1. Hence, if script is evaluated at download time, Var1 has a value in the initial state s0.
+This test is valid only for datamodels that support scripting --><scxml xmlns="http://www.w3.org/2005/07/scxml" datamodel="ecmascript" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0">
+ <script>var Var1 = 1</script>
+
+ <state id="s0">
+ <transition cond="Var1==1" 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/samples/w3c/tests/test303.scxml b/test/samples/w3c/tests/test303.scxml
new file mode 100644
index 0000000..2fa5b27
--- /dev/null
+++ b/test/samples/w3c/tests/test303.scxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- to test that scripts are run as part of executable content, we check that it changes the value of a var at the
+right point. This test is valid only for datamodels that support scripting --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0" initial="s0">
+<datamodel>
+<data id="Var1" expr="0"/>
+</datamodel>
+
+ <state id="s0">
+ <onentry>
+ <assign location="Var1" expr="2"/>
+ <script>var Var1 = 1</script>
+ </onentry>
+ <transition cond="Var1==1" 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/samples/w3c/tests/test304.scxml b/test/samples/w3c/tests/test304.scxml
new file mode 100644
index 0000000..250d0cd
--- /dev/null
+++ b/test/samples/w3c/tests/test304.scxml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a variable declared by a script can be accessed like any other part of the data model --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" version="1.0" initial="s0">
+ <script>var Var1 = 1</script>
+
+ <state id="s0">
+ <transition cond="Var1==1" 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/samples/w3c/tests/test307.scxml b/test/samples/w3c/tests/test307.scxml
new file mode 100644
index 0000000..6eff148
--- /dev/null
+++ b/test/samples/w3c/tests/test307.scxml
@@ -0,0 +1,42 @@
+<?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" datamodel="ecmascript" version="1.0" initial="s0" binding="late">
+
+<!-- with binding=late, in s0 we access a variable that isn't created until we get to s1. Then in s1
+we access a non-existent substructure of a variable. We use log tags to report the values that both operations
+yield, and whether there are errors. This is a manual test, since the tester must report whether the output
+is the same in the two cases -->
+
+<state id="s0">
+ <onentry>
+ <log label="entering s0 value of Var 1 is: " expr="Var1"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error" target="s1">
+ <log label="error in state s0" expr="_event"/>
+ </transition>
+ <transition event="foo" target="s1">
+ <log label="no error in s0" expr=""/>
+ </transition>
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+
+ <onentry>
+ <log label="entering s1, value of non-existent substructure of Var 1 is: " expr="Var1.bar"/>
+ <raise event="bar"/>
+ </onentry>
+
+ <transition event="error" target="final">
+ <log label="error in state s1" expr="_event"/>
+ </transition>
+ <transition event="bar" target="final">
+ <log label="No error in s1" expr=""/>
+ </transition>
+
+</state>
+
+<final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test309.scxml b/test/samples/w3c/tests/test309.scxml
new file mode 100644
index 0000000..7ac405c
--- /dev/null
+++ b/test/samples/w3c/tests/test309.scxml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that an expression that cannot be interpreted as a boolean is treated as false --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+<state id="s0">
+ <transition cond="return" 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/samples/w3c/tests/test310.scxml b/test/samples/w3c/tests/test310.scxml
new file mode 100644
index 0000000..e939ded
--- /dev/null
+++ b/test/samples/w3c/tests/test310.scxml
@@ -0,0 +1,18 @@
+<?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="'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/samples/w3c/tests/test311.scxml b/test/samples/w3c/tests/test311.scxml
new file mode 100644
index 0000000..851f3ad
--- /dev/null
+++ b/test/samples/w3c/tests/test311.scxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that assignment to a non-existent location yields an error --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+
+<state id="s0">
+ <onentry>
+ <assign location="Var1" expr="1"/>
+ </onentry>
+ <transition event="error.execution" 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/samples/w3c/tests/test312.scxml b/test/samples/w3c/tests/test312.scxml
new file mode 100644
index 0000000..a9741e5
--- /dev/null
+++ b/test/samples/w3c/tests/test312.scxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that assignment with an illegal expr raises an error --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+<datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="Var1" expr="return"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" 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/samples/w3c/tests/test313.scxml b/test/samples/w3c/tests/test313.scxml
new file mode 100644
index 0000000..fcec4ac
--- /dev/null
+++ b/test/samples/w3c/tests/test313.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- this is a manual test. The processor is allowed to reject this doc, but if it executes it with its illegal
+expression, it must raise an error --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+<datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="Var1" expr="return"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" 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/samples/w3c/tests/test314.scxml b/test/samples/w3c/tests/test314.scxml
new file mode 100644
index 0000000..ed78e79
--- /dev/null
+++ b/test/samples/w3c/tests/test314.scxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- this is a manual test because the processor is allowed to reject this document. But if it executes it,
+it should not raise an error until it gets to s03 and evaluates the illegal expr --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+<datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+
+
+<state id="s0" initial="s01">
+ <transition event="error.execution" target="fail"/>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+
+ <state id="s02">
+ <transition target="s03"/>
+ </state>
+
+ <state id="s03">
+ <onentry>
+ <assign location="Var1" expr="return"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" target="pass"/>
+ <transition event=".*" target="fail"/>
+ </state>
+
+</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/samples/w3c/tests/test318.scxml b/test/samples/w3c/tests/test318.scxml
new file mode 100644
index 0000000..15bf7f8
--- /dev/null
+++ b/test/samples/w3c/tests/test318.scxml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that _event stays bound during the onexit and entry into the next state --><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" name="machineName">
+<datamodel>
+ <data id="Var1"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" target="s1"/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <raise event="bar"/>
+ <!-- _event should still be bound to 'foo' at this point -->
+ <assign location="Var1" expr="_event.name"/>
+ </onentry>
+ <transition cond="Var1=='foo'" 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/samples/w3c/tests/test319.scxml b/test/samples/w3c/tests/test319.scxml
new file mode 100644
index 0000000..adac328
--- /dev/null
+++ b/test/samples/w3c/tests/test319.scxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that _event is not bound before any event has been raised --><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" name="machineName">
+
+ <state id="s0">
+ <onentry>
+ <if cond="_event">
+ <raise event="bound"/>
+ <else/>
+ <raise event="unbound"/>
+ </if>
+ </onentry>
+ <transition event="unbound" target="pass"/>
+ <transition event="bound" 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/samples/w3c/tests/test321.scxml b/test/samples/w3c/tests/test321.scxml
new file mode 100644
index 0000000..66fcf58
--- /dev/null
+++ b/test/samples/w3c/tests/test321.scxml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that _sessionid is bound on startup --><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" name="machineName">
+<datamodel>
+ <data id="Var1" expr="_sessionid"/>
+ </datamodel>
+
+ <state id="s0">
+<transition cond="Var1" target="pass"/>
+ <transition cond="true" 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/samples/w3c/tests/test322.scxml b/test/samples/w3c/tests/test322.scxml
new file mode 100644
index 0000000..3e8835c
--- /dev/null
+++ b/test/samples/w3c/tests/test322.scxml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that _sessionid remains bound to the same value throught the session. this means that it can't
+be assigned to --><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" name="machineName">
+<datamodel>
+ <data id="Var1" expr="_sessionid"/>
+ <data id="Var2"/>
+ </datamodel>
+
+ <state id="s0">
+ <transition target="s1"/>
+
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign location="_sessionid" expr="'otherName'"/>
+ <raise event="foo"/>
+ </onentry>
+
+ <transition event="error.execution" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s2">
+
+ <transition cond="Var1==_sessionid" target="pass"/>
+ <transition target="fail">
+ <log expr="_sessionid" />
+ <log expr="Var1" />
+ </transition>
+ </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/samples/w3c/tests/test323.scxml b/test/samples/w3c/tests/test323.scxml
new file mode 100644
index 0000000..43fa9c8
--- /dev/null
+++ b/test/samples/w3c/tests/test323.scxml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that _name is bound on startup --><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" name="machineName">
+<datamodel>
+ <data id="Var1" expr="_name"/>
+ </datamodel>
+
+ <state id="s0">
+<transition cond="Var1" target="pass"/>
+ <transition cond="true" 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/samples/w3c/tests/test324.scxml b/test/samples/w3c/tests/test324.scxml
new file mode 100644
index 0000000..7e5023e
--- /dev/null
+++ b/test/samples/w3c/tests/test324.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that _name stays bound till the session ends. This means that it cannot be assigned to --><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" name="machineName">
+
+
+ <state id="s0">
+ <transition cond="_name === 'machineName'" target="s1"/>
+ <transition target="fail"/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign location="_name" expr="'otherName'"/>
+ </onentry>
+ <transition cond="_name === 'machineName'" 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/samples/w3c/tests/test325.scxml b/test/samples/w3c/tests/test325.scxml
new file mode 100644
index 0000000..eaa4c22
--- /dev/null
+++ b/test/samples/w3c/tests/test325.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that _ioprocessors is bound at startup. I'm not sure how to test for a set value or
+how to test that the entries in it do represent I/O processors, since the set that each implementation
+supports may be different. Suggestions welcome --><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" name="machineName">
+<datamodel>
+ <data id="Var1" expr="_ioprocessors"/>
+ </datamodel>
+
+
+ <state id="s0">
+ <transition cond="Var1" 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/samples/w3c/tests/test326.scxml b/test/samples/w3c/tests/test326.scxml
new file mode 100644
index 0000000..f18a661
--- /dev/null
+++ b/test/samples/w3c/tests/test326.scxml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that _ioprocessors stays bound till the session ends. This means that it cannot be assigned to --><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" name="machineName">
+<datamodel>
+ <data id="Var1" expr="_ioprocessors"/>
+ <data id="Var2"/>
+ </datamodel>
+
+ <state id="s0">
+ <transition cond="Var1" target="s1"/>
+ <transition cond="true" target="fail"/>
+ </state>
+
+
+ <state id="s1">
+ <onentry>
+ <assign location="_ioprocessors" expr="'otherName'"/>
+ <raise event="foo"/>
+ </onentry>
+
+ <transition event="error.execution" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s2">
+ <onentry>
+ <assign location="Var2" expr="_ioprocessors"/>
+ </onentry>
+ <transition cond="Var1==Var2" 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/samples/w3c/tests/test329.scxml b/test/samples/w3c/tests/test329.scxml
new file mode 100644
index 0000000..9a95643
--- /dev/null
+++ b/test/samples/w3c/tests/test329.scxml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that none of the system variables can be modified --><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" name="machineName">
+ <datamodel>
+ <data id="Var1"/>
+ <data id="Var2"/>
+ <data id="Var3"/>
+ <data id="Var4"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <!-- get _event bound so we can use it in s1-->
+ <raise event="foo"/>
+ <assign location="Var1" expr="_sessionid"/>
+ <assign location="_sessionid" expr="27"/>
+ </onentry>
+
+ <transition event="foo" cond="Var1==_sessionid" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign location="Var2" expr="_event"/>
+ <assign location="_event" expr="27"/>
+ </onentry>
+ <transition cond="Var2==_event" target="s2"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s2">
+ <onentry>
+ <assign location="Var3" expr="_name"/>
+ <assign location="_name" expr="27"/>
+ </onentry>
+ <transition cond="Var3==_name" target="s3"/>
+ <transition target="fail"/>
+ </state>
+
+
+<state id="s3">
+ <onentry>
+ <assign location="Var4" expr="_ioprocessors"/>
+ <assign location="_ioprocessors" expr="27"/>
+ </onentry>
+ <transition cond="Var4==_ioprocessors" 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/samples/w3c/tests/test330.scxml b/test/samples/w3c/tests/test330.scxml
new file mode 100644
index 0000000..5cbf4bc
--- /dev/null
+++ b/test/samples/w3c/tests/test330.scxml
@@ -0,0 +1,23 @@
+<?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="ecmascript" name="machineName">
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" cond="'name' in _event &amp;&amp; 'type' in _event &amp;&amp; 'sendid' in _event &amp;&amp; 'origin' in _event &amp;&amp; 'invokeid' &amp;&amp; 'data' in _event" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" cond="'name' in _event &amp;&amp; 'type' in _event &amp;&amp; 'sendid' in _event &amp;&amp; 'origin' in _event &amp;&amp; 'invokeid' &amp;&amp; 'data' in _event" target="pass"/>
+ <transition event="*" target="fail"/>
+ </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>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test331.scxml b/test/samples/w3c/tests/test331.scxml
new file mode 100644
index 0000000..e1271f0
--- /dev/null
+++ b/test/samples/w3c/tests/test331.scxml
@@ -0,0 +1,60 @@
+<?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" version="1.0" datamodel="ecmascript" initial="s0" name="machineName">
+
+<!-- test that _event.type is set correctly for internal, platform, and external events -->
+<datamodel>
+ <data id="Var1"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <!-- internal event -->
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" target="s1">
+ <assign location="Var1" expr="_event.type"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition cond="Var1=='internal'" target="s2"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s2">
+ <onentry>
+ <!-- this will generate an error, which is a platform event -->
+ <assign location="Var2" expr="1"/>
+ </onentry>
+ <transition event="error" target="s3">
+ <assign location="Var1" expr="_event.type"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s3">
+ <transition cond="Var1=='platform'" target="s4"/>
+ <transition target="fail"/>
+ </state>
+
+ <state id="s4">
+ <onentry>
+ <!-- external event -->
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" target="s5">
+ <assign location="Var1" expr="_event.type"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s5">
+ <transition cond="Var1=='external'" 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/samples/w3c/tests/test332.scxml b/test/samples/w3c/tests/test332.scxml
new file mode 100644
index 0000000..da68cf4
--- /dev/null
+++ b/test/samples/w3c/tests/test332.scxml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that sendid is present in error events triggered by send errors --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="ecmascript" name="machineName">
+ <datamodel>
+ <data id="Var1"/>
+ <data id="Var2"/>
+ </datamodel>
+
+
+ <state id="s0">
+ <onentry>
+ <!-- this will raise an error and also store the sendid in var1 -->
+ <send target="baz" event="foo" idlocation="Var1"/>
+ </onentry>
+ <transition event="error" target="s1">
+ <!-- get the sendid out of the error event -->
+ <assign location="Var2" expr="_event.sendid"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+<!-- make sure that the sendid in the error event matches the one generated when send executed -->
+ <transition cond="Var1===Var2" 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/samples/w3c/tests/test333.scxml b/test/samples/w3c/tests/test333.scxml
new file mode 100644
index 0000000..cb9721a
--- /dev/null
+++ b/test/samples/w3c/tests/test333.scxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- make sure sendid is blank in a non-error event --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="ecmascript" name="machineName">
+
+ <state id="s0">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" cond="_event.sendid == null" 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/samples/w3c/tests/test335.scxml b/test/samples/w3c/tests/test335.scxml
new file mode 100644
index 0000000..57da1ba
--- /dev/null
+++ b/test/samples/w3c/tests/test335.scxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that origin field is blank for internal events --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="ecmascript" name="machineName">
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" cond="_event.origin == null" 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/samples/w3c/tests/test336.scxml b/test/samples/w3c/tests/test336.scxml
new file mode 100644
index 0000000..92bd3dd
--- /dev/null
+++ b/test/samples/w3c/tests/test336.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the origin field of an external event contains a URL that lets you send back to the originator. In
+this case it's the same session, so if we get bar we succeed --><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" name="machineName">
+
+ <state id="s0">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" target="s1">
+ <send event="bar" targetexpr="_event.origin" typeexpr="_event.origintype"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+ <send event="baz"/>
+ </onentry>
+ <transition event="bar" 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/samples/w3c/tests/test337.scxml b/test/samples/w3c/tests/test337.scxml
new file mode 100644
index 0000000..c4c663e
--- /dev/null
+++ b/test/samples/w3c/tests/test337.scxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that origintype is blank on internal events --><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" name="machineName">
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" cond="_event.origintype == null" 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/samples/w3c/tests/test338.scxml b/test/samples/w3c/tests/test338.scxml
new file mode 100644
index 0000000..fef53be
--- /dev/null
+++ b/test/samples/w3c/tests/test338.scxml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that invokeid is set correctly in events received from an invoked process. timeout event catches the
+case where the invoke doesn't work correctly --><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"/>
+ <data id="Var2"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <invoke idlocation="Var1" type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript" name="machineName">
+ <final id="sub0">
+ <onentry>
+ <send target="#_parent" event="event1"/>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="event1" target="s1">
+ <assign location="Var2" expr="_event.invokeid"/>
+ </transition>
+ <transition event="event0" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition cond="Var1===Var2" 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/samples/w3c/tests/test339.scxml b/test/samples/w3c/tests/test339.scxml
new file mode 100644
index 0000000..7ffbabf
--- /dev/null
+++ b/test/samples/w3c/tests/test339.scxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that invokeid is blank in an event that wasn't returned from an invoked process --><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" name="machineName">
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" cond="_event.invokeid == null" 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/samples/w3c/tests/test342.scxml b/test/samples/w3c/tests/test342.scxml
new file mode 100644
index 0000000..2934704
--- /dev/null
+++ b/test/samples/w3c/tests/test342.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that eventexpr works and sets the name field of the resulting 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" name="machineName">
+ <datamodel>
+ <data id="Var1" expr="'foo'"/>
+ <data id="Var2"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <send eventexpr="Var1"/>
+ </onentry>
+ <transition event="foo" target="s1">
+ <assign location="Var2" expr="_event.name"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition cond="Var1===Var2" 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/samples/w3c/tests/test343.scxml b/test/samples/w3c/tests/test343.scxml
new file mode 100644
index 0000000..9765739
--- /dev/null
+++ b/test/samples/w3c/tests/test343.scxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that illegal <param> produces error.execution and empty event.data --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+
+ <state id="s0" initial="s01">
+ <!-- we should get the error before the done event -->
+ <transition event="error.execution" target="s1"/>
+ <transition event="done.state.s0" target="fail"/>
+
+ <transition event="done.state.s0" target="fail">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param location="Varfoo" name="someParam"/>
+ </donedata>
+ </final>
+ </state>
+
+
+ <!-- if we get here, we received the error event. Now check that the done
+ event has empty event.data -->
+
+ <state id="s1">
+ <transition event="done.state.s0" cond="_event.data == null" 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/samples/w3c/tests/test344.scxml b/test/samples/w3c/tests/test344.scxml
new file mode 100644
index 0000000..cd1c8a2
--- /dev/null
+++ b/test/samples/w3c/tests/test344.scxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a non-boolean cond expression evaluates to false and causes error.execution to be raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+<state id="s0">
+ <transition cond="return" target="fail"/>
+ <transition target="s1"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" 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/samples/w3c/tests/test346.scxml b/test/samples/w3c/tests/test346.scxml
new file mode 100644
index 0000000..622de71
--- /dev/null
+++ b/test/samples/w3c/tests/test346.scxml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that any attempt to change the value of a system variable causes error.execution to be raised.
+Event1..4 are there to catch the case where the error event is not raised. In cases where it is, we have
+to dispose of eventn in the next state, hence the targetless transitions (which simply throw away the 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" name="machineName">
+
+
+ <state id="s0">
+ <onentry>
+ <assign location="_sessionid" expr="'otherName'"/>
+ <raise event="event1"/>
+ </onentry>
+
+ <transition event="error.execution" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign location="_event" expr="'otherName'"/>
+ <raise event="event2"/>
+ </onentry>
+ <!-- throw out event1 if it's still around -->
+ <transition event="event1"/>
+ <transition event="error.execution" target="s2"/>
+ <!-- event1 would trigger this transition if we didn't drop it. We want this transition to have
+ a very general trigger to catch cases where the wrong error event was raised -->
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s2">
+ <onentry>
+ <assign location="_ioprocessors" expr="'otherName'"/>
+ <raise event="event3"/>
+ </onentry>
+ <transition event="event2"/>
+ <transition event="error.execution" target="s3"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s3">
+ <onentry>
+ <assign location="_name" expr="'otherName'"/>
+ <raise event="event4"/>
+ </onentry>
+ <transition event="event3"/>
+ <transition event="error.execution" 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/samples/w3c/tests/test355.scxml b/test/samples/w3c/tests/test355.scxml
new file mode 100644
index 0000000..6a77251
--- /dev/null
+++ b/test/samples/w3c/tests/test355.scxml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that default initial state is first in document order. If we enter s0 first we succeed, if s1, failure. --><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 target="pass"/>
+</state>
+
+<state id="s1">
+ <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/samples/w3c/tests/test364.scxml b/test/samples/w3c/tests/test364.scxml
new file mode 100644
index 0000000..ac57647
--- /dev/null
+++ b/test/samples/w3c/tests/test364.scxml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that default initial states are entered when a compound state is entered. First we test
+the 'initial' attribute, then the initial element, then default to the first child in document order.
+If we get to s01111 we succeed, if any other state, failure. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="ecmascript" initial="s1" version="1.0">
+
+<state id="s1" initial="s11p112 s11p122">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+ <state id="s11" initial="s111">
+ <state id="s111"/>
+ <parallel id="s11p1">
+ <state id="s11p11" initial="s11p111">
+ <state id="s11p111"/>
+ <state id="s11p112">
+ <onentry>
+ <raise event="In-s11p112"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s11p12" initial="s11p121">
+ <state id="s11p121"/>
+ <state id="s11p122">
+ <transition event="In-s11p112" target="s2"/>
+ </state>
+ </state>
+ </parallel>
+ </state>
+</state>
+
+<state id="s2">
+ <initial>
+ <transition target="s21p112 s21p122"/>
+ </initial>
+ <transition event="timeout" target="fail"/>
+ <state id="s21" initial="s211">
+ <state id="s211"/>
+ <parallel id="s21p1">
+ <state id="s21p11" initial="s21p111">
+ <state id="s21p111"/>
+ <state id="s21p112">
+ <onentry>
+ <raise event="In-s21p112"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s21p12" initial="s21p121">
+ <state id="s21p121"/>
+ <state id="s21p122">
+ <transition event="In-s21p112" target="s3"/>
+ </state>
+ </state>
+ </parallel>
+ </state>
+</state>
+
+<state id="s3">
+ <transition target="fail"/>
+ <state id="s31">
+ <state id="s311">
+ <state id="s3111">
+ <transition target="pass"/>
+ </state>
+ <state id="s3112"/>
+ <state id="s312"/>
+ <state id="s32"/>
+</state>
+</state>
+</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/samples/w3c/tests/test372.scxml b/test/samples/w3c/tests/test372.scxml
new file mode 100644
index 0000000..9b6c7ec
--- /dev/null
+++ b/test/samples/w3c/tests/test372.scxml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that entering a final state generates done.state.parentid after executing the onentry elements.
+Var1 should be set to 2 (but not 3) by the time the event is raised --><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" initial="s0final">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="done.state.s0" cond="Var1==2" target="pass"/>
+ <transition event="*" target="fail"/>
+
+ <final id="s0final">
+ <onentry>
+ <assign location="Var1" expr="2"/>
+ </onentry>
+ <onexit>
+ <assign location="Var1" expr="3"/>
+ </onexit>
+ </final>
+</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/samples/w3c/tests/test375.scxml b/test/samples/w3c/tests/test375.scxml
new file mode 100644
index 0000000..1652588
--- /dev/null
+++ b/test/samples/w3c/tests/test375.scxml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that onentry handlers are executed in document order. event1 should be raised before event2 --><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">
+ <onentry>
+ <raise event="event1"/>
+ </onentry>
+ <onentry>
+ <raise event="event2"/>
+ </onentry>
+
+ <transition event="event1" target="s1"/>
+ <transition event="*" target="fail"/>
+
+</state>
+
+<state id="s1">
+ <transition event="event2" 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/samples/w3c/tests/test376.scxml b/test/samples/w3c/tests/test376.scxml
new file mode 100644
index 0000000..1da5a9a
--- /dev/null
+++ b/test/samples/w3c/tests/test376.scxml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that each onentry handler is a separate block. The <send> of event1 will cause an error but
+ the increment to var1 should happen anyways --><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">
+ <onentry>
+ <send target="baz" event="event1"/>
+ </onentry>
+ <onentry>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onentry>
+
+ <transition cond="Var1==2" 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/samples/w3c/tests/test377.scxml b/test/samples/w3c/tests/test377.scxml
new file mode 100644
index 0000000..49549c8
--- /dev/null
+++ b/test/samples/w3c/tests/test377.scxml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that onexit handlers are executed in document order. event1 should be raised before event2 --><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">
+ <onexit>
+ <raise event="event1"/>
+ </onexit>
+ <onexit>
+ <raise event="event2"/>
+ </onexit>
+
+ <transition target="s1"/>
+ </state>
+
+ <state id="s1">
+
+ <transition event="event1" target="s2"/>
+ <transition event="*" target="fail"/>
+
+</state>
+
+<state id="s2">
+ <transition event="event2" 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/samples/w3c/tests/test378.scxml b/test/samples/w3c/tests/test378.scxml
new file mode 100644
index 0000000..34501fb
--- /dev/null
+++ b/test/samples/w3c/tests/test378.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that each onexithandler is a separate block. The <send> of event1 will cause an error but
+ the increment to var1 should happen anyways --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onexit>
+ <send target="baz" event="event1"/>
+ </onexit>
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+
+<transition target="s1"/>
+</state>
+
+<state id="s1">
+ <transition cond="Var1==2" 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/samples/w3c/tests/test387.scxml b/test/samples/w3c/tests/test387.scxml
new file mode 100644
index 0000000..35fb910
--- /dev/null
+++ b/test/samples/w3c/tests/test387.scxml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the default history state works correctly. From initial state s3 we take a transition to s0's default
+shallow history state. That should generate "enteringS011", which takes us to s4. In s4, we
+transition to s1's default deep history state. We should end up in s122, generating "enteringS122". Otherwise failure.--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s3" version="1.0" datamodel="ecmascript">
+
+
+<state id="s0" initial="s01">
+
+ <transition event="enteringS011" target="s4"/>
+ <transition event="*" target="fail"/>
+
+ <history type="shallow" id="s0HistShallow">
+ <transition target="s01"/>
+ </history>
+ <history type="deep" id="s0HistDeep">
+ <transition target="s022"/>
+ </history>
+ <state id="s01" initial="s011">
+ <state id="s011">
+ <onentry>
+ <raise event="enteringS011"/>
+ </onentry>
+ </state>
+ <state id="s012">
+ <onentry>
+ <raise event="enteringS012"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s02" initial="s021">
+ <state id="s021">
+ <onentry>
+ <raise event="enteringS021"/>
+ </onentry>
+ </state>
+ <state id="s022">
+ <onentry>
+ <raise event="enteringS022"/>
+ </onentry>
+ </state>
+ </state>
+
+</state>
+
+<state id="s1" initial="s11">
+
+ <transition event="enteringS122" target="pass"/>
+ <transition event="*" target="fail"/>
+
+ <history type="shallow" id="s1HistShallow">
+ <transition target="s11"/>
+ </history>
+ <history type="deep" id="s1HistDeep">
+ <transition target="s122"/>
+ </history>
+ <state id="s11" initial="s111">
+ <state id="s111">
+ <onentry>
+ <raise event="enteringS111"/>
+ </onentry>
+ </state>
+ <state id="s112">
+ <onentry>
+ <raise event="enteringS112"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s12" initial="s121">
+ <state id="s121">
+ <onentry>
+ <raise event="enteringS121"/>
+ </onentry>
+ </state>
+ <state id="s122">
+ <onentry>
+ <raise event="enteringS122"/>
+ </onentry>
+ </state>
+ </state>
+
+</state>
+
+
+<state id="s3">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition target="s0HistShallow"/>
+</state>
+
+<state id="s4">
+ <transition target="s1HistDeep"/>
+</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/samples/w3c/tests/test388.scxml b/test/samples/w3c/tests/test388.scxml
new file mode 100644
index 0000000..6a93fd0
--- /dev/null
+++ b/test/samples/w3c/tests/test388.scxml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that history states works correctly. The counter Var1 counts how many times
+we have entered s0. The initial state is s012. We then transition to s1, which transitions
+to s0's deep history state. entering.s012 should be raised, otherwise failure. Then we transition
+to s02, which transitions to s0's shallow history state. That should have value s01, and its initial
+state is s011, so we should get entering.s011, otherwise failure.--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s012" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+
+<state id="s0" initial="s01">
+ <onentry>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onentry>
+
+ <!-- the first time through, go to s1, setting a timer just in case something hangs -->
+ <transition event="entering.s012" cond="Var1==1" target="s1">
+ <send event="timeout" delay="2s"/>
+ </transition>
+
+ <!-- the second time, we should get entering.s012. If so, go to s2, otherwise fail -->
+ <transition event="entering.s012" cond="Var1==2" target="s2"/>
+ <transition event="entering" cond="Var1==2" target="fail"/>
+
+ <!-- the third time we should get entering-s011. If so, pass, otherwise fail -->
+ <transition event="entering.s011" cond="Var1==3" target="pass"/>
+ <transition event="entering" cond="Var1==3" target="fail"/>
+
+ <!-- if we timeout, the state machine is hung somewhere, so fail -->
+ <transition event="timeout" target="fail"/>
+
+ <history type="shallow" id="s0HistShallow">
+ <transition target="s02"/>
+ </history>
+ <history type="deep" id="s0HistDeep">
+ <transition target="s022"/>
+ </history>
+ <state id="s01" initial="s011">
+ <state id="s011">
+ <onentry>
+ <raise event="entering.s011"/>
+ </onentry>
+ </state>
+ <state id="s012">
+ <onentry>
+ <raise event="entering.s012"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s02" initial="s021">
+ <state id="s021">
+ <onentry>
+ <raise event="entering.s021"/>
+ </onentry>
+ </state>
+ <state id="s022">
+ <onentry>
+ <raise event="entering.s022"/>
+ </onentry>
+ </state>
+ </state>
+
+</state>
+
+
+<state id="s1">
+ <transition target="s0HistDeep"/>
+</state>
+
+<state id="s2">
+ <transition target="s0HistShallow"/>
+</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/samples/w3c/tests/test396.scxml b/test/samples/w3c/tests/test396.scxml
new file mode 100644
index 0000000..dbbb124
--- /dev/null
+++ b/test/samples/w3c/tests/test396.scxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the value in _event.name matches the event name used to match against transitions --><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">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+
+
+ <transition event="foo" cond="_event.name == 'foo'" target="pass"/>
+ <transition event="foo" 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/samples/w3c/tests/test399.scxml b/test/samples/w3c/tests/test399.scxml
new file mode 100644
index 0000000..e5a951e
--- /dev/null
+++ b/test/samples/w3c/tests/test399.scxml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the event name matching works correctly, including prefix matching and the fact
+that the event attribute of transition may contain multiple event designators. --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <!-- this will catch the failure case -->
+ <transition event="timeout" target="fail"/>
+
+ <state id="s01">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <!-- test that an event can match against a transition with multiple descriptors -->
+ <transition event="foo bar" target="s02"/>
+ </state>
+
+ <state id="s02">
+ <onentry>
+ <raise event="bar"/>
+ </onentry>
+ <!-- test that an event can match the second descriptor as well -->
+ <transition event="foo bar" target="s03"/>
+ </state>
+
+ <state id="s03">
+ <onentry>
+ <raise event="foo.zoo"/>
+ </onentry>
+ <!-- test that a prefix descriptor matches -->
+ <transition event="foo bar" target="s04"/>
+ </state>
+
+<state id="s04">
+ <onentry>
+ <raise event="foos"/>
+ </onentry>
+ <!-- test that only token prefixes match -->
+ <transition event="foo" target="fail"/>
+ <transition event="foos" target="s05"/>
+</state>
+
+<state id="s05">
+ <onentry>
+ <raise event="foo.zoo"/>
+ </onentry>
+ <!-- test that .* works at the end of a descriptor -->
+ <transition event="foo.*" target="s06"/>
+ </state>
+
+ <state id="s06">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <!-- test that "*" works by itself -->
+ <transition event="*" target="pass"/>
+ </state>
+
+</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/samples/w3c/tests/test401.scxml b/test/samples/w3c/tests/test401.scxml
new file mode 100644
index 0000000..9ce7217
--- /dev/null
+++ b/test/samples/w3c/tests/test401.scxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that errors go in the internal event queue. We send ourselves an external event foo, then perform
+and operation that raises an error. Then check that the error event is processed first, even though
+it was raised second --><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"/>
+ <!-- assigning to a non-existent location should raise an error -->
+ <assign location="Var1" expr="2"/>
+ </onentry>
+
+
+ <transition event="foo" target="fail"/>
+ <transition event="error" 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/samples/w3c/tests/test402.scxml b/test/samples/w3c/tests/test402.scxml
new file mode 100644
index 0000000..104483d
--- /dev/null
+++ b/test/samples/w3c/tests/test402.scxml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- the assertion that errors are 'like any other event' is pretty broad, but we can check that they
+are pulled off the internal queue in order, and that prefix matching works on them. --><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" initial="s01">
+ <onentry>
+ <!-- catch the failure case -->
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <state id="s01">
+ <onentry>
+ <!-- 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"/>
+ </onentry>
+
+ <transition event="event1" target="s02">
+ <raise event="event2"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s02">
+ <transition event="error" target="s03"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s03">
+ <transition event="event2" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+</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/samples/w3c/tests/test403a.scxml b/test/samples/w3c/tests/test403a.scxml
new file mode 100644
index 0000000..89a4ad9
--- /dev/null
+++ b/test/samples/w3c/tests/test403a.scxml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test one part of 'optimal enablement' meaning that of all transitions that are enabled, we chose the ones
+in child states over parent states, and use document order to break ties. We have
+a parent state s0 with two children, s01 and s02. In s01, we test that a) if
+a transition in the child matches, we don't consider matches in the parent and b)
+that if two transitions match in any state, we take the first in document order.
+In s02 we test that we take a transition in the parent if there is no
+matching transition in the child. --><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" initial="s01">
+ <onentry>
+ <!-- catch the failure case -->
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+ <transition event="event1" target="fail"/>
+ <transition event="event2" target="pass"/>
+
+ <state id="s01">
+ <onentry>
+ <!-- this should be caught by the first transition in this state, taking us to S02 -->
+ <raise event="event1"/>
+ </onentry>
+
+ <transition event="event1" target="s02"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s02">
+ <onentry>
+ <!-- since the local transition has a cond that evaluates to false this should be caught by a
+ transition in the parent state, taking us to pass -->
+ <raise event="event2"/>
+ </onentry>
+ <transition event="event1" target="fail"/>
+ <transition event="event2" cond="false" target="fail"/>
+ </state>
+
+</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/samples/w3c/tests/test403b.scxml b/test/samples/w3c/tests/test403b.scxml
new file mode 100644
index 0000000..18acfb5
--- /dev/null
+++ b/test/samples/w3c/tests/test403b.scxml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that 'optimally enabled set' really is a set, specifically that if a transition is optimally enabled in
+two different states, it is taken only once. --><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" initial="p0">
+ <!-- this transition should never be taken because a transition in a lower state should
+ always be selected -->
+ <transition event="event1">
+ <assign location="Var1" expr="Var1 + 1"/>
+ </transition>
+
+
+
+ <parallel id="p0">
+
+ <onentry>
+ <raise event="event1"/>
+ <raise event="event2"/>
+ </onentry>
+
+ <!-- this transition will be selected by both states p0s1 and p0s2, but should be executed only once -->
+ <transition event="event1">
+ <assign location="Var1" expr="Var1 + 1"/>
+ </transition>
+
+ <state id="p0s1">
+ <transition event="event2" cond="Var1==1" target="pass"/>
+ <transition event="event2" target="fail"/>
+ </state>
+
+ <state id="p0s2"/>
+
+</parallel>
+</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/samples/w3c/tests/test403c.scxml b/test/samples/w3c/tests/test403c.scxml
new file mode 100644
index 0000000..9e7fd12
--- /dev/null
+++ b/test/samples/w3c/tests/test403c.scxml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test 'optimally enabled set', specifically that preemption works correctly --><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" initial="p0">
+ <onentry>
+ <raise event="event1"/>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="event2" target="fail"/>
+ <transition event="timeout" target="fail"/>
+
+ <parallel id="p0">
+
+ <state id="p0s1">
+ <transition event="event1"/>
+ <transition event="event2"/>
+ </state>
+
+ <state id="p0s2">
+ <transition event="event1" target="p0s1">
+ <raise event="event2"/>
+ </transition>
+
+ </state>
+
+ <state id="p0s3">
+ <!-- this transition should be blocked by the one in p0s2-->
+ <transition event="event1" target="fail"/>
+ <!-- this transition will preempt the one that p0s2 inherits
+ from an ancestor -->
+ <transition event="event2" target="s1"/>
+
+ </state>
+
+<state id="p0s4">
+ <!-- this transition never gets preempted, should fire twice -->
+ <transition event="*">
+ <assign location="Var1" expr="Var1 + 1"/>
+ </transition>
+ </state>
+
+</parallel>
+</state>
+
+<state id="s1">
+ <transition cond="Var1==2" 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/samples/w3c/tests/test404.scxml b/test/samples/w3c/tests/test404.scxml
new file mode 100644
index 0000000..ad6bb24
--- /dev/null
+++ b/test/samples/w3c/tests/test404.scxml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that states are exited in exit order (children before parents with reverse doc order used to break ties
+ before the executable content in the transitions. event1, event2, event3, event4 should be raised in that
+ order when s01p is exited --><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" initial="s01p">
+
+
+
+<parallel id="s01p">
+ <onexit>
+ <!-- this should be the 3rd event raised -->
+ <raise event="event3"/>
+ </onexit>
+ <transition target="s02">
+ <!-- this should be the fourth event raised -->
+ <raise event="event4"/>
+ </transition>
+
+ <state id="s01p1">
+ <onexit>
+ <!-- this should be the second event raised -->
+ <raise event="event2"/>
+ </onexit>
+ </state>
+
+ <state id="s01p2">
+ <!-- this should be the first event raised -->
+ <onexit>
+ <raise event="event1"/>
+ </onexit>
+ </state>
+ </parallel>
+
+ <state id="s02">
+ <transition event="event1" target="s03"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s03">
+ <transition event="event2" target="s04"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s04">
+ <transition event="event3" target="s05"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s05">
+ <transition event="event4" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ </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/samples/w3c/tests/test405.scxml b/test/samples/w3c/tests/test405.scxml
new file mode 100644
index 0000000..114cf22
--- /dev/null
+++ b/test/samples/w3c/tests/test405.scxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the executable content in the transitions is executed in document order after
+the states are exited. event1, event2, event3, event4 should be raised in that order when the
+state machine is entered --><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" initial="s01p">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+<parallel id="s01p">
+ <transition event="event1" target="s02"/>
+
+
+ <state id="s01p1" initial="s01p11">
+ <state id="s01p11">
+ <onexit>
+ <!-- this should be the second event raised -->
+ <raise event="event2"/>
+ </onexit>
+ <transition target="s01p12">
+ <!-- this should be the third event raised -->
+ <raise event="event3"/>
+ </transition>
+ </state>
+ <state id="s01p12"/>
+ </state> <!-- end s01p1 -->
+
+ <state id="s01p2" initial="s01p21">
+ <state id="s01p21">
+ <onexit>
+ <!-- this should be the first event raised -->
+ <raise event="event1"/>
+ </onexit>
+ <transition target="s01p22">
+ <!-- this should be the fourth event raised -->
+ <raise event="event4"/>
+ </transition>
+ </state>
+ <state id="s01p22"/>
+
+ </state> <!-- end s01p2 -->
+ </parallel>
+
+
+ <state id="s02">
+ <transition event="event2" target="s03"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s03">
+ <transition event="event3" target="s04"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+
+ <state id="s04">
+ <transition event="event4" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ </state> <!-- end s01 -->
+
+
+<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/samples/w3c/tests/test406.scxml b/test/samples/w3c/tests/test406.scxml
new file mode 100644
index 0000000..a8f8f99
--- /dev/null
+++ b/test/samples/w3c/tests/test406.scxml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- Test that states are entered in entry order (parents before children with document order used to break ties)
+after the executable content in the transition is executed. event1, event2, event3, event4 should be raised in that
+order when the transition in s01 is taken --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="ecmascript">
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <state id="s01">
+ <transition target="s0p2">
+ <!-- this should be the first event raised -->
+ <raise event="event1"/>
+ </transition>
+ </state>
+
+<parallel id="s0p2">
+
+ <transition event="event1" target="s03"/>
+
+ <state id="s01p21">
+ <onentry>
+ <!-- third event -->
+ <raise event="event3"/>
+ </onentry>
+ </state>
+
+ <state id="s01p22">
+ <onentry>
+ <!-- the fourth event -->
+ <raise event="event4"/>
+ </onentry>
+ </state>
+
+ <onentry>
+ <!-- this should be the second event raised -->
+ <raise event="event2"/>
+ </onentry>
+ </parallel>
+
+
+ <state id="s03">
+ <transition event="event2" target="s04"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s04">
+ <transition event="event3" target="s05"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+
+ <state id="s05">
+ <transition event="event4" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ </state> <!-- end s0 -->
+
+
+<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/samples/w3c/tests/test407.scxml b/test/samples/w3c/tests/test407.scxml
new file mode 100644
index 0000000..0407c99
--- /dev/null
+++ b/test/samples/w3c/tests/test407.scxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- a simple test that onexit handlers work. var1 should be incremented when we leave s0 --><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">
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ <transition target="s1"/>
+</state>
+
+<state id="s1">
+ <transition cond="Var1==1" 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/samples/w3c/tests/test409.scxml b/test/samples/w3c/tests/test409.scxml
new file mode 100644
index 0000000..9b4f1aa
--- /dev/null
+++ b/test/samples/w3c/tests/test409.scxml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that states are removed from the active states list as they are exited. When s01's onexit handler
+fires, s011 should not be on the active state list, so in(S011) should be false, and event1 should not
+be raised. Therefore the timeout should fire to indicate success --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
+ <transition event="timeout" target="pass"/>
+ <transition event="event1" target="fail"/>
+
+ <state id="s01" initial="s011">
+ <onexit>
+ <if cond="In('s011')">
+ <raise event="event1"/>
+ </if>
+ </onexit>
+
+ <state id="s011">
+ <transition target="s02"/>
+ </state>
+ </state> <!-- end s01 -->
+
+<state id="s02"/>
+
+</state> <!-- end s0 -->
+
+<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/samples/w3c/tests/test411.scxml b/test/samples/w3c/tests/test411.scxml
new file mode 100644
index 0000000..8e1c673
--- /dev/null
+++ b/test/samples/w3c/tests/test411.scxml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that states are added to the active states list as they are entered and before onentry handlers
+are executed. When s0's onentry handler fires we should not be in s01. But when s01's onentry handler
+fires, we should be in s01. Therefore event1 should not fire, but event2 should. Either event1 or
+timeout also indicates failure --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ <if cond="In('s01')">
+ <raise event="event1"/>
+ </if>
+ </onentry>
+
+ <transition event="timeout" target="fail"/>
+ <transition event="event1" target="fail"/>
+ <transition event="event2" target="pass"/>
+
+ <state id="s01">
+ <onentry>
+ <if cond="In('s01')">
+ <raise event="event2"/>
+ </if>
+ </onentry>
+ </state>
+
+</state> <!-- end s0 -->
+
+<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/samples/w3c/tests/test412.scxml b/test/samples/w3c/tests/test412.scxml
new file mode 100644
index 0000000..4a8b26a
--- /dev/null
+++ b/test/samples/w3c/tests/test412.scxml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that executable content in the <initial> transition executes after the onentry handler on the state
+and before the onentry handler of the child states. Event1, event2, and event3 should occur in that order. --><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" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
+ <transition event="timeout" target="fail"/>
+ <transition event="event1" target="fail"/>
+ <transition event="event2" target="pass"/>
+
+ <state id="s01">
+ <onentry>
+ <raise event="event1"/>
+ </onentry>
+ <initial>
+ <transition target="s011">
+ <raise event="event2"/>
+ </transition>
+ </initial>
+
+ <state id="s011">
+ <onentry>
+ <raise event="event3"/>
+ </onentry>
+ <transition target="s02"/>
+ </state>
+ </state>
+
+<state id="s02">
+ <transition event="event1" target="s03"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s03">
+ <transition event="event2" target="s04"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s04">
+ <transition event="event3" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+</state> <!-- end s0 -->
+
+<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/samples/w3c/tests/test413.scxml b/test/samples/w3c/tests/test413.scxml
new file mode 100644
index 0000000..94e32a2
--- /dev/null
+++ b/test/samples/w3c/tests/test413.scxml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the state machine is put into the configuration specified by the initial element, without regard
+to any other defaults. we should start off in s2p111 and s2p122. the atomic
+states we should not enter all have immediate transitions to failure in them --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s2p112 s2p122" version="1.0" datamodel="ecmascript">
+
+ <state id="s1">
+ <transition target="fail"/>
+ </state>
+
+<state id="s2" initial="s2p1">
+
+<parallel id="s2p1">
+ <!-- this transition will be triggered only if we end up in an illegal configuration where we're in
+ either s2p112 or s2p122, but not both of them -->
+ <transition target="fail"/>
+
+ <state id="s2p11" initial="s2p111">
+ <state id="s2p111">
+ <transition target="fail"/>
+ </state>
+
+ <state id="s2p112">
+ <transition cond="In('s2p122')" target="pass"/>
+ </state>
+
+ </state> <!-- end s2p11 -->
+
+ <state id="s2p12" initial="s2p121">
+ <state id="s2p121">
+ <transition target="fail"/>
+ </state>
+
+ <state id="s2p122">
+ <transition cond="In('s2p112')" target="pass"/>
+ </state>
+ </state>
+
+</parallel>
+
+</state> <!-- end s2 -->
+
+
+<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/samples/w3c/tests/test416.scxml b/test/samples/w3c/tests/test416.scxml
new file mode 100644
index 0000000..45799e4
--- /dev/null
+++ b/test/samples/w3c/tests/test416.scxml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the done.state.id gets generated when we enter the final state of a compound state --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s1" datamodel="ecmascript">
+
+ <state id="s1" initial="s11">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <state id="s11" initial="s111">
+ <transition event="done.state.s11" target="pass"/>
+ <state id="s111">
+ <transition target="s11final"/>
+ </state>
+ <final id="s11final"/>
+ </state>
+ </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/samples/w3c/tests/test417.scxml b/test/samples/w3c/tests/test417.scxml
new file mode 100644
index 0000000..5ca6144
--- /dev/null
+++ b/test/samples/w3c/tests/test417.scxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that we get the done.state.id event when all of a
+parallel elements children enter final states. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s1" datamodel="ecmascript">
+
+ <state id="s1" initial="s1p1">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+
+ <parallel id="s1p1">
+ <transition event="done.state.s1p1" target="pass"/>
+
+ <state id="s1p11" initial="s1p111">
+ <state id="s1p111">
+ <transition target="s1p11final"/>
+ </state>
+ <final id="s1p11final"/>
+ </state>
+
+ <state id="s1p12" initial="s1p121">
+ <state id="s1p121">
+ <transition target="s1p12final"/>
+ </state>
+ <final id="s1p12final"/>
+ </state>
+
+ </parallel>
+</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/samples/w3c/tests/test419.scxml b/test/samples/w3c/tests/test419.scxml
new file mode 100644
index 0000000..c4de17e
--- /dev/null
+++ b/test/samples/w3c/tests/test419.scxml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that eventless transitions take precedence over event-driven ones --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s1" datamodel="ecmascript">
+
+ <state id="s1">
+ <onentry>
+ <raise event="internalEvent"/>
+ <send event="externalEvent"/>
+ </onentry>
+
+ <transition event="*" 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/samples/w3c/tests/test421.scxml b/test/samples/w3c/tests/test421.scxml
new file mode 100644
index 0000000..1747334
--- /dev/null
+++ b/test/samples/w3c/tests/test421.scxml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that internal events take priority over external ones, and that the processor
+keeps pulling off internal events until it finds one that triggers a transition --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s1" datamodel="ecmascript">
+
+ <state id="s1" initial="s11">
+ <onentry>
+ <send event="externalEvent"/>
+ <raise event="internalEvent1"/>
+ <raise event="internalEvent2"/>
+ <raise event="internalEvent3"/>
+ <raise event="internalEvent4"/>
+ </onentry>
+
+ <transition event="externalEvent" target="fail"/>
+
+ <state id="s11">
+ <transition event="internalEvent3" target="s12"/>
+ </state>
+
+ <state id="s12">
+ <transition event="internalEvent4" target="pass"/>
+ </state>
+
+</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/samples/w3c/tests/test422.scxml b/test/samples/w3c/tests/test422.scxml
new file mode 100644
index 0000000..803f75f
--- /dev/null
+++ b/test/samples/w3c/tests/test422.scxml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- Test that at the end of a macrostep, the processor executes all invokes in states
+that have been entered and not exited during the step. (The invokes are supposed to be executed
+in document order, but we can test that since each invocation is separate and they may take
+different amounts to time to start up.) In this case, there are three invoke statements,
+in states s1, s11 and s12. Each invoked process returns an event named after its parent state.
+The invokes in s1 and s12 should execute, but not the one
+in s11. So we should receive invokeS1, invokeS12, but not invokeS12. Furthermore, when the timeout fires, var1 should equal 2.--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s1" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="s1" initial="s11">
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ </onentry>
+ <transition event="invokeS1 invokeS12">
+ <assign location="Var1" expr="Var1 + 1"/>
+ </transition>
+ <transition event="invokeS11" target="fail"/>
+
+ <transition event="timeout" cond="Var1==2" target="pass"/>
+ <transition event="timeout" target="fail"/>
+ <invoke>
+ <content>
+ <!-- when invoked, send 'foo' to parent, then terminate. -->
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
+ <onentry>
+ <send target="#_parent" event="invokeS1"/>
+ </onentry>
+ <transition target="subFinal0"/>
+ </state>
+ <final id="subFinal0"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <state id="s11">
+ <invoke>
+ <content>
+ <!-- when invoked, send 'foo' to parent, then terminate. -->
+ <scxml initial="sub1" version="1.0" datamodel="ecmascript">
+ <state id="sub1">
+ <onentry>
+ <send target="#_parent" event="invokeS11"/>
+ </onentry>
+ <transition target="subFinal1"/>
+ </state>
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition target="s12"/>
+ </state>
+ <state id="s12">
+ <invoke>
+ <content>
+ <!-- when invoked, send 'foo' to parent, then terminate. -->
+ <scxml initial="sub2" version="1.0" datamodel="ecmascript">
+ <state id="sub2">
+ <onentry>
+ <send target="#_parent" event="invokeS12"/>
+ </onentry>
+ <transition target="subFinal2"/>
+ </state>
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+ </state>
+ </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/samples/w3c/tests/test423.scxml b/test/samples/w3c/tests/test423.scxml
new file mode 100644
index 0000000..f6287ab
--- /dev/null
+++ b/test/samples/w3c/tests/test423.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that we keep pulling external events off the queue till we find one that matches a transition. --><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="externalEvent1"/>
+ <send event="externalEvent2" delay="1s"/>
+ <raise event="internalEvent"/>
+ </onentry>
+ <!-- in this state we should process only internalEvent -->
+ <transition event="internalEvent" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+
+ <state id="s1">
+ <!-- in this state we ignore externalEvent1 and wait for externalEvent2 -->
+ <transition event="externalEvent2" target="pass"/>
+ <transition event="internalEvent" 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/samples/w3c/tests/test436.scxml b/test/samples/w3c/tests/test436.scxml
new file mode 100644
index 0000000..d8b2ca2
--- /dev/null
+++ b/test/samples/w3c/tests/test436.scxml
@@ -0,0 +1,21 @@
+<?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="'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/samples/w3c/tests/test441a.scxml b/test/samples/w3c/tests/test441a.scxml
new file mode 100644
index 0000000..31ed3b2
--- /dev/null
+++ b/test/samples/w3c/tests/test441a.scxml
@@ -0,0 +1,44 @@
+<?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" datamodel="null" version="1.0" exmode="lax" initial="s01">
+
+<!-- since exmode=lax, the processor should ignore all datamodel elements and complete without an error -->
+<datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="foo" expr="2"/>
+ <script>
+ x = y
+ </script>
+ <foreach array="baz" item="bat">
+ <log expr="this is a mistake"/>
+ </foreach>
+ </onentry>
+
+ <state id="s01" initial="s01final">
+ <final id="s01final">
+ <donedata>
+ <param name="result" expr="foo"/>
+ </donedata>
+ </final>
+ </state>
+
+ <transition cond="Var1==1" target="fail"/>
+ <transition event="error" target="fail"/>
+ <transition event="done" target="s1"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+ <raise event="noerror"/>
+ </onentry>
+ <transition event="error" target="fail"/>
+ <transition event="noerror" 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/samples/w3c/tests/test441b.scxml b/test/samples/w3c/tests/test441b.scxml
new file mode 100644
index 0000000..1a35eba
--- /dev/null
+++ b/test/samples/w3c/tests/test441b.scxml
@@ -0,0 +1,44 @@
+<?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" datamodel="null" version="1.0" exmode="strict" initial="s01">
+
+<!-- since exmode=strict, the processor should reject this document. Therefore this is a manual test -->
+<datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="foo" expr="2"/>
+ <script>
+ x = y
+ </script>
+ <foreach array="baz" item="bat">
+ <log expr="this is a mistake"/>
+ </foreach>
+ </onentry>
+
+
+ <state id="s01" initial="s01final">
+ <final id="s01final">
+ <donedata>
+ <param name="result" expr="foo"/>
+ </donedata>
+ </final>
+ </state>
+
+ <transition target="fail"/>
+
+ </state>
+
+<state id="s1">
+ <onentry>
+ <raise event="noerror"/>
+ </onentry>
+ <transition event="error" target="fail"/>
+ <transition event="noerror" 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/samples/w3c/tests/test444.scxml b/test/samples/w3c/tests/test444.scxml
new file mode 100644
index 0000000..c689674
--- /dev/null
+++ b/test/samples/w3c/tests/test444.scxml
@@ -0,0 +1,16 @@
+<?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="'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/samples/w3c/tests/test445.scxml b/test/samples/w3c/tests/test445.scxml
new file mode 100644
index 0000000..f1ae24b
--- /dev/null
+++ b/test/samples/w3c/tests/test445.scxml
@@ -0,0 +1,16 @@
+<?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="'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/samples/w3c/tests/test448.scxml b/test/samples/w3c/tests/test448.scxml
new file mode 100644
index 0000000..adbc121
--- /dev/null
+++ b/test/samples/w3c/tests/test448.scxml
@@ -0,0 +1,31 @@
+<?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="'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/samples/w3c/tests/test449.scxml b/test/samples/w3c/tests/test449.scxml
new file mode 100644
index 0000000..d06cc9a
--- /dev/null
+++ b/test/samples/w3c/tests/test449.scxml
@@ -0,0 +1,11 @@
+<?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="'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/samples/w3c/tests/test451.scxml b/test/samples/w3c/tests/test451.scxml
new file mode 100644
index 0000000..e939ded
--- /dev/null
+++ b/test/samples/w3c/tests/test451.scxml
@@ -0,0 +1,18 @@
+<?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="'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/samples/w3c/tests/test452.scxml b/test/samples/w3c/tests/test452.scxml
new file mode 100644
index 0000000..4f38ca7
--- /dev/null
+++ b/test/samples/w3c/tests/test452.scxml
@@ -0,0 +1,24 @@
+<?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="'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/samples/w3c/tests/test453.scxml b/test/samples/w3c/tests/test453.scxml
new file mode 100644
index 0000000..33b904d
--- /dev/null
+++ b/test/samples/w3c/tests/test453.scxml
@@ -0,0 +1,19 @@
+<?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="'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/samples/w3c/tests/test456.scxml b/test/samples/w3c/tests/test456.scxml
new file mode 100644
index 0000000..35925e4
--- /dev/null
+++ b/test/samples/w3c/tests/test456.scxml
@@ -0,0 +1,19 @@
+<?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"/>
+ </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="'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/samples/w3c/tests/test457.scxml b/test/samples/w3c/tests/test457.scxml
new file mode 100644
index 0000000..86cf156
--- /dev/null
+++ b/test/samples/w3c/tests/test457.scxml
@@ -0,0 +1,59 @@
+<?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> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test460.scxml b/test/samples/w3c/tests/test460.scxml
new file mode 100644
index 0000000..8ba3e5e
--- /dev/null
+++ b/test/samples/w3c/tests/test460.scxml
@@ -0,0 +1,24 @@
+<?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> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test463.scxml b/test/samples/w3c/tests/test463.scxml
new file mode 100644
index 0000000..4f32b84
--- /dev/null
+++ b/test/samples/w3c/tests/test463.scxml
@@ -0,0 +1,17 @@
+<?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="'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/samples/w3c/tests/test464.scxml b/test/samples/w3c/tests/test464.scxml
new file mode 100644
index 0000000..bd640f2
--- /dev/null
+++ b/test/samples/w3c/tests/test464.scxml
@@ -0,0 +1,16 @@
+<?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="'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/samples/w3c/tests/test465.scxml b/test/samples/w3c/tests/test465.scxml
new file mode 100644
index 0000000..a91bb06
--- /dev/null
+++ b/test/samples/w3c/tests/test465.scxml
@@ -0,0 +1,22 @@
+<?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="'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/samples/w3c/tests/test466.scxml b/test/samples/w3c/tests/test466.scxml
new file mode 100644
index 0000000..1431fab
--- /dev/null
+++ b/test/samples/w3c/tests/test466.scxml
@@ -0,0 +1,14 @@
+<?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="'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/samples/w3c/tests/test467.scxml b/test/samples/w3c/tests/test467.scxml
new file mode 100644
index 0000000..130b7bc
--- /dev/null
+++ b/test/samples/w3c/tests/test467.scxml
@@ -0,0 +1,12 @@
+<?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="'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/samples/w3c/tests/test468.scxml b/test/samples/w3c/tests/test468.scxml
new file mode 100644
index 0000000..3b6902d
--- /dev/null
+++ b/test/samples/w3c/tests/test468.scxml
@@ -0,0 +1,23 @@
+<?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="'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/samples/w3c/tests/test469.scxml b/test/samples/w3c/tests/test469.scxml
new file mode 100644
index 0000000..02fe476
--- /dev/null
+++ b/test/samples/w3c/tests/test469.scxml
@@ -0,0 +1,25 @@
+<?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="'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/samples/w3c/tests/test470.scxml b/test/samples/w3c/tests/test470.scxml
new file mode 100644
index 0000000..3c26bb1
--- /dev/null
+++ b/test/samples/w3c/tests/test470.scxml
@@ -0,0 +1,24 @@
+<?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="'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/samples/w3c/tests/test473.scxml b/test/samples/w3c/tests/test473.scxml
new file mode 100644
index 0000000..4a57129
--- /dev/null
+++ b/test/samples/w3c/tests/test473.scxml
@@ -0,0 +1,37 @@
+<?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="'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/samples/w3c/tests/test474.scxml b/test/samples/w3c/tests/test474.scxml
new file mode 100644
index 0000000..decad75
--- /dev/null
+++ b/test/samples/w3c/tests/test474.scxml
@@ -0,0 +1,36 @@
+<?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="'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/samples/w3c/tests/test475.scxml b/test/samples/w3c/tests/test475.scxml
new file mode 100644
index 0000000..0f9cdfe
--- /dev/null
+++ b/test/samples/w3c/tests/test475.scxml
@@ -0,0 +1,36 @@
+<?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="'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/samples/w3c/tests/test476.scxml b/test/samples/w3c/tests/test476.scxml
new file mode 100644
index 0000000..d3fe8e8
--- /dev/null
+++ b/test/samples/w3c/tests/test476.scxml
@@ -0,0 +1,36 @@
+<?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="'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/samples/w3c/tests/test477.scxml b/test/samples/w3c/tests/test477.scxml
new file mode 100644
index 0000000..1726866
--- /dev/null
+++ b/test/samples/w3c/tests/test477.scxml
@@ -0,0 +1,36 @@
+<?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="'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/samples/w3c/tests/test478.scxml b/test/samples/w3c/tests/test478.scxml
new file mode 100644
index 0000000..9821608
--- /dev/null
+++ b/test/samples/w3c/tests/test478.scxml
@@ -0,0 +1,36 @@
+<?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="'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/samples/w3c/tests/test479.scxml b/test/samples/w3c/tests/test479.scxml
new file mode 100644
index 0000000..3d5b1ac
--- /dev/null
+++ b/test/samples/w3c/tests/test479.scxml
@@ -0,0 +1,36 @@
+<?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="'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/samples/w3c/tests/test480.scxml b/test/samples/w3c/tests/test480.scxml
new file mode 100644
index 0000000..0fde260
--- /dev/null
+++ b/test/samples/w3c/tests/test480.scxml
@@ -0,0 +1,32 @@
+<?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="'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/samples/w3c/tests/test481.scxml b/test/samples/w3c/tests/test481.scxml
new file mode 100644
index 0000000..a0505f6
--- /dev/null
+++ b/test/samples/w3c/tests/test481.scxml
@@ -0,0 +1,37 @@
+<?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="'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/samples/w3c/tests/test482.scxml b/test/samples/w3c/tests/test482.scxml
new file mode 100644
index 0000000..00eb3fe
--- /dev/null
+++ b/test/samples/w3c/tests/test482.scxml
@@ -0,0 +1,16 @@
+<?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="'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/samples/w3c/tests/test486b.scxml b/test/samples/w3c/tests/test486b.scxml
new file mode 100644
index 0000000..c6cf7be
--- /dev/null
+++ b/test/samples/w3c/tests/test486b.scxml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that <script> is processed according to 'exmode'. In this
+ case, the entire file should be rejected (hence this is a manual test --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" exmode="strict" initial="s0" version="1.0" datamodel="xpath">
+ <script>some script</script>
+
+<state id="s0">
+
+ <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/samples/w3c/tests/test487.scxml b/test/samples/w3c/tests/test487.scxml
new file mode 100644
index 0000000..30a50eb
--- /dev/null
+++ b/test/samples/w3c/tests/test487.scxml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test illegal assignment. error.execution should be raised. --><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="return"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <raise event="event"/>
+ </onentry>
+
+ <transition event="error.execution" 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/samples/w3c/tests/test488.scxml b/test/samples/w3c/tests/test488.scxml
new file mode 100644
index 0000000..45e775c
--- /dev/null
+++ b/test/samples/w3c/tests/test488.scxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that illegal expr in <param> produces error.execution and empty event.data --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+
+ <state id="s0" initial="s01">
+ <!-- we should get the error before the done event -->
+ <transition event="error.execution" target="s1"/>
+ <transition event="done.state.s0" target="fail"/>
+
+ <transition event="done.state.s0" target="fail">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param expr="return" name="someParam"/>
+ </donedata>
+ </final>
+ </state>
+
+
+ <!-- if we get here, we received the error event. Now check that the done
+ event has empty event.data -->
+
+ <state id="s1">
+ <transition event="done.state.s0" cond="_event.data === ''" 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/samples/w3c/tests/test503.scxml b/test/samples/w3c/tests/test503.scxml
new file mode 100644
index 0000000..6e1ab2b
--- /dev/null
+++ b/test/samples/w3c/tests/test503.scxml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that a targetless transition does not exit and reenter its source state --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s1" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/> <!-- how often we have exited s2 -->
+ <data id="Var2" expr="0"/> <!-- how often the targetless transition in s2 has been executed -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition target="s2"/>
+ </state>
+
+ <state id="s2">
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ <transition event="foo">
+ <assign location="Var2" expr="Var2 + 1"/>
+ </transition>
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" cond="Var2==1" target="s3"/>
+ <transition event="bar" target="fail"/>
+ </state>
+
+ <state id="s3">
+ <!-- make sure that s2 was exited only once -->
+ <transition cond="Var1==1" 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/samples/w3c/tests/test504.scxml b/test/samples/w3c/tests/test504.scxml
new file mode 100644
index 0000000..6e2679b
--- /dev/null
+++ b/test/samples/w3c/tests/test504.scxml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that an external transition exits all states up the the LCCA --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s1" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/> <!-- how often we have exited p -->
+ <data id="Var2" expr="0"/> <!-- how often we have exited ps1 -->
+ <data id="Var3" expr="0"/> <!-- how often we have exited ps2 -->
+ <data id="Var4" expr="0"/> <!-- how often the transition for foo has been taken -->
+ <data id="Var5" expr="0"/> <!-- how often we have exited s2 -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition target="p"/>
+ </state>
+
+<state id="s2">
+ <onexit>
+ <assign location="Var5" expr="Var5 + 1"/>
+ </onexit>
+
+<parallel id="p">
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ <transition event="foo" target="ps1">
+ <assign location="Var4" expr="Var4 + 1"/>
+ </transition>
+
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" cond="Var4==1" target="s3"/>
+ <transition event="bar" target="fail"/>
+
+ <state id="ps1">
+ <onexit>
+ <assign location="Var2" expr="Var2 + 1"/>
+ </onexit>
+ </state>
+ <state id="ps2">
+ <onexit>
+ <assign location="Var3" expr="Var3 + 1"/>
+ </onexit>
+ </state>
+</parallel>
+</state>
+
+<state id="s3">
+ <!-- make sure that p was exited twice -->
+ <transition cond="Var1==2" target="s4"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s4">
+ <!-- make sure that ps1 was exited twice -->
+ <transition cond="Var2==2" target="s5"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s5">
+ <!-- make sure that ps2 was exited twice -->
+ <transition cond="Var3==2" target="s6"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s6">
+ <!-- make sure that s1 was exited once -->
+ <transition cond="Var5==1" 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/samples/w3c/tests/test505.scxml b/test/samples/w3c/tests/test505.scxml
new file mode 100644
index 0000000..01d326b
--- /dev/null
+++ b/test/samples/w3c/tests/test505.scxml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that an internal transition does not exit its source state --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s1" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/> <!-- how often we have exited s1 -->
+ <data id="Var2" expr="0"/> <!-- how often we have exited s11 -->
+ <data id="Var3" expr="0"/> <!-- how often the transition for foo has been taken -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ <transition event="foo" type="internal" target="s11">
+ <assign location="Var3" expr="Var3 + 1"/>
+ </transition>
+
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" cond="Var3==1" target="s2"/>
+ <transition event="bar" target="fail"/>
+
+ <state id="s11">
+ <onexit>
+ <assign location="Var2" expr="Var2 + 1"/>
+ </onexit>
+ </state>
+ </state>
+
+<state id="s2">
+ <!-- make sure that s1 was exited once -->
+ <transition cond="Var1==1" target="s3"/>
+ <transition target="fail"/>
+ </state>
+
+
+<state id="s3">
+ <!-- make sure that s11 was exited twice -->
+ <transition cond="Var2==2" 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/samples/w3c/tests/test506.scxml b/test/samples/w3c/tests/test506.scxml
new file mode 100644
index 0000000..1a7a1da
--- /dev/null
+++ b/test/samples/w3c/tests/test506.scxml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that an internal transition whose targets are not proper descendants of its source state
+behaves like an external transition --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s1" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/> <!-- how often we have exited s2 -->
+ <data id="Var2" expr="0"/> <!-- how often we have exited s21 -->
+ <data id="Var3" expr="0"/> <!-- how often the transition for foo has been taken -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition target="s2"/>
+ </state>
+
+<state id="s2" initial="s21">
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ <transition event="foo" type="internal" target="s2">
+ <assign location="Var3" expr="Var3 + 1"/>
+ </transition>
+
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" cond="Var3==1" target="s3"/>
+ <transition event="bar" target="fail"/>
+
+ <state id="s21">
+ <onexit>
+ <assign location="Var2" expr="Var2 + 1"/>
+ </onexit>
+ </state>
+
+</state>
+
+<state id="s3">
+ <!-- make sure that s2 was exited twice -->
+ <transition cond="Var1==2" target="s4"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s4">
+ <!-- make sure that s21 was exited twice -->
+ <transition cond="Var2==2" 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/samples/w3c/tests/test521.scxml b/test/samples/w3c/tests/test521.scxml
new file mode 100644
index 0000000..e4b00d8
--- /dev/null
+++ b/test/samples/w3c/tests/test521.scxml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that the processor raises error.communication if it cannot dispatch the event.
+(To create an undispatchable event, we choose a non-existent session as target). If it raises
+the error event, we succeed. Otherwise we eventually timeout and fail. --><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">
+
+
+<state id="s0">
+ <onentry>
+ <!-- should cause an error -->
+ <send target="#_scxml_foo" event="event2"/>
+ <!-- this will get added to the external event queue after the error has been raised -->
+ <send event="timeout"/>
+ </onentry>
+
+ <!-- once we've entered the state, we should check for internal events first -->
+ <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/samples/w3c/tests/test525.scxml b/test/samples/w3c/tests/test525.scxml
new file mode 100644
index 0000000..432e760
--- /dev/null
+++ b/test/samples/w3c/tests/test525.scxml
@@ -0,0 +1,26 @@
+<?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">
+ [1,2,3]
+ </data>
+ <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> \ No newline at end of file
diff --git a/test/samples/w3c/tests/test527.scxml b/test/samples/w3c/tests/test527.scxml
new file mode 100644
index 0000000..426cc6c
--- /dev/null
+++ b/test/samples/w3c/tests/test527.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- simple test that 'expr' works with <content> --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+
+ <state id="s0" initial="s01">
+
+ <transition event="done.state.s0" cond="_event.data === 'foo'" target="pass">
+ </transition>
+
+ <transition event="done.state.s0" target="fail">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <content expr="'foo'"/>
+ </donedata>
+ </final>
+ </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/samples/w3c/tests/test528.scxml b/test/samples/w3c/tests/test528.scxml
new file mode 100644
index 0000000..9f1ebd4
--- /dev/null
+++ b/test/samples/w3c/tests/test528.scxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that illegal 'expr' produces error.execution and empty event.data --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+
+ <state id="s0" initial="s01">
+ <!-- we should get the error before the done event -->
+ <transition event="error.execution" target="s1"/>
+ <transition event="done.state.s0" target="fail"/>
+
+ <transition event="done.state.s0" target="fail">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <content expr="return"/>
+ </donedata>
+ </final>
+ </state>
+
+
+ <!-- if we get here, we received the error event. Now check that the done
+ event has empty event.data -->
+
+ <state id="s1">
+ <transition event="done.state.s0" cond="_event.data == null" 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/samples/w3c/tests/test529.scxml b/test/samples/w3c/tests/test529.scxml
new file mode 100644
index 0000000..91dc002
--- /dev/null
+++ b/test/samples/w3c/tests/test529.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- simple test that children workn with <content> --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+
+
+ <state id="s0" initial="s01">
+
+ <transition event="done.state.s0" cond="_event.data === '21'" target="pass">
+ </transition>
+
+ <transition event="done.state.s0" target="fail">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <content>21</content>
+ </donedata>
+ </final>
+ </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/samples/w3c/tests/test530.scxml b/test/samples/w3c/tests/test530.scxml
new file mode 100644
index 0000000..9361181
--- /dev/null
+++ b/test/samples/w3c/tests/test530.scxml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that <content> child is evaluated when <invoke> is. Var1 is initialized
+with an integer value, then set to an scxml script in the onentry to s0. If <content>
+is evaluated at the right time, we should get invoke.done, otherwise an error --><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="1"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <assign location="Var1">
+ <scxml version="1.0"><final/></scxml>
+ </assign>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content expr="Var1"/>
+ </invoke>
+
+ <transition event="done.invoke" 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/samples/w3c/tests/test533.scxml b/test/samples/w3c/tests/test533.scxml
new file mode 100644
index 0000000..a4550e3
--- /dev/null
+++ b/test/samples/w3c/tests/test533.scxml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that an internal transition whose source state is not compound does exit its source state --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s1" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/> <!-- how often we have exited p -->
+ <data id="Var2" expr="0"/> <!-- how often we have exited ps1 -->
+ <data id="Var3" expr="0"/> <!-- how often we have exited ps2 -->
+ <data id="Var4" expr="0"/> <!-- how often the transition for foo has been taken -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition target="p"/>
+ </state>
+
+<parallel id="p">
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ <transition event="foo" type="internal" target="ps1">
+ <assign location="Var4" expr="Var4 + 1"/>
+ </transition>
+
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" cond="Var4==1" target="s2"/>
+ <transition event="bar" target="fail"/>
+
+ <state id="ps1">
+ <onexit>
+ <assign location="Var2" expr="Var2 + 1"/>
+ </onexit>
+ </state>
+ <state id="ps2">
+ <onexit>
+ <assign location="Var3" expr="Var3 + 1"/>
+ </onexit>
+ </state>
+</parallel>
+
+<state id="s2">
+ <!-- make sure that p was exited twice -->
+ <transition cond="Var1==2" target="s3"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s3">
+ <!-- make sure that ps1 was exited twice -->
+ <transition cond="Var2==2" target="s4"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s4">
+ <!-- make sure that ps2 was exited twice -->
+ <transition cond="Var3==2" 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/samples/w3c/tests/test537.scxml b/test/samples/w3c/tests/test537.scxml
new file mode 100644
index 0000000..350d422
--- /dev/null
+++ b/test/samples/w3c/tests/test537.scxml
@@ -0,0 +1,17 @@
+<?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="'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/samples/w3c/tests/test539.scxml b/test/samples/w3c/tests/test539.scxml
new file mode 100644
index 0000000..450bfd9
--- /dev/null
+++ b/test/samples/w3c/tests/test539.scxml
@@ -0,0 +1,26 @@
+<?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="'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/samples/w3c/tests/test540.scxml b/test/samples/w3c/tests/test540.scxml
new file mode 100644
index 0000000..641509f
--- /dev/null
+++ b/test/samples/w3c/tests/test540.scxml
@@ -0,0 +1,21 @@
+<?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="'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/samples/w3c/tests/test542.scxml b/test/samples/w3c/tests/test542.scxml
new file mode 100644
index 0000000..1101471
--- /dev/null
+++ b/test/samples/w3c/tests/test542.scxml
@@ -0,0 +1,34 @@
+<?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="'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/samples/w3c/tests/test544.scxml b/test/samples/w3c/tests/test544.scxml
new file mode 100644
index 0000000..fd09502
--- /dev/null
+++ b/test/samples/w3c/tests/test544.scxml
@@ -0,0 +1,17 @@
+<?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="'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/samples/w3c/tests/test546.scxml b/test/samples/w3c/tests/test546.scxml
new file mode 100644
index 0000000..728843b
--- /dev/null
+++ b/test/samples/w3c/tests/test546.scxml
@@ -0,0 +1,17 @@
+<?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="'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/samples/w3c/tests/test547.scxml b/test/samples/w3c/tests/test547.scxml
new file mode 100644
index 0000000..8c04c95
--- /dev/null
+++ b/test/samples/w3c/tests/test547.scxml
@@ -0,0 +1,33 @@
+<?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="'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/samples/w3c/tests/test550.scxml b/test/samples/w3c/tests/test550.scxml
new file mode 100644
index 0000000..0ca4c1a
--- /dev/null
+++ b/test/samples/w3c/tests/test550.scxml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that expr can be used to assign a value to a var. This test uses early binding --><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" binding="early">
+
+ <state id="s0">
+
+ <transition cond="Var1==2" target="pass"/>
+ <transition target="fail"/>
+ </state>
+
+ <state id="s1">
+ <datamodel>
+ <data id="Var1" expr="2"/>
+ </datamodel>
+ </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/samples/w3c/tests/test551.scxml b/test/samples/w3c/tests/test551.scxml
new file mode 100644
index 0000000..cd267eb
--- /dev/null
+++ b/test/samples/w3c/tests/test551.scxml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that inline content can be used to assign a value to a var. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" binding="early" datamodel="ecmascript">
+
+
+ <state id="s0">
+
+ <transition cond="Var1" target="pass"/>
+ <transition target="fail"/>
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data id="Var1">
+ [1,2,3]
+ </data>
+ </datamodel>
+ </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/samples/w3c/tests/test552.scxml b/test/samples/w3c/tests/test552.scxml
new file mode 100644
index 0000000..94267c6
--- /dev/null
+++ b/test/samples/w3c/tests/test552.scxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that src content can be used to assign a value to a var. Edit
+test552.txt to have a value that's legal for the datamodel in question --><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" src="file:test552.txt"/>
+ </datamodel>
+
+ <state id="s0">
+
+ <transition cond="Var1" 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/samples/w3c/tests/test553.scxml b/test/samples/w3c/tests/test553.scxml
new file mode 100644
index 0000000..114c4a2
--- /dev/null
+++ b/test/samples/w3c/tests/test553.scxml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- we test that the processor does not dispatch the event if evaluation
+of <send>'s args causes an error.. --><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">
+
+
+<state id="s0">
+ <onentry>
+ <!-- timeout event -->
+ <send event="timeout" delay="3s"/>
+ <!-- include a non-existing var in the namelist -->
+ <send event="event1" namelist="Var2"/>
+ </onentry>
+
+ <!-- if we get the timeout before event1, we assume that event1 hasn't been sent
+ We ignore the error event here because this assertion doesn't mention it -->
+ <transition event="timeout" target="pass"/>
+ <transition event="event1" 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/samples/w3c/tests/test554.scxml b/test/samples/w3c/tests/test554.scxml
new file mode 100644
index 0000000..b328ae9
--- /dev/null
+++ b/test/samples/w3c/tests/test554.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that if the evaluation of <invoke>'s args causes an error, the
+invocation is cancelled. In this test, that means that we don't get done.invoke
+before the timer goes off. --><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="timer" delay="2s"/>
+ </onentry>
+
+ <!-- namelist references an undeclared variable -->
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="Var2">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="ecmascript">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="timer" target="pass"/>
+ <transition event="done.invoke" 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/samples/w3c/tests/test555.scxml b/test/samples/w3c/tests/test555.scxml
new file mode 100644
index 0000000..79dea75
--- /dev/null
+++ b/test/samples/w3c/tests/test555.scxml
@@ -0,0 +1,27 @@
+<?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="'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/samples/w3c/tests/test557.scxml b/test/samples/w3c/tests/test557.scxml
new file mode 100644
index 0000000..6f4eed1
--- /dev/null
+++ b/test/samples/w3c/tests/test557.scxml
@@ -0,0 +1,26 @@
+<?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="'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/samples/w3c/tests/test558.scxml b/test/samples/w3c/tests/test558.scxml
new file mode 100644
index 0000000..a075100
--- /dev/null
+++ b/test/samples/w3c/tests/test558.scxml
@@ -0,0 +1,24 @@
+<?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="'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/samples/w3c/tests/test560.scxml b/test/samples/w3c/tests/test560.scxml
new file mode 100644
index 0000000..d283b1a
--- /dev/null
+++ b/test/samples/w3c/tests/test560.scxml
@@ -0,0 +1,19 @@
+<?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="'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/samples/w3c/tests/test561.scxml b/test/samples/w3c/tests/test561.scxml
new file mode 100644
index 0000000..40f414a
--- /dev/null
+++ b/test/samples/w3c/tests/test561.scxml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that processor creates correct DOM structure in
+ _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="'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/samples/w3c/tests/test562.scxml b/test/samples/w3c/tests/test562.scxml
new file mode 100644
index 0000000..f5997bb
--- /dev/null
+++ b/test/samples/w3c/tests/test562.scxml
@@ -0,0 +1,22 @@
+<?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="'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/samples/w3c/tests/test569.scxml b/test/samples/w3c/tests/test569.scxml
new file mode 100644
index 0000000..832a0c0
--- /dev/null
+++ b/test/samples/w3c/tests/test569.scxml
@@ -0,0 +1,15 @@
+<?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="'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/samples/w3c/tests/test570.scxml b/test/samples/w3c/tests/test570.scxml
new file mode 100644
index 0000000..2f5ccbe
--- /dev/null
+++ b/test/samples/w3c/tests/test570.scxml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that we generate done.state.id when all a parallel state's children are in final states --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="p0" datamodel="ecmascript" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+<parallel id="p0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ <raise event="e1"/>
+ <raise event="e2"/>
+ </onentry>
+ <!-- record that we get the first done event -->
+ <transition event="done.state.p0s1">
+ <assign location="Var1" expr="1"/>
+ </transition>
+ <!-- we should get the second done event before done.state.p0 -->
+ <transition event="done.state.p0s2" target="s1"/>
+ <transition event="timeout" target="fail"/>
+
+
+ <state id="p0s1" initial="p0s11">
+ <state id="p0s11">
+ <transition event="e1" target="p0s1final"/>
+ </state>
+ <final id="p0s1final"/>
+ </state>
+
+ <state id="p0s2" initial="p0s21">
+ <state id="p0s21">
+ <transition event="e2" target="p0s2final"/>
+ </state>
+ <final id="p0s2final"/>
+ </state>
+
+ </parallel>
+
+ <state id="s1">
+ <!-- if we get done.state.p0, success -->
+ <transition event="done.state.p0" cond="Var1==1" 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/samples/w3c/tests/test576.scxml b/test/samples/w3c/tests/test576.scxml
new file mode 100644
index 0000000..2bed2ca
--- /dev/null
+++ b/test/samples/w3c/tests/test576.scxml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that the 'initial' value of scxml is respected. We set the value to deeply nested non-default parallel siblings and
+test that both are entered. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s11p112 s11p122" datamodel="ecmascript" version="1.0">
+
+
+<state id="s0">
+ <transition target="fail"/>
+</state>
+
+<state id="s1">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+ <state id="s11" initial="s111">
+ <state id="s111"/>
+ <parallel id="s11p1">
+ <state id="s11p11" initial="s11p111">
+ <state id="s11p111"/>
+ <state id="s11p112">
+ <onentry>
+ <raise event="In-s11p112"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s11p12" initial="s11p121">
+ <state id="s11p121"/>
+ <state id="s11p122">
+ <transition event="In-s11p112" target="pass"/>
+ </state>
+ </state>
+ </parallel>
+ </state>
+</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/samples/w3c/txml/test144.txml b/test/samples/w3c/txml/test144.txml
new file mode 100644
index 0000000..73e50b0
--- /dev/null
+++ b/test/samples/w3c/txml/test144.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<!-- test that events are inserted into the queue in the order in which they are raised. If
+foo occurs before bar, success, otherwise failure -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition event="foo" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+
+ </state>
+
+<state id="s1">
+ <transition event="bar" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test147.txml b/test/samples/w3c/txml/test147.txml
new file mode 100644
index 0000000..20363a0
--- /dev/null
+++ b/test/samples/w3c/txml/test147.txml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+
+<!-- test that the first clause that evaluates to true - and only that clause - is executed.
+Only one event should be raised, and it should be bar -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <if conf:false="">
+ <raise event="foo"/>
+ <conf:incrementID id="1"/>
+ <elseif conf:true=""/>
+ <raise event="bar"/>
+ <conf:incrementID id="1"/>
+ <else/>
+ <raise event="baz"/>
+ <conf:incrementID id="1"/>
+ </if>
+ <raise event="bat"/>
+ </onentry>
+ <transition event="bar" conf:idVal="1=1" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test148.txml b/test/samples/w3c/txml/test148.txml
new file mode 100644
index 0000000..8d19e56
--- /dev/null
+++ b/test/samples/w3c/txml/test148.txml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+
+<!-- test that the else clause executes if <if> and <elseif> evaluate to false.
+Baz should be the only event generated by the <if>. bat is raised to catch the case where the <else> clause
+fails and baz is not generated, i.e. it makes sure that the test doesn't hang. -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <if conf:false="">
+ <raise event="foo"/>
+ <conf:incrementID id="1"/>
+ <elseif conf:false=""/>
+ <raise event="bar"/>
+ <conf:incrementID id="1"/>
+ <else/>
+ <raise event="baz"/>
+ <conf:incrementID id="1"/>
+ </if>
+ <raise event="bat"/>
+ </onentry>
+ <transition event="baz" conf:idVal="1=1" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test149.txml b/test/samples/w3c/txml/test149.txml
new file mode 100644
index 0000000..c971eea
--- /dev/null
+++ b/test/samples/w3c/txml/test149.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- test that neither if clause executes, so that bat is the only event raised. -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <if conf:false="">
+ <raise event="foo"/>
+ <conf:incrementID id="1"/>
+ <elseif conf:false=""/>
+ <raise event="bar"/>
+ <conf:incrementID id="1"/>
+ </if>
+ <raise event="bat"/>
+ </onentry>
+ <transition event="bat" conf:idVal="1=0" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test150.txml b/test/samples/w3c/txml/test150.txml
new file mode 100644
index 0000000..ff290dd
--- /dev/null
+++ b/test/samples/w3c/txml/test150.txml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<!-- test that foreach causes a new variable to be declared if 'item' doesn't already exist. Also
+test that it will use an existing var if it does exist. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+ <data conf:id="2"/>
+ <data conf:id="3">
+ <conf:array123/>
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+<!-- first use declared variables -->
+ <foreach conf:item="1" conf:index="2" conf:arrayVar="3"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error" conf:targetfail=""/>
+ <transition event="*" target="s1"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+<!-- now use undeclared variables -->
+ <foreach conf:item="4" conf:index="5" conf:arrayVar="3"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition event="error" conf:targetfail=""/>
+ <transition event="*" target="s2"/>
+ </state>
+
+<state id="s2">
+ <!-- check that var4 is bound -->
+ <transition conf:isBound="4" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test151.txml b/test/samples/w3c/txml/test151.txml
new file mode 100644
index 0000000..6f95692
--- /dev/null
+++ b/test/samples/w3c/txml/test151.txml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<!-- test that foreach causes a new variable to be declared if 'item' doesn't already exist. Also
+test that it will use an existing var if it does exist. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+ <data conf:id="2"/>
+ <data conf:id="3">
+ <conf:array123/>
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+<!-- first use declared variables -->
+ <foreach conf:item="1" conf:index="2" conf:arrayVar="3"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error" conf:targetfail=""/>
+ <transition event="*" target="s1"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+<!-- now use undeclared variables -->
+ <foreach conf:item="4" conf:index="5" conf:arrayVar="3"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition event="error" conf:targetfail=""/>
+ <transition event="*" target="s2"/>
+ </state>
+
+<state id="s2">
+ <!-- check that var5 is bound -->
+ <transition conf:isBound="5" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test152.txml b/test/samples/w3c/txml/test152.txml
new file mode 100644
index 0000000..86b50e9
--- /dev/null
+++ b/test/samples/w3c/txml/test152.txml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!-- test that an illegal array or item value causes error.execution and results in executable content
+not being executed. -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ <data conf:id="2"/>
+ <data conf:id="3"/>
+ <data conf:id="4" conf:illegalArray=""/>
+ <data conf:id="5">
+ <conf:array123/>
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+<!-- invalid array, legal item -->
+ <foreach conf:item="2" conf:index="3" conf:arrayTextVar="4">
+ <conf:incrementID id="1"/>
+ </foreach>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+<!-- illegal item, legal array -->
+ <foreach conf:illegalItem="" conf:index="3" conf:arrayVar="5">
+ <conf:incrementID id="1"/>
+ </foreach>
+ <raise event="bar"/>
+ </onentry>
+ <transition event="error.execution" target="s2"/>
+ <transition event="bar" conf:targetfail=""/>
+ </state>
+
+<state id="s2">
+ <!-- check that var1 has its original value (so executable content never got executed -->
+ <transition conf:idVal="1=0" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test153.txml b/test/samples/w3c/txml/test153.txml
new file mode 100644
index 0000000..e9f8038
--- /dev/null
+++ b/test/samples/w3c/txml/test153.txml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<!-- 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 -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/> <!-- contains the previous value -->
+ <data conf:id="2"/> <!-- the item which will contain the current value -->
+ <data conf:id="3">
+ <conf:array123/>
+ </data>
+ <data conf:id="4" conf:expr="1"/> <!-- 1 if success, 0 if failure -->
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <foreach conf:item="2" conf:arrayVar="3">
+ <if conf:compareIDVal="1&lt;2">
+ <assign conf:location="1" conf:varExpr="2"/>
+ <else/>
+ <!-- values are out of order, record failure -->
+ <assign conf:location="4" conf:expr="0"/>
+ </if>
+ </foreach>
+ </onentry>
+
+ <!-- check that var1 has its original value -->
+ <transition conf:idVal="4=0" conf:targetfail=""/>
+ <transition conf:targetpass=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test155.txml b/test/samples/w3c/txml/test155.txml
new file mode 100644
index 0000000..8444442
--- /dev/null
+++ b/test/samples/w3c/txml/test155.txml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<!-- test that foreach executes the executable content once for each item in the list '(1,2,3)'. The executable
+content sums the items into var1 so it should be 6 at the end -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ <data conf:id="2"/>
+ <data conf:id="3">
+ <conf:array123/>
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <foreach conf:item="2" conf:arrayVar="3">
+ <conf:sumVars id1="1" id2="2"/>
+ </foreach>
+ </onentry>
+
+ <transition conf:idVal="1=6" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test156.txml b/test/samples/w3c/txml/test156.txml
new file mode 100644
index 0000000..316f879
--- /dev/null
+++ b/test/samples/w3c/txml/test156.txml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<!-- test that an error causes the foreach to stop execution. The second piece of executable content
+should cause an error, so var1 should be incremented only once -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ <data conf:id="2"/>
+ <data conf:id="3">
+ <conf:array123/>
+ </data>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <foreach conf:item="2" conf:arrayVar="3">
+ <conf:incrementID id="1"/>
+ <!-- assign an illegal value to a non-existent var -->
+ <assign conf:location="5" conf:illegalExpr=""/>
+ </foreach>
+ </onentry>
+
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test158.txml b/test/samples/w3c/txml/test158.txml
new file mode 100644
index 0000000..cff220d
--- /dev/null
+++ b/test/samples/w3c/txml/test158.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<!-- test that executable content executes in document order. if event1 occurs then event2, succeed, otherwise fail -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <raise event="event1"/>
+ <raise event="event2"/>
+ </onentry>
+ <transition event="event1" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test159.txml b/test/samples/w3c/txml/test159.txml
new file mode 100644
index 0000000..abf1925
--- /dev/null
+++ b/test/samples/w3c/txml/test159.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!-- test that any error raised by an element of executable content causes all subsequent elements to be skipped.
+The send tag will raise an error so var1 should not be incremented. If it is fail, otherwise succeed -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="thisWillFail" conf:illegaltarget=""/>
+ <conf:incrementId id="1"/>
+ </onentry>
+ <transition conf:idVal="1=1" conf:targetfail=""/>
+ <transition conf:targetpass=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test172.txml b/test/samples/w3c/txml/test172.txml
new file mode 100644
index 0000000..45075a0
--- /dev/null
+++ b/test/samples/w3c/txml/test172.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- we test that eventexpr uses the current value of var1, not its initial value -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:quoteExpr="event1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:quoteExpr="event2"/>
+ <send conf:eventExpr="1"/>
+ </onentry>
+
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test173.txml b/test/samples/w3c/txml/test173.txml
new file mode 100644
index 0000000..c770856
--- /dev/null
+++ b/test/samples/w3c/txml/test173.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- we test that targetexpr uses the current value of var1, not its initial value
+(If it uses the initial value, it will generate an error. If it uses the current value, event1 will be raised -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:invalidSessionID=""/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:quoteExpr="#_internal"/>
+ <send conf:targetExpr="1" event="event1"/>
+ </onentry>
+
+ <transition event="event1" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test174.txml b/test/samples/w3c/txml/test174.txml
new file mode 100644
index 0000000..3d33d5b
--- /dev/null
+++ b/test/samples/w3c/txml/test174.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- we test that typeexpr uses the current value of var1, not its initial value
+(If it uses the initial value, it will generate an error. If it uses the current value, event1 will be raised -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:invalidSendTypeExpr=""/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:quoteExpr="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ <send conf:typeExpr="1" event="event1"/>
+ </onentry>
+
+ <transition event="event1" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test175.txml b/test/samples/w3c/txml/test175.txml
new file mode 100644
index 0000000..aba7ac4
--- /dev/null
+++ b/test/samples/w3c/txml/test175.txml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!-- we test that delayexpr uses the current value of var1, not its initial value
+(If it uses the initial value, event2 will be generated first, before event1. If it uses the current value,
+event1 will be raised first. Succeed if event1 occurs before event2, otherwise fail -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:quoteExpr="0s"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:quoteExpr="3s"/>
+ <send conf:delayExpr="1" event="event2"/>
+ <send delay="1s" event="event1"/>
+ </onentry>
+
+ <transition event="event1" target="s1"/>
+ <transition event="event2" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test176.txml b/test/samples/w3c/txml/test176.txml
new file mode 100644
index 0000000..8d084d4
--- /dev/null
+++ b/test/samples/w3c/txml/test176.txml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- we test that <param> uses the current value of var1, not its initial value. If the value of
+aParam in event1 is 2 so that var2 gets set to 2, success, otherwise failure -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ <data conf:id="2"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:expr="2"/>
+ <send event="event1">
+ <param name="aParam" conf:varExpr="1"/>
+ </send>
+ </onentry>
+
+ <transition event="event1" target="s1">
+ <assign conf:location="2" conf:eventDataFieldValue="aParam"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition conf:idVal="2=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test178.txml b/test/samples/w3c/txml/test178.txml
new file mode 100644
index 0000000..de7a334
--- /dev/null
+++ b/test/samples/w3c/txml/test178.txml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!-- we test that multiple key/value pairs are included, even when the keys are the same.
+This is a manual test. The tester must look at the log output and verify that both
+keys are there. (This test uses the SCXML Event I/O processor, which is the only
+one that all platforms must support. It does not specify the message format, so
+we cannot test _event.raw directly. Therefore we print it out for visual
+inspection.) -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <send event="event1">
+ <param conf:name="1" conf:expr="2"/>
+ <param conf:name="1" conf:expr="3"/>
+ </send>
+ </onentry>
+
+ <transition event="event1" target="final">
+ <log label="_event " conf:eventRaw=""/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+
+ </state>
+
+
+<final id="final"/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test179.txml b/test/samples/w3c/txml/test179.txml
new file mode 100644
index 0000000..02b74f6
--- /dev/null
+++ b/test/samples/w3c/txml/test179.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!-- we test that <content> can be used to populate body of a message -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="event1">
+ <content>123</content>
+ </send>
+ </onentry>
+
+ <transition event="event1" conf:eventdataVal="123" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test183.txml b/test/samples/w3c/txml/test183.txml
new file mode 100644
index 0000000..bb6e44a
--- /dev/null
+++ b/test/samples/w3c/txml/test183.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- we test that <send> stores the value of the sendid in idlocation. If it does,
+var1 has a value and we pass. Otherwise we fail -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="event1" conf:idlocation="1"/>
+ </onentry>
+
+ <transition conf:isBound="1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test185.txml b/test/samples/w3c/txml/test185.txml
new file mode 100644
index 0000000..c036cbf
--- /dev/null
+++ b/test/samples/w3c/txml/test185.txml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- we test that <send> respects the delay specification. If it does, event1 arrives before event2
+ and we pass. Otherwise we fail -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="event2" delay="2s"/>
+ <send event="event1"/>
+ </onentry>
+
+ <transition event="event1" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test186.txml b/test/samples/w3c/txml/test186.txml
new file mode 100644
index 0000000..e91c290
--- /dev/null
+++ b/test/samples/w3c/txml/test186.txml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!-- we test that <send> evals its args when it is evaluated, not when the delay interval expires and the
+message is actually sent. If it does, aParam will have the value of 1 (even though var1 has been incremented
+in the interval.) If var2 ends up == 1, we pass. Otherwise we fail -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ <data conf:id="2"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="event1" delay="2s">
+ <param name="aParam" conf:varExpr="1"/>
+ </send>
+ <assign conf:location="1" conf:expr="2"/>
+ </onentry>
+
+ <transition event="event1" target="s1">
+ <assign conf:location="2" conf:eventDataFieldValue="aParam"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition conf:idVal="2=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test187.txml b/test/samples/w3c/txml/test187.txml
new file mode 100644
index 0000000..994a489
--- /dev/null
+++ b/test/samples/w3c/txml/test187.txml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!-- we test that delayed <send> is not sent if the sending session terminates. In this case,
+a subscript is invoked which sends the event childToParent delayed by 1 second, and then terminates. The
+parent session, should not receive childToParent. If it does, we fail. Otherwise the
+10 sec timer expires and we pass -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="10s"/>
+ </onentry>
+ <invoke type="scxml" >
+ <content>
+ <!-- exit before the delayed send can execute -->
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <onentry>
+ <send event="childToParent" target="#_parent" delay="1s"/>
+ </onentry>
+ <transition target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="childToParent" conf:targetfail=""/>
+ <transition event="timeout" conf:targetpass=""/>
+</state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test194.txml b/test/samples/w3c/txml/test194.txml
new file mode 100644
index 0000000..9e660a5
--- /dev/null
+++ b/test/samples/w3c/txml/test194.txml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- we test that specifying an illegal target for <send> causes the event error.execution to be raised. If it does,
+we succeed. Otherwise we eventually timeout and fail. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <!-- should cause an error -->
+ <send conf:illegalTarget="" event="event2"/>
+ <!-- this will get added to the external event queue after the error has been raised -->
+ <send event="timeout"/>
+ </onentry>
+
+ <!-- once we've entered the state, we should check for internal events first -->
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test198.txml b/test/samples/w3c/txml/test198.txml
new file mode 100644
index 0000000..706ea93
--- /dev/null
+++ b/test/samples/w3c/txml/test198.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- we test that if type is not provided <send> uses the scxml event i/o processor. The only way to tell
+what processor was used is to look at the origintype of the resulting event -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <send event="event1"/>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="event1" conf:originTypeEq="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test199.txml b/test/samples/w3c/txml/test199.txml
new file mode 100644
index 0000000..dadd5b0
--- /dev/null
+++ b/test/samples/w3c/txml/test199.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- we test that using an invalid send type results in error.execution -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <send conf:invalidSendType="" event="event1"/>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test200.txml b/test/samples/w3c/txml/test200.txml
new file mode 100644
index 0000000..4aed203
--- /dev/null
+++ b/test/samples/w3c/txml/test200.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- we test that the processor supports the scxml event i/o processor -->
+
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event1"/>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="event1" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test201.txml b/test/samples/w3c/txml/test201.txml
new file mode 100644
index 0000000..c21eb7e
--- /dev/null
+++ b/test/samples/w3c/txml/test201.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- we test that the processor supports the basic http event i/o processor. This is an optional
+test since platforms are not required to support basic http event i/o -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" event="event1"/>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="event1" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test205.txml b/test/samples/w3c/txml/test205.txml
new file mode 100644
index 0000000..6cc06f4
--- /dev/null
+++ b/test/samples/w3c/txml/test205.txml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!-- we test that the processor doesn't change the message. We can't test that it never does this, but
+at least we can check that the event name and included data are the same as we sent. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="event1">
+ <param name="aParam" conf:expr="1"/>
+ </send>
+ <send event="timeout"/>
+ </onentry>
+
+
+ <transition event="event1" target="s1">
+ <assign conf:location="1" conf:eventDataFieldValue="aParam"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test207.txml b/test/samples/w3c/txml/test207.txml
new file mode 100644
index 0000000..6893dcf
--- /dev/null
+++ b/test/samples/w3c/txml/test207.txml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!-- we test that that we can't cancel an event in another session. We invoke a child process. It notifies
+us when it has generated a delayed event with sendid foo. We try to cancel foo. The child process sends us event
+ event success if the event is not cancelled, event fail otherwise. This doesn't test that there is absolutely no way to cancel an event
+raised in another session, but the spec doesn't define any way to refer to an event in another process -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="10s"/>
+ </onentry>
+ <invoke type="scxml">
+ <content>
+ <!-- when invoked, we raise a delayed event1 with sendid 'foo' and notify our parent. Then we wait.
+ If event1 occurs, the parent hasn't succeeded in canceling it and we return pass. If event2 occurs
+ it means event1 was canceled (because event2 is delayed longer than event1) and we return 'fail'. -->
+
+
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <onentry>
+ <send event="event1" id="foo" delay="3s"/>
+ <send event="event2" delay="5s"/>
+ <send target="#_parent" event="childToParent"/>
+ </onentry>
+
+ <transition event="event1" target="subFinal">
+ <send target="#_parent" event="pass"/>
+ </transition>
+ <transition event="*" target="subFinal">
+ <send target="#_parent" event="fail"/>
+ </transition>
+
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <state id="s01">
+ <transition event="childToParent" target="s02">
+ <cancel sendid="foo"/>
+ </transition>
+ </state>
+
+ <state id="s02">
+ <transition event="pass" conf:targetpass=""/>
+ <transition event="fail" conf:targetfail=""/>
+ <transition event="timeout" conf:targetfail=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test208.txml b/test/samples/w3c/txml/test208.txml
new file mode 100644
index 0000000..5a86e6d
--- /dev/null
+++ b/test/samples/w3c/txml/test208.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- we test that cancel works. We cancel delayed event1. If cancel works, we get event2 first and pass. If
+we get event1 or an error first, cancel didn't work and we fail. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send id="foo" event="event1" delay="1s"/>
+ <send event="event2" delay="5s"/>
+ <cancel sendid="foo"/>
+ </onentry>
+
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test210.txml b/test/samples/w3c/txml/test210.txml
new file mode 100644
index 0000000..402ed36
--- /dev/null
+++ b/test/samples/w3c/txml/test210.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- we test that sendidexpr works with cancel. If it takes the most recent value of var1, it should cancel
+delayed event1. Thus we get event2 first and pass. If we get event1 or an error first, cancel didn't work and we fail. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:quoteExpr="bar"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send id="foo" event="event1" delay="1s"/>
+ <send event="event2" delay="5s"/>
+ <assign conf:location="1" conf:quoteExpr="foo"/>
+ <cancel conf:sendIDExpr="1"/>
+ </onentry>
+
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test215.txml b/test/samples/w3c/txml/test215.txml
new file mode 100644
index 0000000..afb8df5
--- /dev/null
+++ b/test/samples/w3c/txml/test215.txml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- we test that typexpr is evaluated at runtime. If the original value of var1 is used, the invocation
+will fail (test215sub1.scxml is not of type 'foo', even if the platform supports foo as a type). If
+the runtime value is used, the invocation will succeed -->
+
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+ <data conf:id="1" conf:quoteExpr="foo"/>
+ </datamodel>
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ <assign conf:location="1" conf:quoteExpr="http://www.w3.org/TR/scxml/"/>
+ </onentry>
+ <invoke conf:typeExpr="1">
+ <content>
+ <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+ <scxml initial="subFinal" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="done.invoke" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test216.txml b/test/samples/w3c/txml/test216.txml
new file mode 100644
index 0000000..e65818e
--- /dev/null
+++ b/test/samples/w3c/txml/test216.txml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- we test that srcexpr is evaluated at runtime. If the original value of var1 is used, the invocation
+will fail (assuming that there is no script named 'foo'). If
+the runtime value is used, the invocation will succeed -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+ <data conf:id="1" conf:quoteExpr="foo"/>
+ </datamodel>
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ <assign conf:location="1" conf:quoteExpr="file:test216sub1.scxml"/>
+ </onentry>
+ <invoke conf:srcExpr="1" type="http://www.w3.org/TR/scxml"/>
+ <transition event="done.invoke" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test216sub1.txml b/test/samples/w3c/txml/test216sub1.txml
new file mode 100644
index 0000000..eb4c9df
--- /dev/null
+++ b/test/samples/w3c/txml/test216sub1.txml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+
+
+<scxml initial="final" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test216sub1.txml.1 b/test/samples/w3c/txml/test216sub1.txml.1
new file mode 100644
index 0000000..eb4c9df
--- /dev/null
+++ b/test/samples/w3c/txml/test216sub1.txml.1
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+
+
+<scxml initial="final" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test220.txml b/test/samples/w3c/txml/test220.txml
new file mode 100644
index 0000000..4c79e4d
--- /dev/null
+++ b/test/samples/w3c/txml/test220.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- we test that the scxml type is supported. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+ <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal"/>
+ </scxml></content>
+ </invoke>
+ <transition event="done.invoke" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test223.txml b/test/samples/w3c/txml/test223.txml
new file mode 100644
index 0000000..9cdc499
--- /dev/null
+++ b/test/samples/w3c/txml/test223.txml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- we test that idlocation is supported. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" conf:idlocation="1">
+ <content>
+ <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+ <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+ <transition conf:isBound="1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test224.txml b/test/samples/w3c/txml/test224.txml
new file mode 100644
index 0000000..0ffe8eb
--- /dev/null
+++ b/test/samples/w3c/txml/test224.txml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!-- we test that the automatically generated id has the form stateid.platformid. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1"/>
+ <data conf:id="2" conf:quoteExpr="s0."/>
+ </datamodel>
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" conf:idlocation="1">
+ <content>
+ <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
+ <scxml version="1.0" initial="subFinal" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+ <transition conf:varPrefix="2 1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test225.txml b/test/samples/w3c/txml/test225.txml
new file mode 100644
index 0000000..548ff46
--- /dev/null
+++ b/test/samples/w3c/txml/test225.txml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!-- we test that the automatically generated id is unique, we call invoke twice and compare the ids. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1"/>
+ <data conf:id="2"/>
+ </datamodel>
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" conf:idlocation="1">
+ <content>
+ <scxml initial="subFinal1" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <invoke type="http://www.w3.org/TR/scxml/" conf:idlocation="2" >
+ <content>
+ <scxml initial="subFinal2" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+ <transition conf:VarEqVar="1 2" conf:targetfail=""/>
+ <transition conf:targetpass=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test226.txml b/test/samples/w3c/txml/test226.txml
new file mode 100644
index 0000000..843bfdc
--- /dev/null
+++ b/test/samples/w3c/txml/test226.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- this is basically just a test that invoke works correctly and that you can pass data
+to the invoked process. If the invoked session finds aParam==1, it exits, signalling
+success. otherwise it will hang and the timeout in this doc signifies failure. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+
+
+ <invoke type="http://www.w3.org/TR/scxml/" src="file:test226sub1.txml">
+ <param conf:name="1" conf:expr="1"/>
+ </invoke>
+
+ <transition event="varBound" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test226sub1.txml b/test/samples/w3c/txml/test226sub1.txml
new file mode 100644
index 0000000..b4780c7
--- /dev/null
+++ b/test/samples/w3c/txml/test226sub1.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!-- when invoked, if var1 has a value notify parent. Then terminate. -->
+
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+<state id="s0">
+ <transition conf:isBound="1" target="final">
+ <send target="#_parent" event="varBound"/>
+ </transition>
+ <transition target="final"/>
+ </state>
+
+<final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test228.txml b/test/samples/w3c/txml/test228.txml
new file mode 100644
index 0000000..40021bb
--- /dev/null
+++ b/test/samples/w3c/txml/test228.txml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!-- test that the invokeid is included in events returned from the invoked process. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" id="foo">
+ <content>
+ <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="done.invoke" target="s1">
+ <assign conf:location="1" conf:eventField="invokeid"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<state id="s1">
+ <transition conf:idQuoteVal="1=foo" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test229.txml b/test/samples/w3c/txml/test229.txml
new file mode 100644
index 0000000..3837b69
--- /dev/null
+++ b/test/samples/w3c/txml/test229.txml
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!-- test that autofoward works. If the child process receives back a copy of the
+childToParent event that it sends to this doc, it sends eventReceived, signalling success. (Note
+that this doc is not required to process that event explicitly. It should be forwarded in any case.) Otherwise
+it eventually times out and the done.invoke signals failure -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" autoforward="true">
+ <content>
+ <!-- when invoked, send childToParent to parent.
+ If it is forwarded back to us, send
+ eventReceived to signal success and terminate.
+ Otherwise wait for timer to expire and terminate. -->
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <onentry>
+ <send target="#_parent" event="childToParent"/>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <transition event="childToParent" target="subFinal">
+ <send target="#_parent" event="eventReceived"/>
+ </transition>
+ <transition event="*" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="childToParent"/>
+ <transition event="eventReceived" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test230.txml b/test/samples/w3c/txml/test230.txml
new file mode 100644
index 0000000..fc27220
--- /dev/null
+++ b/test/samples/w3c/txml/test230.txml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<!-- a manual test that an autofowarded event has the same fields and values as the original event.
+the child process sends the parent process an event which is forwarded back to it.
+Both the parent and child process print out the contents of the event. The tester
+must check if they are the same and report his result. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" autoforward="true">
+ <content>
+ <!-- when invoked, send childToParent to parent. If it is forwarded back to us, print out its
+ fields and terminate. -->
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <onentry>
+ <send target="#_parent" event="childToParent"/>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="childToParent" target="subFinal">
+ <log label="name is " conf:eventField="name" />
+ <log label="type is " conf:eventField="type" />
+ <log label="sendid is " conf:eventField="sendid"/>
+ <log label="origin is " conf:eventField="origin" />
+ <log label="origintype is " conf:eventField="origintype" />
+ <log label="invokeid is " conf:eventField="invokeid" />
+ <log label="data is " conf:eventField="data"/>
+ </transition>
+ <transition event="*" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="timeout" target="final"/>
+
+
+ <state id="s01">
+ <transition event="childToParent" target="s02">
+ <log label="name is " conf:eventField="name" />
+ <log label="type is " conf:eventField="type" />
+ <log label="sendid is " conf:eventField="sendid"/>
+ <log label="origin is " conf:eventField="origin" />
+ <log label="origintype is " conf:eventField="origintype" />
+ <log label="invokeid is " conf:eventField="invokeid" />
+ <log label="data is " conf:eventField="data"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s02">
+ <!-- wait till we get the done event to ensure that the child process has time to print out its results -->
+ <transition event="done.invoke" target="final"/>
+ </state>
+
+</state>
+
+<final id="final"/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test232.txml b/test/samples/w3c/txml/test232.txml
new file mode 100644
index 0000000..1cbc14f
--- /dev/null
+++ b/test/samples/w3c/txml/test232.txml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!-- test that a parent process can receive multiple events from a child process -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal">
+ <onentry>
+ <send target="#_parent" event="childToParent1"/>
+ <send target="#_parent" event="childToParent2"/>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="timeout" conf:targetfail=""/>
+
+
+ <state id="s01">
+ <transition event="childToParent1" target="s02"/>
+ </state>
+
+ <state id="s02">
+ <transition event="childToParent2" target="s03"/>
+ </state>
+
+<state id="s03">
+ <transition event="done.invoke" conf:targetpass=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test233.txml b/test/samples/w3c/txml/test233.txml
new file mode 100644
index 0000000..94b219b
--- /dev/null
+++ b/test/samples/w3c/txml/test233.txml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!-- test that finalize markup runs before the event is processed. The invoked process will
+return 2 in _event.data.aParam, so that new value should be in force when we select
+the transtitions. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal">
+ <onentry>
+ <send target="#_parent" event="childToParent">
+ <param name="aParam" conf:expr="2"/>
+ </send>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ <finalize>
+ <assign conf:location="1" conf:eventDataFieldValue="aParam"/>
+ </finalize>
+ </invoke>
+
+ <transition event="childToParent" conf:idVal="1 2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test234.txml b/test/samples/w3c/txml/test234.txml
new file mode 100644
index 0000000..27d4626
--- /dev/null
+++ b/test/samples/w3c/txml/test234.txml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!-- test that only finalize markup in the invoking state runs. the first invoked process will
+return 2 in _event.data.aParam, while second invoked process sleeps without returning any events.
+Only the first finalize should execute. So when we get to s1 var1 should have value 2 but
+var2 should still be set to 1 -->
+
+
+<scxml initial="p0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ <data conf:id="2" conf:expr="1"/>
+ </datamodel>
+<parallel id="p0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <state id="p01">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml version="1.0" initial="subFinal1" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal1">
+ <onentry>
+ <send target="#_parent" event="childToParent">
+ <param name="aParam" conf:expr="2"/>
+ </send>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ <finalize>
+ <assign conf:location="1" conf:eventDataFieldValue="aParam"/>
+ </finalize>
+ </invoke>
+
+ <transition event="childToParent" conf:idVal="1=2" target="s1"/>
+ <transition event="childToParent" conf:targetfail=""/>
+ </state>
+
+ <state id="p02">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml version="1.0" initial="sub0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="subFinal2"/>
+ </state>
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ <finalize>
+ <assign conf:location="2" conf:eventDataFieldValue="aParam"/>
+ </finalize>
+ </invoke>
+ </state>
+
+</parallel>
+
+
+<state id="s1">
+ <transition conf:idVal="2=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test235.txml b/test/samples/w3c/txml/test235.txml
new file mode 100644
index 0000000..84b8680
--- /dev/null
+++ b/test/samples/w3c/txml/test235.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- test that done.invoke.id event has the right id. the invoked child terminates immediately
+and should generate done.invoke.foo -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" id="foo">
+ <content>
+ <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="done.invoke.foo" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test236.txml b/test/samples/w3c/txml/test236.txml
new file mode 100644
index 0000000..5d18c2f
--- /dev/null
+++ b/test/samples/w3c/txml/test236.txml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!-- test that done.invoke.id event is the last event we receive. the invoked process sends childToParent
+in the exit handler of its final state. We should get it before the done.invoke, and we should get no
+events after the done.invoke. Hence timeout indicates success -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal">
+ <onexit>
+ <send target="#_parent" event="childToParent"/>
+ </onexit>
+ </final>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="childToParent" target="s1"/>
+ <transition event="done.invoke" conf:targetfail=""/>
+</state>
+
+<state id="s1">
+ <!-- here we should get done.invoke -->
+ <transition event="done.invoke" target="s2"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s2">
+ <transition event="timeout" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test237.txml b/test/samples/w3c/txml/test237.txml
new file mode 100644
index 0000000..c6097bc
--- /dev/null
+++ b/test/samples/w3c/txml/test237.txml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!-- test that cancelling works. invoked child sleeps for two seconds, then terminates. We
+sleep for 1 sec in s0, then move to s1. This should cause the invocation to get cancelled.
+If we receive done.invoke, the invocation wasn't cancelled, and we fail. If we receive no events by
+the time timeout2 fires, success -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout1" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <!-- when invoked, sleep for 2 secs then terminate. Parent will try to cancel this session -->
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="timeout1" target="s1"/>
+
+</state>
+
+<state id="s1">
+ <onentry>
+ <send event="timeout2" delay="2s"/>
+ </onentry>
+ <!-- here we should NOT get done.invoke -->
+ <transition event="done.invoke" conf:targetfail=""/>
+ <transition event="*" conf:targetpass=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test239.txml b/test/samples/w3c/txml/test239.txml
new file mode 100644
index 0000000..8fa1837
--- /dev/null
+++ b/test/samples/w3c/txml/test239.txml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!-- test that markup can be specified both by 'src' and by <content> -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <state id="s01">
+ <invoke type="http://www.w3.org/TR/scxml/" src="file:test239sub1.scxml"/>
+ <transition event="done.invoke" target="s02"/>
+ </state>
+
+<state id="s02">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <!-- identical to test239sub1.scxml. -->
+ <content>
+ <scxml version="1.0" initial="final" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="final"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="done.invoke" conf:targetpass=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test239sub1.txml b/test/samples/w3c/txml/test239sub1.txml
new file mode 100644
index 0000000..fd27e45
--- /dev/null
+++ b/test/samples/w3c/txml/test239sub1.txml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- when invoked, just terminate. -->
+
+
+<scxml initial="final" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test240.txml b/test/samples/w3c/txml/test240.txml
new file mode 100644
index 0000000..bf669d4
--- /dev/null
+++ b/test/samples/w3c/txml/test240.txml
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!-- test that datamodel values can be specified both by 'namelist' and by <param>.
+invoked child will return success if its Var1 is set to 1, failure otherwise. This
+test will fail schema validation because of the multiple occurences of Var1, but
+should run correctly. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <state id="s01">
+ <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="1">
+ <content>
+ <scxml initial="sub01" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+ <state id="sub01">
+ <transition conf:namelistIdVal="1=1" target="subFinal1">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal1">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" target="s02"/>
+ <transition event="failure" conf:targetfail=""/>
+ </state>
+
+<state id="s02">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param conf:name="1" conf:expr="1"/>
+ <content>
+ <scxml initial="sub02" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="sub02">
+ <transition conf:idVal="1=1" target="subFinal2">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal1">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" conf:targetpass=""/>
+ <transition event="failure" conf:targetfail=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test241.txml b/test/samples/w3c/txml/test241.txml
new file mode 100644
index 0000000..9587697
--- /dev/null
+++ b/test/samples/w3c/txml/test241.txml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!-- The child process will return success ifits Var1 is set to 1, failure otherwise. For this test
+we try passing in Var1 by param and by namelist and check that we either get two successes
+or two failures. This test will fail schema validation due to multiple declarations of
+Var1, but should run correctly. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <state id="s01">
+ <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="1">
+ <content>
+ <scxml initial="sub01" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="sub01">
+ <transition conf:idVal="1=1" target="subFinal1">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal1">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" target="s02"/>
+ <transition event="failure" target="s03"/>
+ </state>
+
+<state id="s02">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param conf:name="1" conf:expr="1"/>
+ <content>
+ <scxml initial="sub02" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="sub02">
+ <transition conf:idVal="1=1" target="subFinal2">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal2">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+ <!-- we got success in s01, so we need to do so here -->
+ <transition event="success" conf:targetpass=""/>
+ <transition event="failure" conf:targetfail=""/>
+ </state>
+
+<state id="s03">
+ <invoke type="http://www.w3.org/TR/scxml/" >
+ <param conf:name="1" conf:expr="1"/>
+ <content>
+ <scxml initial="sub03" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="sub03">
+ <transition conf:idVal="1=1" target="subFinal3">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal3">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+
+ <final id="subFinal3"/>
+ </scxml>
+ </content>
+ </invoke>
+ <!-- we got failure in s01, so we need to do so here -->
+ <transition event="failure" conf:targetpass=""/>
+ <transition event="success" conf:targetfail=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test242.txml b/test/samples/w3c/txml/test242.txml
new file mode 100644
index 0000000..35fa154
--- /dev/null
+++ b/test/samples/w3c/txml/test242.txml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!-- test that markup specified by 'src' and by <content> is treated the same way. That means that
+either we get done.invoke in both cases or in neither case (in which case we timeout) -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" >
+ <onentry>
+ <send event="timeout1" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <invoke type="http://www.w3.org/TR/scxml/" src="file:test242sub1.scxml"/>
+ <transition event="done.invoke" target="s02"/>
+ <transition event="timeout1" target="s03"/>
+ </state>
+
+<state id="s02">
+ <onentry>
+ <send event="timeout2" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <!-- identical to test242sub1.scxml. -->
+ <content>
+ <scxml version="1.0" initial="subFinal1" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <!-- we got done.invoke last time, so we need it this time too -->
+ <transition event="done.invoke" conf:targetpass=""/>
+ <transition event="timeout2" conf:targetfail=""/>
+ </state>
+
+<state id="s03">
+ <onentry>
+ <send event="timeout3" delay="1s"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <!-- identical to test242sub1.scxml. -->
+ <content>
+ <scxml version="1.0" initial="subFinal2" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+ <!-- we got timeout last time, so we need it this time too -->
+ <transition event="timeout3" conf:targetpass=""/>
+ <transition event="done.invoke" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test242sub1.txml b/test/samples/w3c/txml/test242sub1.txml
new file mode 100644
index 0000000..fd27e45
--- /dev/null
+++ b/test/samples/w3c/txml/test242sub1.txml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- when invoked, just terminate. -->
+
+
+<scxml initial="final" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test243.txml b/test/samples/w3c/txml/test243.txml
new file mode 100644
index 0000000..a01345c
--- /dev/null
+++ b/test/samples/w3c/txml/test243.txml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!-- test that datamodel values can be specified by param.
+test240sub1 will return success ifits Var1 is set to 1, failure otherwise. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param conf:name="1" conf:expr="1"/>
+ <content>
+ <scxml version="1.0" initial="sub0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="sub0">
+ <transition conf:idVal="1=1" target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test244.txml b/test/samples/w3c/txml/test244.txml
new file mode 100644
index 0000000..c0f1a23
--- /dev/null
+++ b/test/samples/w3c/txml/test244.txml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!-- test that datamodel values can be specified by namelist.
+invoked child will return success ifits Var1 is set to 1, failure otherwise.
+This test will fail schema validation due to multiple occurrences of Var1,
+but should run correctly. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="1">
+ <content>
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="sub0">
+ <transition conf:idVal="1=1" target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="success" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test245.txml b/test/samples/w3c/txml/test245.txml
new file mode 100644
index 0000000..459bec6
--- /dev/null
+++ b/test/samples/w3c/txml/test245.txml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!-- test that non-existent datamodel values are not set. Var2 is not defined in
+invoked child's datamodel. It will will return success if its Var2 remains unbound, failure otherwise. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="2" conf:expr="3"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="2">
+ <content>
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <transition conf:isBound="2" target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <transition event="success" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test247.txml b/test/samples/w3c/txml/test247.txml
new file mode 100644
index 0000000..7c528a3
--- /dev/null
+++ b/test/samples/w3c/txml/test247.txml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- test that we get done.invoke. timeout indicates failure -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml version="1.0" initial="subFinal" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="done.invoke" conf:targetpass=""/>
+ <transition event="timeout" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test250.txml b/test/samples/w3c/txml/test250.txml
new file mode 100644
index 0000000..3455062
--- /dev/null
+++ b/test/samples/w3c/txml/test250.txml
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!-- test that the onexit handlers run in the invoked process if it is cancelled. This has to be a
+manual test, since this process won't accept any events from the child process once it has been cancelled.
+Tester must examine log output from child process to determine success -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/" >
+ <content>
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0" initial="sub01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="subFinal"/>
+ <onexit>
+ <log conf:quoteExpr="Exiting sub0"/>
+ </onexit>
+ <state id="sub01">
+ <onexit>
+ <log conf:quoteExpr="Exiting sub01"/>
+ </onexit>
+ </state>
+ </state>
+ <final id="subFinal">
+ <onentry>
+ <log conf:quoteExpr="entering final state, invocation was not cancelled"/>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ </invoke>
+
+ <!-- this transition will cause the invocation to be cancelled -->
+ <transition event="foo" target="final"/>
+ </state>
+
+<final id="final"/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test252.txml b/test/samples/w3c/txml/test252.txml
new file mode 100644
index 0000000..40c36cb
--- /dev/null
+++ b/test/samples/w3c/txml/test252.txml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!-- test that we don't process any events received from the invoked process once it is cancelled. child
+process tries to send us childToParent in an onexit handler. If we get it, we fail.
+timeout indicates success. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <transition event="timeout" conf:targetpass=""/>
+ <transition event="childToParent" conf:targetfail=""/>
+ <transition event="done.invoke" conf:targetfail=""/>
+
+ <state id="s01">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <transition event="timeout" target="subFinal"/>
+ <onexit>
+ <send target="#_parent" event="childToParent"/>
+ </onexit>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <!-- this transition will cause the invocation to be cancelled -->
+ <transition event="foo" target="s02"/>
+ </state>
+
+ <state id="s02"/>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test253.txml b/test/samples/w3c/txml/test253.txml
new file mode 100644
index 0000000..041797a
--- /dev/null
+++ b/test/samples/w3c/txml/test253.txml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<!-- test that the scxml event processor is used in both directions. If child process uses the
+scxml event i/o processor to communicate with us, send it an event. It will send back success if
+this process uses the scxml processor to send the message to it, otherwise failure. For this test we allow
+'scxml' as an alternative to the full url. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <transition event="timeout" conf:targetfail=""/>
+
+ <invoke type="scxml" id="foo">
+ <content>
+ <!-- inform parent we're running then wait for it to send us an event. If it uses the scxml event i/o
+ processor to do so, return success, otherwise return failure. -->
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="2"/>
+ </datamodel>
+ <state id="sub0">
+ <onentry>
+ <send target="#_parent" event="childRunning"/>
+ </onentry>
+
+ <transition event="parentToChild" target="sub1">
+ <assign conf:location="2" conf:eventField="origintype"/>
+ </transition>
+ </state>
+ <state id="sub1">
+ <transition conf:idQuoteVal="2=http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition conf:idQuoteVal="2=scxml" target="subFinal">
+ <send target="#_parent" event="success"/>
+ </transition>
+ <transition target="subFinal">
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <state id="s01">
+ <transition event="childRunning" target="s02">
+ <assign conf:location="1" conf:eventField="origintype"/>
+ </transition>
+ </state>
+
+ <state id="s02">
+
+ <transition conf:idQuoteVal="1=http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="s03">
+ <send target="#_foo" event="parentToChild"/>
+ </transition>
+ <transition conf:idQuoteVal="1=scxml" target="s03">
+ <send target="#_foo" event="parentToChild"/>
+ </transition>
+
+ <transition conf:targetfail=""/>
+
+ </state>
+
+
+ <state id="s03">
+ <transition event="success" conf:targetpass=""/>
+ <transition event="fail" conf:targetfail=""/>
+
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test276.txml b/test/samples/w3c/txml/test276.txml
new file mode 100644
index 0000000..e4a9d9f
--- /dev/null
+++ b/test/samples/w3c/txml/test276.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<!-- test that values passed in from parent process override default values specified in the child, test276sub1.scxml.
+The child returns event1 if var1 has value 1, event0 if it has default value 0. -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+ <invoke type="scxml" src="file:test276sub1.scxml" >
+ <param conf:name="1" conf:expr="1"/>
+ </invoke>
+ <transition event="event1" conf:targetpass=""/>
+ <transition event="event0" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test276sub1.txml b/test/samples/w3c/txml/test276sub1.txml
new file mode 100644
index 0000000..3bb40c0
--- /dev/null
+++ b/test/samples/w3c/txml/test276sub1.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!-- define var1 with default value 0. Parent will invoke this process setting var1 = 1. Return event1 if var1 == 1, event0 otherwise -->
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="s0">
+
+
+ <transition conf:idVal="1=1" target="final">
+ <send target="#_parent" event="event1"/>
+ </transition>
+
+ <transition target="final">
+ <send target="#_parent" event="event0"/>
+ </transition>
+
+ </state>
+
+ <final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test278.txml b/test/samples/w3c/txml/test278.txml
new file mode 100644
index 0000000..c95b329
--- /dev/null
+++ b/test/samples/w3c/txml/test278.txml
@@ -0,0 +1,22 @@
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<!-- test that a variable can be accessed from a state that is outside its lexical scope -->
+
+ <state id="s0">
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+
+ <transition conf:targetfail=""/>
+
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test279.txml b/test/samples/w3c/txml/test279.txml
new file mode 100644
index 0000000..b3b1adc
--- /dev/null
+++ b/test/samples/w3c/txml/test279.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!-- testing that in case of early binding variables are assigned values at init time, before
+ the state containing them is visited -->
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel=""
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+ <state id="s0">
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+
+ <transition conf:targetfail=""/>
+
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test280.txml b/test/samples/w3c/txml/test280.txml
new file mode 100644
index 0000000..723eaa5
--- /dev/null
+++ b/test/samples/w3c/txml/test280.txml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+
+
+<!-- test late binding. var2 won't get bound until s1 is entered, so it shouldn't have a value in s0 and
+accessing it should cause an error. It should get bound before the onentry code in s1 so it should be
+possible access it there and assign its value to var1 -->
+
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel=""
+ binding="late" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+ <state id="s0">
+ <transition conf:unboundVar="2" target="s1"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data conf:id="2" conf:expr="1"/>
+ </datamodel>
+ <onentry>
+ <assign conf:location="1" conf:varExpr="2"/>
+ </onentry>
+ <transition conf:VarEqVar="1 2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test286.txml b/test/samples/w3c/txml/test286.txml
new file mode 100644
index 0000000..89b77a9
--- /dev/null
+++ b/test/samples/w3c/txml/test286.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<!-- test that assigment to a non-declared var causes an error. the transition on foo catches the case
+where no error is raised -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" conf:datamodel="" initial="s0">
+
+
+ <state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:expr="1"/>
+ <raise event="foo"/>
+ </onentry>
+
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>
diff --git a/test/samples/w3c/txml/test287.txml b/test/samples/w3c/txml/test287.txml
new file mode 100644
index 0000000..8f25165
--- /dev/null
+++ b/test/samples/w3c/txml/test287.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- a simple test that a legal value may be assigned to a valid data model location -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance"
+ conf:datamodel="" version="1.0" initial="s0">
+
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:expr="1"/>
+ </onentry>
+
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test294.txml b/test/samples/w3c/txml/test294.txml
new file mode 100644
index 0000000..507ff3b
--- /dev/null
+++ b/test/samples/w3c/txml/test294.txml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!-- test that a param inside donedata ends up in the data field of the done event and
+that content inside donedata sets the full value of the event.data field -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="s0" initial="s01">
+
+ <transition event="done.state.s0" conf:eventvarVal="1=1" target="s1">
+ </transition>
+
+ <transition event="done.state.s0" conf:targetfail="">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param conf:name="1" conf:expr="1"/>
+ </donedata>
+ </final>
+ </state>
+
+ <state id="s1" initial="s11">
+
+ <transition event="done.state.s1" conf:eventdataVal="foo" conf:targetpass="">
+ </transition>
+
+ <transition event="done.state.s1" conf:targetfail="">
+ </transition>
+
+ <state id="s11">
+ <transition target="s12"/>
+ </state>
+ <final id="s12">
+ <donedata>
+ <conf:contentFoo/>
+ </donedata>
+ </final>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test298.txml b/test/samples/w3c/txml/test298.txml
new file mode 100644
index 0000000..e1af350
--- /dev/null
+++ b/test/samples/w3c/txml/test298.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- refence a non-existent data model location in param in donedata and see that the right error is raised -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+ <state id="s0" initial="s01">
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param conf:name="3" conf:location="2"/>
+ </donedata>
+ </final>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>
+
+
diff --git a/test/samples/w3c/txml/test301.txml b/test/samples/w3c/txml/test301.txml
new file mode 100644
index 0000000..d3245f3
--- /dev/null
+++ b/test/samples/w3c/txml/test301.txml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- the processor should reject this document because it can't download the script.
+Therefore we fail if it runs at all. This test is valid only for datamodels that support scripting -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+ <script conf:scriptBadSrc=""/>
+
+ <state id="s0">
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test302.txml b/test/samples/w3c/txml/test302.txml
new file mode 100644
index 0000000..f1b99c0
--- /dev/null
+++ b/test/samples/w3c/txml/test302.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that a script is evaluated at load time. <conf:script> shoudl assign the value 1 to
+Var1. Hence, if script is evaluated at download time, Var1 has a value in the initial state s0.
+This test is valid only for datamodels that support scripting -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+ <conf:script/>
+
+ <state id="s0">
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test303.txml b/test/samples/w3c/txml/test303.txml
new file mode 100644
index 0000000..6fd1e9c
--- /dev/null
+++ b/test/samples/w3c/txml/test303.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- to test that scripts are run as part of executable content, we check that it changes the value of a var at the
+right point. This test is valid only for datamodels that support scripting -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+<datamodel>
+<data conf:id="1" conf:expr="0"/>
+</datamodel>
+
+ <state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:expr="2"/>
+ <conf:script/>
+ </onentry>
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test304.txml b/test/samples/w3c/txml/test304.txml
new file mode 100644
index 0000000..9ed6cbb
--- /dev/null
+++ b/test/samples/w3c/txml/test304.txml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that a variable declared by a script can be accessed like any other part of the data model -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+ <conf:script/>
+
+ <state id="s0">
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test307.txml b/test/samples/w3c/txml/test307.txml
new file mode 100644
index 0000000..4065f5f
--- /dev/null
+++ b/test/samples/w3c/txml/test307.txml
@@ -0,0 +1,43 @@
+<?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" version="1.0" initial="s0" binding="late">
+
+<!-- with binding=late, in s0 we access a variable that isn't created until we get to s1. Then in s1
+we access a non-existent substructure of a variable. We use log tags to report the values that both operations
+yield, and whether there are errors. This is a manual test, since the tester must report whether the output
+is the same in the two cases -->
+
+<state id="s0">
+ <onentry>
+ <log label="entering s0 value of Var 1 is: " conf:varExpr="1"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error" target="s1">
+ <log label="error in state s0" conf:expr="_event"/>
+ </transition>
+ <transition event="foo" target="s1">
+ <log label="no error in s0" conf:expr=""/>
+ </transition>
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+ <onentry>
+ <log label="entering s1, value of non-existent substructure of Var 1 is: " conf:varNonexistentStruct="1"/>
+ <raise event="bar"/>
+ </onentry>
+
+ <transition event="error" target="final">
+ <log label="error in state s1" conf:expr="_event"/>
+ </transition>
+ <transition event="bar" target="final">
+ <log label="No error in s1" conf:expr=""/>
+ </transition>
+
+</state>
+
+<final id="final"/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test309.txml b/test/samples/w3c/txml/test309.txml
new file mode 100644
index 0000000..c781100
--- /dev/null
+++ b/test/samples/w3c/txml/test309.txml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that an expression that cannot be interpreted as a boolean is treated as false -->
+
+<scxml version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+<state id="s0">
+ <transition conf:nonBoolean="" conf:targetfail=""/>
+ <transition conf:targetpass=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test310.txml b/test/samples/w3c/txml/test310.txml
new file mode 100644
index 0000000..f88a87a
--- /dev/null
+++ b/test/samples/w3c/txml/test310.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- simple test of the in() predicate -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="p">
+
+
+ <parallel id="p">
+
+ <state id="s0">
+ <transition conf:inState="s1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <state id="s1"/>
+ </parallel>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test311.txml b/test/samples/w3c/txml/test311.txml
new file mode 100644
index 0000000..f6485be
--- /dev/null
+++ b/test/samples/w3c/txml/test311.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that assignment to a non-existent location yields an error -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+
+<state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:expr="1"/>
+ </onentry>
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event=".*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test312.txml b/test/samples/w3c/txml/test312.txml
new file mode 100644
index 0000000..597200b
--- /dev/null
+++ b/test/samples/w3c/txml/test312.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that assignment with an illegal expr raises an error -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:illegalExpr=""/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event=".*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test313.txml b/test/samples/w3c/txml/test313.txml
new file mode 100644
index 0000000..ee11064
--- /dev/null
+++ b/test/samples/w3c/txml/test313.txml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- this is a manual test. The processor is allowed to reject this doc, but if it executes it with its illegal
+expression, it must raise an error -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign conf:location="1" conf:illegalExpr=""/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event=".*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test314.txml b/test/samples/w3c/txml/test314.txml
new file mode 100644
index 0000000..7a2329e
--- /dev/null
+++ b/test/samples/w3c/txml/test314.txml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- this is a manual test because the processor is allowed to reject this document. But if it executes it,
+it should not raise an error until it gets to s03 and evaluates the illegal expr -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+ conf:datamodel="" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+
+<state id="s0" initial="s01">
+ <transition event="error.execution" conf:targetfail=""/>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+
+ <state id="s02">
+ <transition target="s03"/>
+ </state>
+
+ <state id="s03">
+ <onentry>
+ <assign conf:location="1" conf:illegalExpr=""/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event=".*" conf:targetfail=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test318.txml b/test/samples/w3c/txml/test318.txml
new file mode 100644
index 0000000..9e71bc6
--- /dev/null
+++ b/test/samples/w3c/txml/test318.txml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!-- test that _event stays bound during the onexit and entry into the next state -->
+
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" target="s1"/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <raise event="bar"/>
+ <!-- _event should still be bound to 'foo' at this point -->
+ <assign conf:location="1" conf:eventName=""/>
+ </onentry>
+ <transition conf:idQuoteVal="1=foo" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test319.txml b/test/samples/w3c/txml/test319.txml
new file mode 100644
index 0000000..50e4a97
--- /dev/null
+++ b/test/samples/w3c/txml/test319.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!-- test that _event is not bound before any event has been raised -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml"
+ name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+ <onentry>
+ <if conf:systemVarIsBound="_event">
+ <raise event="bound"/>
+ <else/>
+ <raise event="unbound"/>
+ </if>
+ </onentry>
+ <transition event="unbound" conf:targetpass=""/>
+ <transition event="bound" conf:targetfail=""/>
+
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test321.txml b/test/samples/w3c/txml/test321.txml
new file mode 100644
index 0000000..74da9c3
--- /dev/null
+++ b/test/samples/w3c/txml/test321.txml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!-- test that _sessionid is bound on startup -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="$_sessionid"/>
+ </datamodel>
+
+ <state id="s0">
+<transition conf:isBound="1" conf:targetpass=""/>
+ <transition conf:true="" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test322.txml b/test/samples/w3c/txml/test322.txml
new file mode 100644
index 0000000..6900eef
--- /dev/null
+++ b/test/samples/w3c/txml/test322.txml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+
+<!-- test that _sessionid remains bound to the same value throught the session. this means that it can't
+be assigned to -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:systemVarExpr="_sessionid"/>
+ <data conf:id="2"/>
+ </datamodel>
+
+ <state id="s0">
+ <transition target="s1"/>
+
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign conf:systemVarLocation="_sessionid" conf:quoteExpr="otherName"/>
+ <raise event="foo"/>
+ </onentry>
+
+ <transition event="error.execution" target="s2"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s2">
+
+ <transition conf:idSystemVarVal="1=_sessionid" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test323.txml b/test/samples/w3c/txml/test323.txml
new file mode 100644
index 0000000..afd3400
--- /dev/null
+++ b/test/samples/w3c/txml/test323.txml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!-- test that _name is bound on startup -->
+
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="$_name"/>
+ </datamodel>
+
+ <state id="s0">
+<transition conf:isBound="1" conf:targetpass=""/>
+ <transition conf:true="" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test324.txml b/test/samples/w3c/txml/test324.txml
new file mode 100644
index 0000000..d1b304d
--- /dev/null
+++ b/test/samples/w3c/txml/test324.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!-- test that _name stays bound till the session ends. This means that it cannot be assigned to -->
+
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+ <state id="s0">
+ <transition conf:nameVarVal="machineName" target="s1"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign conf:systemVarLocation="_name" expr="'otherName'"/>
+ </onentry>
+ <transition conf:nameVarVal="machineName" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test325.txml b/test/samples/w3c/txml/test325.txml
new file mode 100644
index 0000000..53623c3
--- /dev/null
+++ b/test/samples/w3c/txml/test325.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!-- test that _ioprocessors is bound at startup. I'm not sure how to test for a set value or
+how to test that the entries in it do represent I/O processors, since the set that each implementation
+supports may be different. Suggestions welcome -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:systemVarExpr="_ioprocessors"/>
+ </datamodel>
+
+
+ <state id="s0">
+ <transition conf:isBound="1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test326.txml b/test/samples/w3c/txml/test326.txml
new file mode 100644
index 0000000..008e786
--- /dev/null
+++ b/test/samples/w3c/txml/test326.txml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!-- test that _ioprocessors stays bound till the session ends. This means that it cannot be assigned to -->
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:systemVarExpr="_ioprocessors"/>
+ <data conf:id="2"/>
+ </datamodel>
+
+ <state id="s0">
+ <transition conf:isBound="1" target="s1"/>
+ <transition conf:true="" conf:targetfail=""/>
+ </state>
+
+
+ <state id="s1">
+ <onentry>
+ <assign conf:systemVarLocation="_ioprocessors" conf:quoteExpr="otherName"/>
+ <raise event="foo"/>
+ </onentry>
+
+ <transition event="error.execution" target="s2"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s2">
+ <onentry>
+ <assign conf:location="2" conf:systemVarExpr="_ioprocessors"/>
+ </onentry>
+ <transition conf:VarEqVarStruct="1 2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test329.txml b/test/samples/w3c/txml/test329.txml
new file mode 100644
index 0000000..2552e1f
--- /dev/null
+++ b/test/samples/w3c/txml/test329.txml
@@ -0,0 +1,55 @@
+<!-- test that none of the system variables can be modified -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1"/>
+ <data conf:id="2"/>
+ <data conf:id="3"/>
+ <data conf:id="4"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <!-- get _event bound so we can use it in s1-->
+ <raise event="foo"/>
+ <assign conf:location="1" conf:systemVarExpr="_sessionid"/>
+ <assign conf:systemVarLocation="_sessionid" conf:invalidSessionID=""/>
+ </onentry>
+
+ <transition event="foo" conf:idSystemVarVal="1=_sessionid" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign conf:location="2" conf:systemVarExpr="_event"/>
+ <assign conf:systemVarLocation="_event" expr="27"/>
+ </onentry>
+ <transition conf:idSystemVarVal="2=_event" target="s2"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s2">
+ <onentry>
+ <assign conf:location="3" conf:systemVarExpr="_name"/>
+ <assign conf:systemVarLocation="_name" expr="27"/>
+ </onentry>
+ <transition conf:idSystemVarVal="3=_name" target="s3"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+<state id="s3">
+ <onentry>
+ <assign conf:location="4" conf:systemVarExpr="_ioprocessors"/>
+ <assign conf:systemVarLocation="_ioprocessors" expr="27"/>
+ </onentry>
+ <transition conf:idSystemVarVal="4=_ioprocessors" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test330.txml b/test/samples/w3c/txml/test330.txml
new file mode 100644
index 0000000..7778fad
--- /dev/null
+++ b/test/samples/w3c/txml/test330.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<!-- check that the required fields are present in both internal and external events -->
+
+<scxml initial="s0" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" conf:eventFieldsAreBound="" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" conf:eventFieldsAreBound="" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test331.txml b/test/samples/w3c/txml/test331.txml
new file mode 100644
index 0000000..a273b14
--- /dev/null
+++ b/test/samples/w3c/txml/test331.txml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<scxml version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" name="machineName">
+
+<!-- test that _event.type is set correctly for internal, platform, and external events -->
+<datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <!-- internal event -->
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" target="s1">
+ <assign conf:location="1" conf:eventType=""/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s1">
+ <transition conf:idQuoteVal="1=internal" target="s2"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s2">
+ <onentry>
+ <!-- this will generate an error, which is a platform event -->
+ <assign conf:location="2" conf:expr="1"/>
+ </onentry>
+ <transition event="error" target="s3">
+ <assign conf:location="1" conf:eventType=""/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s3">
+ <transition conf:idQuoteVal="1=platform" target="s4"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <state id="s4">
+ <onentry>
+ <!-- external event -->
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" target="s5">
+ <assign conf:location="1" conf:eventType=""/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+
+<state id="s5">
+ <transition conf:idQuoteVal="1=external" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </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>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test332.txml b/test/samples/w3c/txml/test332.txml
new file mode 100644
index 0000000..0f87545
--- /dev/null
+++ b/test/samples/w3c/txml/test332.txml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+
+<!-- test that sendid is present in error events triggered by send errors -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" initial="s0" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1"/>
+ <data conf:id="2"/>
+ </datamodel>
+
+
+ <state id="s0">
+ <onentry>
+ <!-- this will raise an error and also store the sendid in var1 -->
+ <send conf:illegalTarget="" event="foo" conf:idlocation="1"/>
+ </onentry>
+ <transition event="error" target="s1">
+ <!-- get the sendid out of the error event -->
+ <assign conf:location="2" conf:eventSendid=""/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+<!-- make sure that the sendid in the error event matches the one generated when send executed -->
+ <transition conf:VarEqVar="1 2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test333.txml b/test/samples/w3c/txml/test333.txml
new file mode 100644
index 0000000..38a5097
--- /dev/null
+++ b/test/samples/w3c/txml/test333.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- make sure sendid is blank in a non-error event -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" initial="s0" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" conf:eventFieldHasNoValue="sendid" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test335.txml b/test/samples/w3c/txml/test335.txml
new file mode 100644
index 0000000..e9c70b2
--- /dev/null
+++ b/test/samples/w3c/txml/test335.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- test that origin field is blank for internal events -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" initial="s0" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" conf:eventFieldHasNoValue="origin" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test336.txml b/test/samples/w3c/txml/test336.txml
new file mode 100644
index 0000000..889cb94
--- /dev/null
+++ b/test/samples/w3c/txml/test336.txml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+
+<!-- test that the origin field of an external event contains a URL that lets you send back to the originator. In
+this case it's the same session, so if we get bar we succeed -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" target="s1">
+ <conf:sendToSender name="bar"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <onentry>
+ <send event="baz"/>
+ </onentry>
+ <transition event="bar" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test337.txml b/test/samples/w3c/txml/test337.txml
new file mode 100644
index 0000000..4d5e44f
--- /dev/null
+++ b/test/samples/w3c/txml/test337.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- test that origintype is blank on internal events -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" name="machineName" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" conf:eventFieldHasNoValue="origintype" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test338.txml b/test/samples/w3c/txml/test338.txml
new file mode 100644
index 0000000..5f81086
--- /dev/null
+++ b/test/samples/w3c/txml/test338.txml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+
+<!-- test that invokeid is set correctly in events received from an invoked process. timeout event catches the
+case where the invoke doesn't work correctly -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+ <data conf:id="2"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+ <invoke conf:idlocation="1" type="http://www.w3.org/TR/scxml/" >
+ <content>
+ <scxml initial="sub0" version="1.0" conf:datamodel="" name="machineName">
+ <final id="sub0">
+ <onentry>
+ <send target="#_parent" event="event1"/>
+ </onentry>
+ </final>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="event1" target="s1">
+ <assign conf:location="2" conf:eventField="invokeid"/>
+ </transition>
+ <transition event="event0" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition conf:VarEqVar="1 2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test339.txml b/test/samples/w3c/txml/test339.txml
new file mode 100644
index 0000000..7ea1081
--- /dev/null
+++ b/test/samples/w3c/txml/test339.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<!-- test that invokeid is blank in an event that wasn't returned from an invoked process -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" conf:eventFieldHasNoValue="invokeid" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test342.txml b/test/samples/w3c/txml/test342.txml
new file mode 100644
index 0000000..d8f330a
--- /dev/null
+++ b/test/samples/w3c/txml/test342.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!-- test that eventexpr works and sets the name field of the resulting event -->
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:quoteExpr="foo"/>
+ <data conf:id="2"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <send conf:eventExpr="1"/>
+ </onentry>
+ <transition event="foo" target="s1">
+ <assign conf:location="2" conf:eventField="name"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition conf:VarEqVar="1 2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test343.txml b/test/samples/w3c/txml/test343.txml
new file mode 100644
index 0000000..1d13da6
--- /dev/null
+++ b/test/samples/w3c/txml/test343.txml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!-- test that illegal <param> produces error.execution and empty event.data -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+
+
+ <state id="s0" initial="s01">
+ <!-- we should get the error before the done event -->
+ <transition event="error.execution" target="s1"/>
+ <transition event="done.state.s0" conf:targetfail=""/>
+
+ <transition event="done.state.s0" conf:targetfail="">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param conf:location="foo" name="someParam"/>
+ </donedata>
+ </final>
+ </state>
+
+
+ <!-- if we get here, we received the error event. Now check that the done
+ event has empty event.data -->
+
+ <state id="s1">
+ <transition event="done.state.s0" conf:emptyEventData="" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test344.txml b/test/samples/w3c/txml/test344.txml
new file mode 100644
index 0000000..8bf6270
--- /dev/null
+++ b/test/samples/w3c/txml/test344.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that a non-boolean cond expression evaluates to false and causes error.execution to be raised -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
+ conf:datamodel="" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+<state id="s0">
+ <transition conf:nonBoolean="" conf:targetfail=""/>
+ <transition target="s1"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test346.txml b/test/samples/w3c/txml/test346.txml
new file mode 100644
index 0000000..10db614
--- /dev/null
+++ b/test/samples/w3c/txml/test346.txml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+
+<!-- test that any attempt to change the value of a system variable causes error.execution to be raised.
+Event1..4 are there to catch the case where the error event is not raised. In cases where it is, we have
+to dispose of eventn in the next state, hence the targetless transitions (which simply throw away the event.) -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+ <state id="s0">
+ <onentry>
+ <assign conf:systemVarLocation="_sessionid" conf:quoteExpr="otherName"/>
+ <raise event="event1"/>
+ </onentry>
+
+ <transition event="error.execution" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <onentry>
+ <assign conf:systemVarLocation="_event" conf:quoteExpr="otherName"/>
+ <raise event="event2"/>
+ </onentry>
+ <!-- throw out event1 if it's still around -->
+ <transition event="event1"/>
+ <transition event="error.execution" target="s2"/>
+ <!-- event1 would trigger this transition if we didn't drop it. We want this transition to have
+ a very general trigger to catch cases where the wrong error event was raised -->
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s2">
+ <onentry>
+ <assign conf:systemVarLocation="_ioprocessors" conf:quoteExpr="otherName"/>
+ <raise event="event3"/>
+ </onentry>
+ <transition event="event2"/>
+ <transition event="error.execution" target="s3"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s3">
+ <onentry>
+ <assign conf:systemVarLocation="_name" conf:quoteExpr="otherName"/>
+ <raise event="event4"/>
+ </onentry>
+ <transition event="event3"/>
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test355.txml b/test/samples/w3c/txml/test355.txml
new file mode 100644
index 0000000..4136801
--- /dev/null
+++ b/test/samples/w3c/txml/test355.txml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!-- test that default initial state is first in document order. If we enter s0 first we succeed, if s1, failure. -->
+
+
+<scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <transition conf:targetpass=""/>
+</state>
+
+<state id="s1">
+ <transition conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test364.txml b/test/samples/w3c/txml/test364.txml
new file mode 100644
index 0000000..a302f54
--- /dev/null
+++ b/test/samples/w3c/txml/test364.txml
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<!-- test that default initial states are entered when a compound state is entered. First we test
+the 'initial' attribute, then the initial element, then default to the first child in document order.
+If we get to s01111 we succeed, if any other state, failure. -->
+
+
+<scxml conf:datamodel="" initial="s1" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s1" initial="s11p112 s11p122">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+ <state id="s11" initial="s111">
+ <state id="s111"/>
+ <parallel id="s11p1">
+ <state id="s11p11" initial="s11p111">
+ <state id="s11p111"/>
+ <state id="s11p112">
+ <onentry>
+ <raise event="In-s11p112"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s11p12" initial="s11p121">
+ <state id="s11p121"/>
+ <state id="s11p122">
+ <transition event="In-s11p112" target="s2"/>
+ </state>
+ </state>
+ </parallel>
+ </state>
+</state>
+
+<state id="s2">
+ <initial>
+ <transition target="s21p112 s21p122"/>
+ </initial>
+ <transition event="timeout" conf:targetfail=""/>
+ <state id="s21" initial="s211">
+ <state id="s211"/>
+ <parallel id="s21p1">
+ <state id="s21p11" initial="s21p111">
+ <state id="s21p111"/>
+ <state id="s21p112">
+ <onentry>
+ <raise event="In-s21p112"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s21p12" initial="s21p121">
+ <state id="s21p121"/>
+ <state id="s21p122">
+ <transition event="In-s21p112" target="s3"/>
+ </state>
+ </state>
+ </parallel>
+ </state>
+</state>
+
+<state id="s3">
+ <transition conf:targetfail=""/>
+ <state id="s31">
+ <state id="s311">
+ <state id="s3111">
+ <transition conf:targetpass=""/>
+ </state>
+ <state id="s3112"/>
+ <state id="s312"/>
+ <state id="s32"/>
+</state>
+</state>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test372.txml b/test/samples/w3c/txml/test372.txml
new file mode 100644
index 0000000..84cb8f6
--- /dev/null
+++ b/test/samples/w3c/txml/test372.txml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!-- test that entering a final state generates done.state.parentid after executing the onentry elements.
+Var1 should be set to 2 (but not 3) by the time the event is raised -->
+
+
+<scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0" initial="s0final">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="done.state.s0" conf:idVal="1=2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+
+ <final id="s0final">
+ <onentry>
+ <assign conf:location="1" conf:expr="2"/>
+ </onentry>
+ <onexit>
+ <assign conf:location="1" conf:expr="3"/>
+ </onexit>
+ </final>
+</state>
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test375.txml b/test/samples/w3c/txml/test375.txml
new file mode 100644
index 0000000..47d42c5
--- /dev/null
+++ b/test/samples/w3c/txml/test375.txml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!-- test that onentry handlers are executed in document order. event1 should be raised before event2 -->
+
+
+<scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+
+<state id="s0">
+ <onentry>
+ <raise event="event1"/>
+ </onentry>
+ <onentry>
+ <raise event="event2"/>
+ </onentry>
+
+ <transition event="event1" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+
+</state>
+
+<state id="s1">
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test376.txml b/test/samples/w3c/txml/test376.txml
new file mode 100644
index 0000000..86c2c2c
--- /dev/null
+++ b/test/samples/w3c/txml/test376.txml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- test that each onentry handler is a separate block. The <send> of event1 will cause an error but
+ the increment to var1 should happen anyways -->
+
+
+<scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <send conf:illegalTarget="" event="event1"/>
+ </onentry>
+ <onentry>
+ <conf:incrementID id="1"/>
+ </onentry>
+
+ <transition conf:idVal="1=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test377.txml b/test/samples/w3c/txml/test377.txml
new file mode 100644
index 0000000..bca44ca
--- /dev/null
+++ b/test/samples/w3c/txml/test377.txml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!-- test that onexit handlers are executed in document order. event1 should be raised before event2 -->
+
+
+<scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+
+<state id="s0">
+ <onexit>
+ <raise event="event1"/>
+ </onexit>
+ <onexit>
+ <raise event="event2"/>
+ </onexit>
+
+ <transition target="s1"/>
+ </state>
+
+ <state id="s1">
+
+ <transition event="event1" target="s2"/>
+ <transition event="*" conf:targetfail=""/>
+
+</state>
+
+<state id="s2">
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test378.txml b/test/samples/w3c/txml/test378.txml
new file mode 100644
index 0000000..0e553c4
--- /dev/null
+++ b/test/samples/w3c/txml/test378.txml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- test that each onexithandler is a separate block. The <send> of event1 will cause an error but
+ the increment to var1 should happen anyways -->
+
+
+<scxml version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onexit>
+ <send conf:illegalTarget="" event="event1"/>
+ </onexit>
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+
+<transition target="s1"/>
+</state>
+
+<state id="s1">
+ <transition conf:idVal="1=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test387.txml b/test/samples/w3c/txml/test387.txml
new file mode 100644
index 0000000..8997580
--- /dev/null
+++ b/test/samples/w3c/txml/test387.txml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<!-- test that the default history state works correctly. From initial state s3 we take a transition to s0's default
+shallow history state. That should generate "enteringS011", which takes us to s4. In s4, we
+transition to s1's default deep history state. We should end up in s122, generating "enteringS122". Otherwise failure.-->
+
+
+<scxml initial="s3" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+
+ <transition event="enteringS011" target="s4"/>
+ <transition event="*" conf:targetfail=""/>
+
+ <history type="shallow" id="s0HistShallow">
+ <transition target="s01"/>
+ </history>
+ <history type="deep" id="s0HistDeep">
+ <transition target="s022"/>
+ </history>
+ <state id="s01" initial="s011">
+ <state id="s011">
+ <onentry>
+ <raise event="enteringS011"/>
+ </onentry>
+ </state>
+ <state id="s012">
+ <onentry>
+ <raise event="enteringS012"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s02" initial="s021">
+ <state id="s021">
+ <onentry>
+ <raise event="enteringS021"/>
+ </onentry>
+ </state>
+ <state id="s022">
+ <onentry>
+ <raise event="enteringS022"/>
+ </onentry>
+ </state>
+ </state>
+
+</state>
+
+<state id="s1" initial="s11">
+
+ <transition event="enteringS122" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+
+ <history type="shallow" id="s1HistShallow">
+ <transition target="s11"/>
+ </history>
+ <history type="deep" id="s1HistDeep">
+ <transition target="s122"/>
+ </history>
+ <state id="s11" initial="s111">
+ <state id="s111">
+ <onentry>
+ <raise event="enteringS111"/>
+ </onentry>
+ </state>
+ <state id="s112">
+ <onentry>
+ <raise event="enteringS112"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s12" initial="s121">
+ <state id="s121">
+ <onentry>
+ <raise event="enteringS121"/>
+ </onentry>
+ </state>
+ <state id="s122">
+ <onentry>
+ <raise event="enteringS122"/>
+ </onentry>
+ </state>
+ </state>
+
+</state>
+
+
+<state id="s3">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition target="s0HistShallow"/>
+</state>
+
+<state id="s4">
+ <transition target="s1HistDeep"/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test388.txml b/test/samples/w3c/txml/test388.txml
new file mode 100644
index 0000000..36d58cc
--- /dev/null
+++ b/test/samples/w3c/txml/test388.txml
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!-- test that history states works correctly. The counter Var1 counts how many times
+we have entered s0. The initial state is s012. We then transition to s1, which transitions
+to s0's deep history state. entering.s012 should be raised, otherwise failure. Then we transition
+to s02, which transitions to s0's shallow history state. That should have value s01, and its initial
+state is s011, so we should get entering.s011, otherwise failure.-->
+
+
+<scxml version="1.0" initial="s012" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<state id="s0" initial="s01">
+ <onentry>
+ <conf:incrementID id="1"/>
+ </onentry>
+
+ <!-- the first time through, go to s1, setting a timer just in case something hangs -->
+ <transition event="entering.s012" conf:idVal="1=1" target="s1">
+ <send event="timeout" delay="2s"/>
+ </transition>
+
+ <!-- the second time, we should get entering.s012. If so, go to s2, otherwise fail -->
+ <transition event="entering.s012" conf:idVal="1=2" target="s2"/>
+ <transition event="entering" conf:idVal="1=2" conf:targetfail=""/>
+
+ <!-- the third time we should get entering-s011. If so, pass, otherwise fail -->
+ <transition event="entering.s011" conf:idVal="1=3" conf:targetpass=""/>
+ <transition event="entering" conf:idVal="1=3" conf:targetfail=""/>
+
+ <!-- if we timeout, the state machine is hung somewhere, so fail -->
+ <transition event="timeout" conf:targetfail=""/>
+
+ <history type="shallow" id="s0HistShallow">
+ <transition target="s02"/>
+ </history>
+ <history type="deep" id="s0HistDeep">
+ <transition target="s022"/>
+ </history>
+ <state id="s01" initial="s011">
+ <state id="s011">
+ <onentry>
+ <raise event="entering.s011"/>
+ </onentry>
+ </state>
+ <state id="s012">
+ <onentry>
+ <raise event="entering.s012"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s02" initial="s021">
+ <state id="s021">
+ <onentry>
+ <raise event="entering.s021"/>
+ </onentry>
+ </state>
+ <state id="s022">
+ <onentry>
+ <raise event="entering.s022"/>
+ </onentry>
+ </state>
+ </state>
+
+</state>
+
+
+<state id="s1">
+ <transition target="s0HistDeep"/>
+</state>
+
+<state id="s2">
+ <transition target="s0HistShallow"/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test396.txml b/test/samples/w3c/txml/test396.txml
new file mode 100644
index 0000000..3af03c9
--- /dev/null
+++ b/test/samples/w3c/txml/test396.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!-- test that the value in _event.name matches the event name used to match against transitions -->
+
+
+<scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+
+
+ <transition event="foo" conf:eventNameVal="foo" conf:targetpass=""/>
+ <transition event="foo" conf:targetfail=""/>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test399.txml b/test/samples/w3c/txml/test399.txml
new file mode 100644
index 0000000..9eeced2
--- /dev/null
+++ b/test/samples/w3c/txml/test399.txml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!-- test that the event name matching works correctly, including prefix matching and the fact
+that the event attribute of transition may contain multiple event designators. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <!-- this will catch the failure case -->
+ <transition event="timeout" conf:targetfail=""/>
+
+ <state id="s01">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <!-- test that an event can match against a transition with multiple descriptors -->
+ <transition event="foo bar" target="s02"/>
+ </state>
+
+ <state id="s02">
+ <onentry>
+ <raise event="bar"/>
+ </onentry>
+ <!-- test that an event can match the second descriptor as well -->
+ <transition event="foo bar" target="s03"/>
+ </state>
+
+ <state id="s03">
+ <onentry>
+ <raise event="foo.zoo"/>
+ </onentry>
+ <!-- test that a prefix descriptor matches -->
+ <transition event="foo bar" target="s04"/>
+ </state>
+
+<state id="s04">
+ <onentry>
+ <raise event="foos"/>
+ </onentry>
+ <!-- test that only token prefixes match -->
+ <transition event="foo" conf:targetfail=""/>
+ <transition event="foos" target="s05"/>
+</state>
+
+<state id="s05">
+ <onentry>
+ <raise event="foo.zoo"/>
+ </onentry>
+ <!-- test that .* works at the end of a descriptor -->
+ <transition event="foo.*" target="s06"/>
+ </state>
+
+ <state id="s06">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <!-- test that "*" works by itself -->
+ <transition event="*" conf:targetpass=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test401.txml b/test/samples/w3c/txml/test401.txml
new file mode 100644
index 0000000..a42b719
--- /dev/null
+++ b/test/samples/w3c/txml/test401.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- test that errors go in the internal event queue. We send ourselves an external event foo, then perform
+and operation that raises an error. Then check that the error event is processed first, even though
+it was raised second -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="foo"/>
+ <!-- assigning to a non-existent location should raise an error -->
+ <assign conf:location="1" conf:expr="2"/>
+ </onentry>
+
+
+ <transition event="foo" conf:targetfail=""/>
+ <transition event="error" conf:targetpass=""/>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test402.txml b/test/samples/w3c/txml/test402.txml
new file mode 100644
index 0000000..24e84e1
--- /dev/null
+++ b/test/samples/w3c/txml/test402.txml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!-- the assertion that errors are 'like any other event' is pretty broad, but we can check that they
+are pulled off the internal queue in order, and that prefix matching works on them. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <!-- catch the failure case -->
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <state id="s01">
+ <onentry>
+ <!-- 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 conf:location="1" conf:expr="2"/>
+ </onentry>
+
+ <transition event="event1" target="s02">
+ <raise event="event2"/>
+ </transition>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s02">
+ <transition event="error" target="s03"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s03">
+ <transition event="event2" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test403a.txml b/test/samples/w3c/txml/test403a.txml
new file mode 100644
index 0000000..88bc4dc
--- /dev/null
+++ b/test/samples/w3c/txml/test403a.txml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!-- we test one part of 'optimal enablement' meaning that of all transitions that are enabled, we chose the ones
+in child states over parent states, and use document order to break ties. We have
+a parent state s0 with two children, s01 and s02. In s01, we test that a) if
+a transition in the child matches, we don't consider matches in the parent and b)
+that if two transitions match in any state, we take the first in document order.
+In s02 we test that we take a transition in the parent if there is no
+matching transition in the child. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <!-- catch the failure case -->
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+ <transition event="event1" conf:targetfail=""/>
+ <transition event="event2" conf:targetpass=""/>
+
+ <state id="s01">
+ <onentry>
+ <!-- this should be caught by the first transition in this state, taking us to S02 -->
+ <raise event="event1"/>
+ </onentry>
+
+ <transition event="event1" target="s02"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s02">
+ <onentry>
+ <!-- since the local transition has a cond that evaluates to false this should be caught by a
+ transition in the parent state, taking us to pass -->
+ <raise event="event2"/>
+ </onentry>
+ <transition event="event1" conf:targetfail=""/>
+ <transition event="event2" conf:false="" conf:targetfail=""/>
+ </state>
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test403b.txml b/test/samples/w3c/txml/test403b.txml
new file mode 100644
index 0000000..c3ee1f8
--- /dev/null
+++ b/test/samples/w3c/txml/test403b.txml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!-- we test that 'optimally enabled set' really is a set, specifically that if a transition is optimally enabled in
+two different states, it is taken only once. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<state id="s0" initial="p0">
+ <!-- this transition should never be taken because a transition in a lower state should
+ always be selected -->
+ <transition event="event1">
+ <conf:incrementID id="1"/>
+ </transition>
+
+
+
+ <parallel id="p0">
+
+ <onentry>
+ <raise event="event1"/>
+ <raise event="event2"/>
+ </onentry>
+
+ <!-- this transition will be selected by both states p0s1 and p0s2, but should be executed only once -->
+ <transition event="event1">
+ <conf:incrementID id="1"/>
+ </transition>
+
+ <state id="p0s1">
+ <transition event="event2" conf:idVal="1=1" conf:targetpass=""/>
+ <transition event="event2" conf:targetfail=""/>
+ </state>
+
+ <state id="p0s2"/>
+
+</parallel>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test403c.txml b/test/samples/w3c/txml/test403c.txml
new file mode 100644
index 0000000..8af1aac
--- /dev/null
+++ b/test/samples/w3c/txml/test403c.txml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!-- we test 'optimally enabled set', specifically that preemption works correctly -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" expr="0"/>
+ </datamodel>
+
+<state id="s0" initial="p0">
+ <onentry>
+ <raise event="event1"/>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="event2" conf:targetfail=""/>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <parallel id="p0">
+
+ <state id="p0s1">
+ <transition event="event1"/>
+ <transition event="event2"/>
+ </state>
+
+ <state id="p0s2">
+ <transition event="event1" target="p0s1">
+ <raise event="event2"/>
+ </transition>
+
+ </state>
+
+ <state id="p0s3">
+ <!-- this transition should be blocked by the one in p0s2-->
+ <transition event="event1" conf:targetfail=""/>
+ <!-- this transition will preempt the one that p0s2 inherits
+ from an ancestor -->
+ <transition event="event2" target="s1"/>
+
+ </state>
+
+<state id="p0s4">
+ <!-- this transition never gets preempted, should fire twice -->
+ <transition event="*">
+ <conf:incrementID id="1"/>
+ </transition>
+ </state>
+
+</parallel>
+</state>
+
+<state id="s1">
+ <transition conf:idVal="1=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test404.txml b/test/samples/w3c/txml/test404.txml
new file mode 100644
index 0000000..6734dbd
--- /dev/null
+++ b/test/samples/w3c/txml/test404.txml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!-- test that states are exited in exit order (children before parents with reverse doc order used to break ties
+ before the executable content in the transitions. event1, event2, event3, event4 should be raised in that
+ order when s01p is exited -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01p">
+
+
+
+<parallel id="s01p">
+ <onexit>
+ <!-- this should be the 3rd event raised -->
+ <raise event="event3"/>
+ </onexit>
+ <transition target="s02">
+ <!-- this should be the fourth event raised -->
+ <raise event="event4"/>
+ </transition>
+
+ <state id="s01p1">
+ <onexit>
+ <!-- this should be the second event raised -->
+ <raise event="event2"/>
+ </onexit>
+ </state>
+
+ <state id="s01p2">
+ <!-- this should be the first event raised -->
+ <onexit>
+ <raise event="event1"/>
+ </onexit>
+ </state>
+ </parallel>
+
+ <state id="s02">
+ <transition event="event1" target="s03"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s03">
+ <transition event="event2" target="s04"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s04">
+ <transition event="event3" target="s05"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s05">
+ <transition event="event4" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test405.txml b/test/samples/w3c/txml/test405.txml
new file mode 100644
index 0000000..ca8254e
--- /dev/null
+++ b/test/samples/w3c/txml/test405.txml
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!-- test that the executable content in the transitions is executed in document order after
+the states are exited. event1, event2, event3, event4 should be raised in that order when the
+state machine is entered -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0" initial="s01p">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+<parallel id="s01p">
+ <transition event="event1" target="s02"/>
+
+
+ <state id="s01p1" initial="s01p11">
+ <state id="s01p11">
+ <onexit>
+ <!-- this should be the second event raised -->
+ <raise event="event2"/>
+ </onexit>
+ <transition target="s01p12">
+ <!-- this should be the third event raised -->
+ <raise event="event3"/>
+ </transition>
+ </state>
+ <state id="s01p12"/>
+ </state> <!-- end s01p1 -->
+
+ <state id="s01p2" initial="s01p21">
+ <state id="s01p21">
+ <onexit>
+ <!-- this should be the first event raised -->
+ <raise event="event1"/>
+ </onexit>
+ <transition target="s01p22">
+ <!-- this should be the fourth event raised -->
+ <raise event="event4"/>
+ </transition>
+ </state>
+ <state id="s01p22"/>
+
+ </state> <!-- end s01p2 -->
+ </parallel>
+
+
+ <state id="s02">
+ <transition event="event2" target="s03"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s03">
+ <transition event="event3" target="s04"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+ <state id="s04">
+ <transition event="event4" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ </state> <!-- end s01 -->
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test406.txml b/test/samples/w3c/txml/test406.txml
new file mode 100644
index 0000000..9504381
--- /dev/null
+++ b/test/samples/w3c/txml/test406.txml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!-- Test that states are entered in entry order (parents before children with document order used to break ties)
+after the executable content in the transition is executed. event1, event2, event3, event4 should be raised in that
+order when the transition in s01 is taken -->
+
+<scxml version="1.0" initial="s0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <state id="s01">
+ <transition target="s0p2">
+ <!-- this should be the first event raised -->
+ <raise event="event1"/>
+ </transition>
+ </state>
+
+<parallel id="s0p2">
+
+ <transition event="event1" target="s03"/>
+
+ <state id="s01p21" >
+ <onentry>
+ <!-- third event -->
+ <raise event="event3"/>
+ </onentry>
+ </state>
+
+ <state id="s01p22">
+ <onentry>
+ <!-- the fourth event -->
+ <raise event="event4"/>
+ </onentry>
+ </state>
+
+ <onentry>
+ <!-- this should be the second event raised -->
+ <raise event="event2"/>
+ </onentry>
+ </parallel>
+
+
+ <state id="s03">
+ <transition event="event2" target="s04"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s04">
+ <transition event="event3" target="s05"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+ <state id="s05">
+ <transition event="event4" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ </state> <!-- end s0 -->
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test407.txml b/test/samples/w3c/txml/test407.txml
new file mode 100644
index 0000000..fdef966
--- /dev/null
+++ b/test/samples/w3c/txml/test407.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- a simple test that onexit handlers work. var1 should be incremented when we leave s0 -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<state id="s0">
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+ <transition target="s1"/>
+</state>
+
+<state id="s1">
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test409.txml b/test/samples/w3c/txml/test409.txml
new file mode 100644
index 0000000..abc92ee
--- /dev/null
+++ b/test/samples/w3c/txml/test409.txml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!-- we test that states are removed from the active states list as they are exited. When s01's onexit handler
+fires, s011 should not be on the active state list, so in(S011) should be false, and event1 should not
+be raised. Therefore the timeout should fire to indicate success -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
+ <transition event="timeout" conf:targetpass=""/>
+ <transition event="event1" conf:targetfail=""/>
+
+ <state id="s01" initial="s011">
+ <onexit>
+ <if conf:inState="s011">
+ <raise event="event1"/>
+ </if>
+ </onexit>
+
+ <state id="s011">
+ <transition target="s02"/>
+ </state>
+ </state> <!-- end s01 -->
+
+<state id="s02"/>
+
+</state> <!-- end s0 -->
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test411.txml b/test/samples/w3c/txml/test411.txml
new file mode 100644
index 0000000..149e21e
--- /dev/null
+++ b/test/samples/w3c/txml/test411.txml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!-- we test that states are added to the active states list as they are entered and before onentry handlers
+are executed. When s0's onentry handler fires we should not be in s01. But when s01's onentry handler
+fires, we should be in s01. Therefore event1 should not fire, but event2 should. Either event1 or
+timeout also indicates failure -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ <if conf:inState="s01">
+ <raise event="event1"/>
+ </if>
+ </onentry>
+
+ <transition event="timeout" conf:targetfail=""/>
+ <transition event="event1" conf:targetfail=""/>
+ <transition event="event2" conf:targetpass=""/>
+
+ <state id="s01" >
+ <onentry>
+ <if conf:inState="s01">
+ <raise event="event2"/>
+ </if>
+ </onentry>
+ </state>
+
+</state> <!-- end s0 -->
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test412.txml b/test/samples/w3c/txml/test412.txml
new file mode 100644
index 0000000..6eb703f
--- /dev/null
+++ b/test/samples/w3c/txml/test412.txml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!-- test that executable content in the <initial> transition executes after the onentry handler on the state
+and before the onentry handler of the child states. Event1, event2, and event3 should occur in that order. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
+ <transition event="timeout" conf:targetfail=""/>
+ <transition event="event1" conf:targetfail=""/>
+ <transition event="event2" conf:targetpass=""/>
+
+ <state id="s01" >
+ <onentry>
+ <raise event="event1"/>
+ </onentry>
+ <initial>
+ <transition target="s011">
+ <raise event="event2"/>
+ </transition>
+ </initial>
+
+ <state id="s011">
+ <onentry>
+ <raise event="event3"/>
+ </onentry>
+ <transition target="s02"/>
+ </state>
+ </state>
+
+<state id="s02">
+ <transition event="event1" target="s03"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s03">
+ <transition event="event2" target="s04"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s04">
+ <transition event="event3" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+</state> <!-- end s0 -->
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test413.txml b/test/samples/w3c/txml/test413.txml
new file mode 100644
index 0000000..0ac00e3
--- /dev/null
+++ b/test/samples/w3c/txml/test413.txml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!-- test that the state machine is put into the configuration specified by the initial element, without regard
+to any other defaults. we should start off in s2p111 and s2p122. the atomic
+states we should not enter all have immediate transitions to failure in them -->
+
+
+<scxml initial="s2p112 s2p122" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s1">
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s2" initial="s2p1">
+
+<parallel id="s2p1">
+ <!-- this transition will be triggered only if we end up in an illegal configuration where we're in
+ either s2p112 or s2p122, but not both of them -->
+ <transition conf:targetfail=""/>
+
+ <state id="s2p11" initial="s2p111" >
+ <state id="s2p111">
+ <transition conf:targetfail=""/>
+ </state>
+
+ <state id="s2p112">
+ <transition conf:inState="s2p122" conf:targetpass=""/>
+ </state>
+
+ </state> <!-- end s2p11 -->
+
+ <state id="s2p12" initial="s2p121">
+ <state id="s2p121">
+ <transition conf:targetfail=""/>
+ </state>
+
+ <state id="s2p122">
+ <transition conf:inState="s2p112" conf:targetpass=""/>
+ </state>
+ </state>
+
+</parallel>
+
+</state> <!-- end s2 -->
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test416.txml b/test/samples/w3c/txml/test416.txml
new file mode 100644
index 0000000..bb0b6f5
--- /dev/null
+++ b/test/samples/w3c/txml/test416.txml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- test that the done.state.id gets generated when we enter the final state of a compound state -->
+
+
+<scxml version="1.0" initial="s1" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s1" initial="s11">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <state id="s11" initial="s111">
+ <transition event="done.state.s11" conf:targetpass=""/>
+ <state id="s111">
+ <transition target="s11final"/>
+ </state>
+ <final id="s11final"/>
+ </state>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test417.txml b/test/samples/w3c/txml/test417.txml
new file mode 100644
index 0000000..5963d68
--- /dev/null
+++ b/test/samples/w3c/txml/test417.txml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!-- test that we get the done.state.id event when all of a
+parallel elements children enter final states. -->
+
+
+
+<scxml version="1.0" initial="s1" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s1" initial="s1p1">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+
+ <parallel id="s1p1">
+ <transition event="done.state.s1p1" conf:targetpass=""/>
+
+ <state id="s1p11" initial="s1p111">
+ <state id="s1p111">
+ <transition target="s1p11final"/>
+ </state>
+ <final id="s1p11final"/>
+ </state>
+
+ <state id="s1p12" initial="s1p121">
+ <state id="s1p121">
+ <transition target="s1p12final"/>
+ </state>
+ <final id="s1p12final"/>
+ </state>
+
+ </parallel>
+</state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test419.txml b/test/samples/w3c/txml/test419.txml
new file mode 100644
index 0000000..2d8fab7
--- /dev/null
+++ b/test/samples/w3c/txml/test419.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- test that eventless transitions take precedence over event-driven ones -->
+
+
+
+<scxml version="1.0" initial="s1" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s1">
+ <onentry>
+ <raise event="internalEvent"/>
+ <send event="externalEvent"/>
+ </onentry>
+
+ <transition event="*" conf:targetfail=""/>
+ <transition conf:targetpass=""/>
+
+</state>
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test421.txml b/test/samples/w3c/txml/test421.txml
new file mode 100644
index 0000000..4f92719
--- /dev/null
+++ b/test/samples/w3c/txml/test421.txml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- test that internal events take priority over external ones, and that the processor
+keeps pulling off internal events until it finds one that triggers a transition -->
+
+
+
+<scxml version="1.0" initial="s1" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s1" initial="s11">
+ <onentry>
+ <send event="externalEvent"/>
+ <raise event="internalEvent1"/>
+ <raise event="internalEvent2"/>
+ <raise event="internalEvent3"/>
+ <raise event="internalEvent4"/>
+ </onentry>
+
+ <transition event="externalEvent" conf:targetfail=""/>
+
+ <state id="s11">
+ <transition event="internalEvent3" target="s12"/>
+ </state>
+
+ <state id="s12">
+ <transition event="internalEvent4" conf:targetpass=""/>
+ </state>
+
+</state>
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test422.txml b/test/samples/w3c/txml/test422.txml
new file mode 100644
index 0000000..2e830d9
--- /dev/null
+++ b/test/samples/w3c/txml/test422.txml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!-- Test that at the end of a macrostep, the processor executes all invokes in states
+that have been entered and not exited during the step. (The invokes are supposed to be executed
+in document order, but we can test that since each invocation is separate and they may take
+different amounts to time to start up.) In this case, there are three invoke statements,
+in states s1, s11 and s12. Each invoked process returns an event named after its parent state.
+The invokes in s1 and s12 should execute, but not the one
+in s11. So we should receive invokeS1, invokeS12, but not invokeS12. Furthermore, when the timeout fires, var1 should equal 2.-->
+
+<scxml version="1.0" initial="s1" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+ <state id="s1" initial="s11">
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ </onentry>
+ <transition event="invokeS1 invokeS12">
+ <conf:incrementID id="1"/>
+ </transition>
+ <transition event="invokeS11" conf:targetfail=""/>
+
+ <transition event="timeout" conf:idVal="1=2" conf:targetpass=""/>
+ <transition event="timeout" conf:targetfail=""/>
+ <invoke>
+ <content>
+ <!-- when invoked, send 'foo' to parent, then terminate. -->
+ <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub0">
+ <onentry>
+ <send target="#_parent" event="invokeS1"/>
+ </onentry>
+ <transition target="subFinal0"/>
+ </state>
+ <final id="subFinal0"/>
+ </scxml>
+ </content>
+ </invoke>
+
+ <state id="s11">
+ <invoke>
+ <content>
+ <!-- when invoked, send 'foo' to parent, then terminate. -->
+ <scxml initial="sub1" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub1">
+ <onentry>
+ <send target="#_parent" event="invokeS11"/>
+ </onentry>
+ <transition target="subFinal1"/>
+ </state>
+ <final id="subFinal1"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition target="s12"/>
+ </state>
+ <state id="s12">
+ <invoke>
+ <content>
+ <!-- when invoked, send 'foo' to parent, then terminate. -->
+ <scxml initial="sub2" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <state id="sub2">
+ <onentry>
+ <send target="#_parent" event="invokeS12"/>
+ </onentry>
+ <transition target="subFinal2"/>
+ </state>
+ <final id="subFinal2"/>
+ </scxml>
+ </content>
+ </invoke>
+ </state>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test423.txml b/test/samples/w3c/txml/test423.txml
new file mode 100644
index 0000000..fd64587
--- /dev/null
+++ b/test/samples/w3c/txml/test423.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- test that we keep pulling external events off the queue till we find one that matches a transition. -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+ <state id="s0">
+ <onentry>
+ <send event="externalEvent1"/>
+ <send event="externalEvent2" delay="1s"/>
+ <raise event="internalEvent"/>
+ </onentry>
+ <!-- in this state we should process only internalEvent -->
+ <transition event="internalEvent" target="s1"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <!-- in this state we ignore externalEvent1 and wait for externalEvent2 -->
+ <transition event="externalEvent2" conf:targetpass=""/>
+ <transition event="internalEvent" conf:targetfail=""/>
+ </state>
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test436.txml b/test/samples/w3c/txml/test436.txml
new file mode 100644
index 0000000..5d403a2
--- /dev/null
+++ b/test/samples/w3c/txml/test436.txml
@@ -0,0 +1,24 @@
+<?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" datamodel="null"
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="p">
+
+
+ <parallel id="p">
+
+ <state id="ps0">
+ <transition conf:inState="s1" conf:targetfail=""/>
+ <transition conf:inState="ps1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <state id="ps1"/>
+ </parallel>
+
+ <state id="s1"/>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test441a.txml b/test/samples/w3c/txml/test441a.txml
new file mode 100644
index 0000000..9e290a8
--- /dev/null
+++ b/test/samples/w3c/txml/test441a.txml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" datamodel="null"
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" exmode="lax" initial="s01">
+
+<!-- since exmode=lax, the processor should ignore all datamodel elements and complete without an error -->
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="foo" expr="2"/>
+ <script>
+ x = y
+ </script>
+ <foreach array="baz" item="bat">
+ <log expr="this is a mistake"/>
+ </foreach>
+ </onentry>
+
+ <state id="s01" initial="s01final">
+ <final id="s01final">
+ <donedata>
+ <param name="result" expr="foo"/>
+ </donedata>
+ </final>
+ </state>
+
+ <transition conf:idVal="1=1" conf:targetfail=""/>
+ <transition event="error" conf:targetfail=""/>
+ <transition event="done" target="s1"/>
+ </state>
+
+<state id="s1">
+ <onentry>
+ <raise event="noerror"/>
+ </onentry>
+ <transition event="error" conf:targetfail=""/>
+ <transition event="noerror" conf:targetpass=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test441b.txml b/test/samples/w3c/txml/test441b.txml
new file mode 100644
index 0000000..a318b9b
--- /dev/null
+++ b/test/samples/w3c/txml/test441b.txml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" datamodel="null"
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" exmode="strict" initial="s01">
+
+<!-- since exmode=strict, the processor should reject this document. Therefore this is a manual test -->
+<datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <assign location="foo" expr="2"/>
+ <script>
+ x = y
+ </script>
+ <foreach array="baz" item="bat">
+ <log expr="this is a mistake"/>
+ </foreach>
+ </onentry>
+
+
+ <state id="s01" initial="s01final">
+ <final id="s01final">
+ <donedata>
+ <param name="result" expr="foo"/>
+ </donedata>
+ </final>
+ </state>
+
+ <transition conf:targetfail=""/>
+
+ </state>
+
+<state id="s1">
+ <onentry>
+ <raise event="noerror"/>
+ </onentry>
+ <transition event="error" conf:targetfail=""/>
+ <transition event="noerror" conf:targetpass=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test444.txml b/test/samples/w3c/txml/test444.txml
new file mode 100644
index 0000000..2483bdf
--- /dev/null
+++ b/test/samples/w3c/txml/test444.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!-- test that <data> creates a new ecmascript variable. -->
+
+
+<scxml datamodel="ecmascript" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data id="var1" expr="1"/>
+ </datamodel>
+
+<state id="s0">
+<!-- test that var1 can be used as an ecmascript variable -->
+ <transition cond="++var1==2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+</state>
+
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test445.txml b/test/samples/w3c/txml/test445.txml
new file mode 100644
index 0000000..0e12064
--- /dev/null
+++ b/test/samples/w3c/txml/test445.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!-- test that ecmascript objects defined by <data> have value undefined if <data> does not assign a value -->
+
+
+<scxml datamodel="ecmascript" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data id="var1"/>
+ </datamodel>
+
+<state id="s0">
+
+ <transition cond="var1==undefined" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+</state>
+
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test448.txml b/test/samples/w3c/txml/test448.txml
new file mode 100644
index 0000000..594064a
--- /dev/null
+++ b/test/samples/w3c/txml/test448.txml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!-- test that all ecmascript objects are placed in a single global scope -->
+
+
+<scxml datamodel="ecmascript" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+<!-- test that a parent state can access a variable defined in a child -->
+ <transition cond="var1==1" target="s1"/>
+ <transition conf:targetfail=""/>
+ <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" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+ <state id="s01p2">
+ <datamodel>
+ <data id="var2" expr="1"/>
+ </datamodel>
+ </state>
+ </parallel>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test449.txml b/test/samples/w3c/txml/test449.txml
new file mode 100644
index 0000000..3b5e183
--- /dev/null
+++ b/test/samples/w3c/txml/test449.txml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!-- test that ecmascript objects are converted to booleans inside cond -->
+
+
+<scxml datamodel="ecmascript" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <transition cond="'foo'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test451.txml b/test/samples/w3c/txml/test451.txml
new file mode 100644
index 0000000..cfb7f53
--- /dev/null
+++ b/test/samples/w3c/txml/test451.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- simple test of the in() predicate -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" datamodel="ecmascript"
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="p">
+
+
+ <parallel id="p">
+
+ <state id="s0">
+ <transition conf:inState="s1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <state id="s1"/>
+ </parallel>
+
+<conf:pass/>
+<conf:fail/>
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test452.txml b/test/samples/w3c/txml/test452.txml
new file mode 100644
index 0000000..a7d0ed0
--- /dev/null
+++ b/test/samples/w3c/txml/test452.txml
@@ -0,0 +1,27 @@
+<!-- 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 datamodel="ecmascript" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <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" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test453.txml b/test/samples/w3c/txml/test453.txml
new file mode 100644
index 0000000..e4e3fdd
--- /dev/null
+++ b/test/samples/w3c/txml/test453.txml
@@ -0,0 +1,22 @@
+<!-- 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 datamodel="ecmascript" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <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" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test456.txml b/test/samples/w3c/txml/test456.txml
new file mode 100644
index 0000000..50734d7
--- /dev/null
+++ b/test/samples/w3c/txml/test456.txml
@@ -0,0 +1,22 @@
+<!-- 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 initial="s0" version="1.0" datamodel="ecmascript" xmlns="http://www.w3.org/2005/07/scxml"
+xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <script>
+ Var1+=1
+ </script>
+ </onentry>
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml>
diff --git a/test/samples/w3c/txml/test457.txml b/test/samples/w3c/txml/test457.txml
new file mode 100644
index 0000000..5bb856f
--- /dev/null
+++ b/test/samples/w3c/txml/test457.txml
@@ -0,0 +1,62 @@
+<?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> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test460.txml b/test/samples/w3c/txml/test460.txml
new file mode 100644
index 0000000..10d1ce5
--- /dev/null
+++ b/test/samples/w3c/txml/test460.txml
@@ -0,0 +1,26 @@
+<?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> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test463.txml b/test/samples/w3c/txml/test463.txml
new file mode 100644
index 0000000..dd7836b
--- /dev/null
+++ b/test/samples/w3c/txml/test463.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!-- 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 initial="s0" version="1.0" datamodel="xpath"
+ xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data id="foo" expr="2"/>
+ </datamodel>
+
+<state id="s0">
+
+
+ <transition cond="local-name($foo)='data'and $foo/@id ='foo'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test464.txml b/test/samples/w3c/txml/test464.txml
new file mode 100644
index 0000000..7781b8e
--- /dev/null
+++ b/test/samples/w3c/txml/test464.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<!-- test that an unassigned variable creates an empty <data> element -->
+
+<scxml initial="s0" version="1.0" datamodel="xpath"
+ xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data id="foo"/>
+ </datamodel>
+
+<state id="s0">
+
+
+ <transition cond="count($foo) = 1 and count($foo/*) = 0" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test465.txml b/test/samples/w3c/txml/test465.txml
new file mode 100644
index 0000000..d7e1941
--- /dev/null
+++ b/test/samples/w3c/txml/test465.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<!-- test that all xpath variables are in a single global scope-->
+
+<scxml initial="s0" version="1.0" datamodel="xpath"
+ xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data id="foo" expr="2"/>
+ </datamodel>
+
+<state id="s0">
+ <transition cond="count($foo) = 1 and count($bar) = 1" target="s1"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+<state id="s1">
+ <datamodel>
+ <data id="bar" expr="1"/>
+ </datamodel>
+ <transition conf:targetpass=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test466.txml b/test/samples/w3c/txml/test466.txml
new file mode 100644
index 0000000..251743e
--- /dev/null
+++ b/test/samples/w3c/txml/test466.txml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!-- test that xpath expressions are converted to boolean when used as conditional expressions-->
+
+<scxml initial="s0" version="1.0" datamodel="xpath"
+ xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data id="foo" expr="2"/>
+ </datamodel>
+
+<state id="s0">
+ <transition cond="$foo" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test467.txml b/test/samples/w3c/txml/test467.txml
new file mode 100644
index 0000000..21ba39c
--- /dev/null
+++ b/test/samples/w3c/txml/test467.txml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+
+<!-- test that in() is available -->
+
+<scxml initial="s0" version="1.0" datamodel="xpath"
+ xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <transition cond="In('s0')" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test468.txml b/test/samples/w3c/txml/test468.txml
new file mode 100644
index 0000000..cefba19
--- /dev/null
+++ b/test/samples/w3c/txml/test468.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+ <!-- 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" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>
+
diff --git a/test/samples/w3c/txml/test469.txml b/test/samples/w3c/txml/test469.txml
new file mode 100644
index 0000000..cdd5ef5
--- /dev/null
+++ b/test/samples/w3c/txml/test469.txml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+ <!-- 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" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>
diff --git a/test/samples/w3c/txml/test470.txml b/test/samples/w3c/txml/test470.txml
new file mode 100644
index 0000000..556a670
--- /dev/null
+++ b/test/samples/w3c/txml/test470.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+ <!-- 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" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>
diff --git a/test/samples/w3c/txml/test473.txml b/test/samples/w3c/txml/test473.txml
new file mode 100644
index 0000000..1b76058
--- /dev/null
+++ b/test/samples/w3c/txml/test473.txml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+ <!-- 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)"
+ conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test474.txml b/test/samples/w3c/txml/test474.txml
new file mode 100644
index 0000000..aab489b
--- /dev/null
+++ b/test/samples/w3c/txml/test474.txml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+ <!-- 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'"
+ conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test475.txml b/test/samples/w3c/txml/test475.txml
new file mode 100644
index 0000000..c7f860a
--- /dev/null
+++ b/test/samples/w3c/txml/test475.txml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+ <!-- 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'"
+ conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test476.txml b/test/samples/w3c/txml/test476.txml
new file mode 100644
index 0000000..59e620b
--- /dev/null
+++ b/test/samples/w3c/txml/test476.txml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+ <!-- 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'"
+ conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test477.txml b/test/samples/w3c/txml/test477.txml
new file mode 100644
index 0000000..e5a7b5b
--- /dev/null
+++ b/test/samples/w3c/txml/test477.txml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+ <!-- 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'"
+ conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test478.txml b/test/samples/w3c/txml/test478.txml
new file mode 100644
index 0000000..ecb23fc
--- /dev/null
+++ b/test/samples/w3c/txml/test478.txml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+ <!-- 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'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test479.txml b/test/samples/w3c/txml/test479.txml
new file mode 100644
index 0000000..62c2e96
--- /dev/null
+++ b/test/samples/w3c/txml/test479.txml
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+ <!-- 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)" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test480.txml b/test/samples/w3c/txml/test480.txml
new file mode 100644
index 0000000..88687a6
--- /dev/null
+++ b/test/samples/w3c/txml/test480.txml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+ <!-- 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'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test481.txml b/test/samples/w3c/txml/test481.txml
new file mode 100644
index 0000000..48f73e8
--- /dev/null
+++ b/test/samples/w3c/txml/test481.txml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+ <!-- 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'" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test482.txml b/test/samples/w3c/txml/test482.txml
new file mode 100644
index 0000000..9e3c2ff
--- /dev/null
+++ b/test/samples/w3c/txml/test482.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+ <!-- test that system vars are created and bound to XPath variables -->
+
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" name="scxmltest"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" 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'" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test486b.txml b/test/samples/w3c/txml/test486b.txml
new file mode 100644
index 0000000..bac9748
--- /dev/null
+++ b/test/samples/w3c/txml/test486b.txml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+ <!-- test that <script> is processed according to 'exmode'. In this
+ case, the entire file should be rejected (hence this is a manual test -->
+
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" name="scxmltest" exmode="strict"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+ <script>some script</script>
+
+<state id="s0">
+
+ <transition conf:targetfail=""/>
+
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test487.txml b/test/samples/w3c/txml/test487.txml
new file mode 100644
index 0000000..7210c2b
--- /dev/null
+++ b/test/samples/w3c/txml/test487.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!-- test illegal assignment. error.execution should be raised. -->
+
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:illegalExpr=""/>
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <raise event="event"/>
+ </onentry>
+
+ <transition event="error.execution" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test488.txml b/test/samples/w3c/txml/test488.txml
new file mode 100644
index 0000000..c0bb5e4
--- /dev/null
+++ b/test/samples/w3c/txml/test488.txml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!-- test that illegal expr in <param> produces error.execution and empty event.data -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+
+
+ <state id="s0" initial="s01">
+ <!-- we should get the error before the done event -->
+ <transition event="error.execution" target="s1"/>
+ <transition event="done.state.s0" conf:targetfail=""/>
+
+ <transition event="done.state.s0" conf:targetfail="">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param conf:illegalExpr="" name="someParam"/>
+ </donedata>
+ </final>
+ </state>
+
+
+ <!-- if we get here, we received the error event. Now check that the done
+ event has empty event.data -->
+
+ <state id="s1">
+ <transition event="done.state.s0" conf:eventdataVal="" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test503.txml b/test/samples/w3c/txml/test503.txml
new file mode 100644
index 0000000..d15bb7e
--- /dev/null
+++ b/test/samples/w3c/txml/test503.txml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+
+<!-- test that a targetless transition does not exit and reenter its source state -->
+
+<scxml initial="s1" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/> <!-- how often we have exited s2 -->
+ <data conf:id="2" conf:expr="0"/> <!-- how often the targetless transition in s2 has been executed -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition target="s2"/>
+ </state>
+
+ <state id="s2">
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+ <transition event="foo">
+ <conf:incrementID id="2"/>
+ </transition>
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" conf:idVal="2=1" target="s3"/>
+ <transition event="bar" conf:targetfail=""/>
+ </state>
+
+ <state id="s3">
+ <!-- make sure that s2 was exited only once -->
+ <transition conf:idVal="1=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test504.txml b/test/samples/w3c/txml/test504.txml
new file mode 100644
index 0000000..62f601b
--- /dev/null
+++ b/test/samples/w3c/txml/test504.txml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+
+<!-- test that an external transition exits all states up the the LCCA -->
+
+<scxml initial="s1" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/> <!-- how often we have exited p -->
+ <data conf:id="2" conf:expr="0"/> <!-- how often we have exited ps1 -->
+ <data conf:id="3" conf:expr="0"/> <!-- how often we have exited ps2 -->
+ <data conf:id="4" conf:expr="0"/> <!-- how often the transition for foo has been taken -->
+ <data conf:id="5" conf:expr="0"/> <!-- how often we have exited s2 -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition target="p"/>
+ </state>
+
+<state id="s2">
+ <onexit>
+ <conf:incrementID id="5"/>
+ </onexit>
+
+<parallel id="p">
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+ <transition event="foo" target="ps1">
+ <conf:incrementID id="4"/>
+ </transition>
+
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" conf:idVal="4=1" target="s3"/>
+ <transition event="bar" conf:targetfail=""/>
+
+ <state id="ps1">
+ <onexit>
+ <conf:incrementID id="2"/>
+ </onexit>
+ </state>
+ <state id="ps2">
+ <onexit>
+ <conf:incrementID id="3"/>
+ </onexit>
+ </state>
+</parallel>
+</state>
+
+<state id="s3">
+ <!-- make sure that p was exited twice -->
+ <transition conf:idVal="1=2" target="s4"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s4">
+ <!-- make sure that ps1 was exited twice -->
+ <transition conf:idVal="2=2" target="s5"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s5">
+ <!-- make sure that ps2 was exited twice -->
+ <transition conf:idVal="3=2" target="s6"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s6">
+ <!-- make sure that s1 was exited once -->
+ <transition conf:idVal="5=1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test505.txml b/test/samples/w3c/txml/test505.txml
new file mode 100644
index 0000000..b141186
--- /dev/null
+++ b/test/samples/w3c/txml/test505.txml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+
+<!-- test that an internal transition does not exit its source state -->
+
+<scxml initial="s1" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/> <!-- how often we have exited s1 -->
+ <data conf:id="2" conf:expr="0"/> <!-- how often we have exited s11 -->
+ <data conf:id="3" conf:expr="0"/> <!-- how often the transition for foo has been taken -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+ <transition event="foo" type="internal" target="s11">
+ <conf:incrementID id="3"/>
+ </transition>
+
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" conf:idVal="3=1" target="s2"/>
+ <transition event="bar" conf:targetfail=""/>
+
+ <state id="s11">
+ <onexit>
+ <conf:incrementID id="2"/>
+ </onexit>
+ </state>
+ </state>
+
+<state id="s2">
+ <!-- make sure that s1 was exited once -->
+ <transition conf:idVal="1=1" target="s3"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+<state id="s3">
+ <!-- make sure that s11 was exited twice -->
+ <transition conf:idVal="2=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test506.txml b/test/samples/w3c/txml/test506.txml
new file mode 100644
index 0000000..b820ad5
--- /dev/null
+++ b/test/samples/w3c/txml/test506.txml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+
+<!-- test that an internal transition whose targets are not proper descendants of its source state
+behaves like an external transition -->
+
+<scxml initial="s1" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/> <!-- how often we have exited s2 -->
+ <data conf:id="2" conf:expr="0"/> <!-- how often we have exited s21 -->
+ <data conf:id="3" conf:expr="0"/> <!-- how often the transition for foo has been taken -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition target="s2"/>
+ </state>
+
+<state id="s2" initial="s21">
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+ <transition event="foo" type="internal" target="s2">
+ <conf:incrementID id="3"/>
+ </transition>
+
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" conf:idVal="3=1" target="s3"/>
+ <transition event="bar" conf:targetfail=""/>
+
+ <state id="s21">
+ <onexit>
+ <conf:incrementID id="2"/>
+ </onexit>
+ </state>
+
+</state>
+
+<state id="s3">
+ <!-- make sure that s2 was exited twice -->
+ <transition conf:idVal="1=2" target="s4"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s4">
+ <!-- make sure that s21 was exited twice -->
+ <transition conf:idVal="2=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test521.txml b/test/samples/w3c/txml/test521.txml
new file mode 100644
index 0000000..75743ef
--- /dev/null
+++ b/test/samples/w3c/txml/test521.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- we test that the processor raises error.communication if it cannot dispatch the event.
+(To create an undispatchable event, we choose a non-existent session as target). If it raises
+the error event, we succeed. Otherwise we eventually timeout and fail. -->
+
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <!-- should cause an error -->
+ <send conf:unreachableTarget="" event="event2"/>
+ <!-- this will get added to the external event queue after the error has been raised -->
+ <send event="timeout"/>
+ </onentry>
+
+ <!-- once we've entered the state, we should check for internal events first -->
+ <transition event="error.communication" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test525.txml b/test/samples/w3c/txml/test525.txml
new file mode 100644
index 0000000..4b367eb
--- /dev/null
+++ b/test/samples/w3c/txml/test525.txml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!-- test that <foreach> does a shallow copy, so that modifying the array does not change
+the iteration behavior. -->
+
+
+<scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1">
+ <conf:array123/>
+ </data>
+ <data conf:id="2" conf:expr="0"/> <!-- counts the number of iterations -->
+ </datamodel>
+
+<state id="s0">
+ <onentry>
+ <foreach conf:item="3" conf:arrayVar="1">
+ <conf:extendArray id="1"/>
+ <conf:incrementID id="2"/>
+ </foreach>
+ </onentry>
+
+ <transition conf:idVal="2=3" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+</state>
+
+
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test527.txml b/test/samples/w3c/txml/test527.txml
new file mode 100644
index 0000000..80894a7
--- /dev/null
+++ b/test/samples/w3c/txml/test527.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- simple test that 'expr' works with <content> -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+
+
+ <state id="s0" initial="s01">
+
+ <transition event="done.state.s0" conf:eventdataVal="foo" conf:targetpass="">
+ </transition>
+
+ <transition event="done.state.s0" conf:targetfail="">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <content conf:quoteExpr="foo"/>
+ </donedata>
+ </final>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test528.txml b/test/samples/w3c/txml/test528.txml
new file mode 100644
index 0000000..69b7bb2
--- /dev/null
+++ b/test/samples/w3c/txml/test528.txml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!-- test that illegal 'expr' produces error.execution and empty event.data -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+
+
+ <state id="s0" initial="s01">
+ <!-- we should get the error before the done event -->
+ <transition event="error.execution" target="s1"/>
+ <transition event="done.state.s0" conf:targetfail=""/>
+
+ <transition event="done.state.s0" conf:targetfail="">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <content conf:illegalExpr=""/>
+ </donedata>
+ </final>
+ </state>
+
+
+ <!-- if we get here, we received the error event. Now check that the done
+ event has empty event.data -->
+
+ <state id="s1">
+ <transition event="done.state.s0" conf:emptyEventData="" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test529.txml b/test/samples/w3c/txml/test529.txml
new file mode 100644
index 0000000..6a6656c
--- /dev/null
+++ b/test/samples/w3c/txml/test529.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- simple test that children workn with <content> -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+
+
+ <state id="s0" initial="s01">
+
+ <transition event="done.state.s0" conf:eventdataVal="21" conf:targetpass="">
+ </transition>
+
+ <transition event="done.state.s0" conf:targetfail="">
+ </transition>
+
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <content>21</content>
+ </donedata>
+ </final>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test530.txml b/test/samples/w3c/txml/test530.txml
new file mode 100644
index 0000000..d64a8d8
--- /dev/null
+++ b/test/samples/w3c/txml/test530.txml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!-- test that <content> child is evaluated when <invoke> is. Var1 is initialized
+with an integer value, then set to an scxml script in the onentry to s0. If <content>
+is evaluated at the right time, we should get invoke.done, otherwise an error -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <assign conf:location="1">
+ <scxml version="1.0"><final/></scxml>
+ </assign>
+ <send event="timeout" delay="2s"/>
+ </onentry>
+
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content conf:varChildExpr="1"/>
+ </invoke>
+
+ <transition event="done.invoke" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+ </scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test533.txml b/test/samples/w3c/txml/test533.txml
new file mode 100644
index 0000000..7a6c82a
--- /dev/null
+++ b/test/samples/w3c/txml/test533.txml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+
+<!-- test that an internal transition whose source state is not compound does exit its source state -->
+
+<scxml initial="s1" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:expr="0"/> <!-- how often we have exited p -->
+ <data conf:id="2" conf:expr="0"/> <!-- how often we have exited ps1 -->
+ <data conf:id="3" conf:expr="0"/> <!-- how often we have exited ps2 -->
+ <data conf:id="4" conf:expr="0"/> <!-- how often the transition for foo has been taken -->
+ </datamodel>
+
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
+ </onentry>
+ <transition target="p"/>
+ </state>
+
+<parallel id="p">
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+ <transition event="foo" type="internal" target="ps1">
+ <conf:incrementID id="4"/>
+ </transition>
+
+ <!-- make sure the transition on foo was actually taken -->
+ <transition event="bar" conf:idVal="4=1" target="s2"/>
+ <transition event="bar" conf:targetfail=""/>
+
+ <state id="ps1">
+ <onexit>
+ <conf:incrementID id="2"/>
+ </onexit>
+ </state>
+ <state id="ps2">
+ <onexit>
+ <conf:incrementID id="3"/>
+ </onexit>
+ </state>
+</parallel>
+
+<state id="s2">
+ <!-- make sure that p was exited twice -->
+ <transition conf:idVal="1=2" target="s3"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s3">
+ <!-- make sure that ps1 was exited twice -->
+ <transition conf:idVal="2=2" target="s4"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s4">
+ <!-- make sure that ps2 was exited twice -->
+ <transition conf:idVal="3=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test537.txml b/test/samples/w3c/txml/test537.txml
new file mode 100644
index 0000000..55ea102
--- /dev/null
+++ b/test/samples/w3c/txml/test537.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!-- test that the root element of the datamodel is <datamodel> and that <data> elements are its
+children-->
+
+<scxml initial="s0" version="1.0" datamodel="xpath"
+ xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data id="foo" expr="2"/>
+ </datamodel>
+
+<state id="s0">
+
+
+ <transition cond="local-name($foo/..)='datamodel'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test539.txml b/test/samples/w3c/txml/test539.txml
new file mode 100644
index 0000000..3f0bd00
--- /dev/null
+++ b/test/samples/w3c/txml/test539.txml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+ <!-- 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 conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition cond="$var2/books/book[2]/@title = 'title2'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test539.txt b/test/samples/w3c/txml/test539.txt
new file mode 100644
index 0000000..de1b0a1
--- /dev/null
+++ b/test/samples/w3c/txml/test539.txt
@@ -0,0 +1,4 @@
+ <books xmlns="">
+ <book title="title1"/>
+ <book title="title2"/>
+ </books> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test540.txml b/test/samples/w3c/txml/test540.txml
new file mode 100644
index 0000000..865bb24
--- /dev/null
+++ b/test/samples/w3c/txml/test540.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+ <!-- 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'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test540.txt b/test/samples/w3c/txml/test540.txt
new file mode 100644
index 0000000..2191239
--- /dev/null
+++ b/test/samples/w3c/txml/test540.txt
@@ -0,0 +1,3 @@
+123
+4 5
+ \ No newline at end of file
diff --git a/test/samples/w3c/txml/test542.txml b/test/samples/w3c/txml/test542.txml
new file mode 100644
index 0000000..95ea8e6
--- /dev/null
+++ b/test/samples/w3c/txml/test542.txml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+ <!-- 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" conf:targetfail=""/>
+ <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'" conf:targetpass=""/>
+ <transition event="done" conf:targetfail=""/>
+ <final id="s11">
+ <donedata>
+ <content>123
+4 5
+ </content>
+ </donedata>
+ </final>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test544.txml b/test/samples/w3c/txml/test544.txml
new file mode 100644
index 0000000..e0ab1da
--- /dev/null
+++ b/test/samples/w3c/txml/test544.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+ <!-- test that kvps are represented as <data> elements under event/data -->
+
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" name="scxmltest"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" 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" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test546.txml b/test/samples/w3c/txml/test546.txml
new file mode 100644
index 0000000..b8f0762
--- /dev/null
+++ b/test/samples/w3c/txml/test546.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+ <!-- test that string content in send is place as a string under event/data -->
+
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" name="scxmltest"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" 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'" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test547.txml b/test/samples/w3c/txml/test547.txml
new file mode 100644
index 0000000..35c415d
--- /dev/null
+++ b/test/samples/w3c/txml/test547.txml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+ <!-- 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" name="scxmltest"
+ 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" expr="'The Zen Mind'"/>
+ </onentry>
+
+ <transition cond="$cart/myCart/books/book[1] = 'The Zen Mind' and $cart/myCart/books/book[2] = 'The Zen Mind'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>
+
diff --git a/test/samples/w3c/txml/test550.txml b/test/samples/w3c/txml/test550.txml
new file mode 100644
index 0000000..89f55a7
--- /dev/null
+++ b/test/samples/w3c/txml/test550.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!-- test that expr can be used to assign a value to a var. This test uses early binding -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" binding="early" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+
+ <transition conf:idVal="1=2" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <state id="s1">
+ <datamodel>
+ <data conf:id="1" conf:expr="2"/>
+ </datamodel>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test551.txml b/test/samples/w3c/txml/test551.txml
new file mode 100644
index 0000000..45c6bf8
--- /dev/null
+++ b/test/samples/w3c/txml/test551.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<!-- test that inline content can be used to assign a value to a var. -->
+
+<scxml initial="s0" version="1.0" binding="early" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+ <state id="s0">
+
+ <transition conf:isBound="1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <datamodel>
+ <data conf:id="1">
+ <conf:array123/>
+ </data>
+ </datamodel>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test552.txml b/test/samples/w3c/txml/test552.txml
new file mode 100644
index 0000000..9489b3e
--- /dev/null
+++ b/test/samples/w3c/txml/test552.txml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+
+<!-- test that src content can be used to assign a value to a var. Edit
+test552.txt to have a value that's legal for the datamodel in question -->
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" src="file:test552.txt"/>
+ </datamodel>
+
+ <state id="s0">
+
+ <transition conf:isBound="1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test552.txt b/test/samples/w3c/txml/test552.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/test/samples/w3c/txml/test552.txt
@@ -0,0 +1 @@
+2 \ No newline at end of file
diff --git a/test/samples/w3c/txml/test553.txml b/test/samples/w3c/txml/test553.txml
new file mode 100644
index 0000000..322d4bb
--- /dev/null
+++ b/test/samples/w3c/txml/test553.txml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- we test that the processor does not dispatch the event if evaluation
+of <send>'s args causes an error.. -->
+
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <!-- timeout event -->
+ <send event="timeout" delay="3s"/>
+ <!-- include a non-existing var in the namelist -->
+ <send event="event1" conf:namelist="2"/>
+ </onentry>
+
+ <!-- if we get the timeout before event1, we assume that event1 hasn't been sent
+ We ignore the error event here because this assertion doesn't mention it -->
+ <transition event="timeout" conf:targetpass=""/>
+ <transition event="event1" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test554.txml b/test/samples/w3c/txml/test554.txml
new file mode 100644
index 0000000..d9ad55b
--- /dev/null
+++ b/test/samples/w3c/txml/test554.txml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- test that if the evaluation of <invoke>'s args causes an error, the
+invocation is cancelled. In this test, that means that we don't get done.invoke
+before the timer goes off. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <send event="timer" delay="2s"/>
+ </onentry>
+
+ <!-- namelist references an undeclared variable -->
+ <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="2">
+ <content>
+ <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="timer" conf:targetpass=""/>
+ <transition event="done.invoke" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test555.txml b/test/samples/w3c/txml/test555.txml
new file mode 100644
index 0000000..12fc459
--- /dev/null
+++ b/test/samples/w3c/txml/test555.txml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+ <!-- 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" conf:targetfail=""/>
+ <!-- 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="*" conf:targetpass=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test557.txml b/test/samples/w3c/txml/test557.txml
new file mode 100644
index 0000000..560c9db
--- /dev/null
+++ b/test/samples/w3c/txml/test557.txml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+ <!-- 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 conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition cond="var2.getElementsByTagName('book')[1].getAttribute('title') == 'title2'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test557.txt b/test/samples/w3c/txml/test557.txt
new file mode 100644
index 0000000..a8e51da
--- /dev/null
+++ b/test/samples/w3c/txml/test557.txt
@@ -0,0 +1,4 @@
+<books xmlns="">
+ <book title="title1"/>
+ <book title="title2"/>
+ </books> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test558.txml b/test/samples/w3c/txml/test558.txml
new file mode 100644
index 0000000..a2491e2
--- /dev/null
+++ b/test/samples/w3c/txml/test558.txml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+ <!-- 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 conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition cond="var2 == 'this is a string'" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test558.txt b/test/samples/w3c/txml/test558.txt
new file mode 100644
index 0000000..bb2bcc7
--- /dev/null
+++ b/test/samples/w3c/txml/test558.txt
@@ -0,0 +1,3 @@
+
+this is
+a string \ No newline at end of file
diff --git a/test/samples/w3c/txml/test560.txml b/test/samples/w3c/txml/test560.txml
new file mode 100644
index 0000000..579422a
--- /dev/null
+++ b/test/samples/w3c/txml/test560.txml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+ <!-- 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" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test561.txml b/test/samples/w3c/txml/test561.txml
new file mode 100644
index 0000000..221145c
--- /dev/null
+++ b/test/samples/w3c/txml/test561.txml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+ <!-- in the ECMA data model, test that processor creates correct DOM structure in
+ _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'"
+ conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test562.txml b/test/samples/w3c/txml/test562.txml
new file mode 100644
index 0000000..a006018
--- /dev/null
+++ b/test/samples/w3c/txml/test562.txml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+ <!-- 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'" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test569.txml b/test/samples/w3c/txml/test569.txml
new file mode 100644
index 0000000..276bd47
--- /dev/null
+++ b/test/samples/w3c/txml/test569.txml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<!-- 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 initial="s0" version="1.0" datamodel="ecmascript" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <transition cond="_ioprocessors['scxml'].location" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test570.txml b/test/samples/w3c/txml/test570.txml
new file mode 100644
index 0000000..6584d9a
--- /dev/null
+++ b/test/samples/w3c/txml/test570.txml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<!-- test that we generate done.state.id when all a parallel state's children are in final states -->
+
+<scxml initial="p0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+<parallel id="p0">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ <raise event="e1"/>
+ <raise event="e2"/>
+ </onentry>
+ <!-- record that we get the first done event -->
+ <transition event="done.state.p0s1">
+ <assign conf:location="1" conf:expr="1"/>
+ </transition>
+ <!-- we should get the second done event before done.state.p0 -->
+ <transition event="done.state.p0s2" target="s1"/>
+ <transition event="timeout" conf:targetfail=""/>
+
+
+ <state id="p0s1" initial="p0s11">
+ <state id="p0s11">
+ <transition event="e1" target="p0s1final"/>
+ </state>
+ <final id="p0s1final"/>
+ </state>
+
+ <state id="p0s2" initial="p0s21">
+ <state id="p0s21">
+ <transition event="e2" target="p0s2final"/>
+ </state>
+ <final id="p0s2final"/>
+ </state>
+
+ </parallel>
+
+ <state id="s1">
+ <!-- if we get done.state.p0, success -->
+ <transition event="done.state.p0" conf:idVal="1=1" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/samples/w3c/txml/test576.txml b/test/samples/w3c/txml/test576.txml
new file mode 100644
index 0000000..4c4b34a
--- /dev/null
+++ b/test/samples/w3c/txml/test576.txml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!-- test that the 'initial' value of scxml is respected. We set the value to deeply nested non-default parallel siblings and
+test that both are entered. -->
+
+
+<scxml initial="s11p112 s11p122" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <transition conf:targetfail=""/>
+</state>
+
+<state id="s1">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="timeout" conf:targetfail=""/>
+ <state id="s11" initial="s111">
+ <state id="s111"/>
+ <parallel id="s11p1">
+ <state id="s11p11" initial="s11p111">
+ <state id="s11p111"/>
+ <state id="s11p112">
+ <onentry>
+ <raise event="In-s11p112"/>
+ </onentry>
+ </state>
+ </state>
+ <state id="s11p12" initial="s11p121">
+ <state id="s11p121"/>
+ <state id="s11p122">
+ <transition event="In-s11p112" conf:targetpass=""/>
+ </state>
+ </state>
+ </parallel>
+ </state>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+</scxml> \ No newline at end of file