summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-11 14:12:28 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-11 14:12:28 (GMT)
commitc30b602cdb5ede809b960e35fc7e702b7f1f76e2 (patch)
treea7935d13b35abde551d7b06836b4bc617fc5274e /test
parentb95a9c2d23c4bfba84dfac8683c47153d598e09f (diff)
downloaduscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.zip
uscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.tar.gz
uscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.tar.bz2
Reformatted w3c tests with xmllint
Diffstat (limited to 'test')
-rwxr-xr-xtest/w3c/convert-tests.sh10
-rw-r--r--test/w3c/draft/calc.scxml273
-rw-r--r--test/w3c/ecma/test144.scxml46
-rw-r--r--test/w3c/ecma/test147.scxml61
-rw-r--r--test/w3c/ecma/test148.scxml61
-rw-r--r--test/w3c/ecma/test149.scxml52
-rw-r--r--test/w3c/ecma/test150.scxml80
-rw-r--r--test/w3c/ecma/test151.scxml80
-rw-r--r--test/w3c/ecma/test152.scxml93
-rw-r--r--test/w3c/ecma/test153.scxml69
-rw-r--r--test/w3c/ecma/test155.scxml51
-rw-r--r--test/w3c/ecma/test156.scxml55
-rw-r--r--test/w3c/ecma/test158.scxml48
-rw-r--r--test/w3c/ecma/test159.scxml42
-rw-r--r--test/w3c/ecma/test172.scxml41
-rw-r--r--test/w3c/ecma/test173.scxml43
-rw-r--r--test/w3c/ecma/test174.scxml43
-rw-r--r--test/w3c/ecma/test175.scxml51
-rw-r--r--test/w3c/ecma/test176.scxml59
-rw-r--r--test/w3c/ecma/test178.scxml46
-rw-r--r--test/w3c/ecma/test179.scxml39
-rw-r--r--test/w3c/ecma/test183.scxml42
-rw-r--r--test/w3c/ecma/test185.scxml46
-rw-r--r--test/w3c/ecma/test186.scxml59
-rw-r--r--test/w3c/ecma/test187.scxml53
-rw-r--r--test/w3c/ecma/test189.scxml45
-rw-r--r--test/w3c/ecma/test190.scxml67
-rw-r--r--test/w3c/ecma/test191.scxml48
-rw-r--r--test/w3c/ecma/test192.scxml93
-rw-r--r--test/w3c/ecma/test193.scxml53
-rw-r--r--test/w3c/ecma/test194.scxml46
-rw-r--r--test/w3c/ecma/test198.scxml40
-rw-r--r--test/w3c/ecma/test199.scxml38
-rw-r--r--test/w3c/ecma/test200.scxml38
-rw-r--r--test/w3c/ecma/test201.scxml40
-rw-r--r--test/w3c/ecma/test205.scxml62
-rw-r--r--test/w3c/ecma/test207.scxml91
-rw-r--r--test/w3c/ecma/test208.scxml43
-rw-r--r--test/w3c/ecma/test210.scxml48
-rw-r--r--test/w3c/ecma/test215.scxml52
-rw-r--r--test/w3c/ecma/test216.scxml46
-rw-r--r--test/w3c/ecma/test216sub1.scxml10
-rw-r--r--test/w3c/ecma/test220.scxml48
-rw-r--r--test/w3c/ecma/test223.scxml56
-rw-r--r--test/w3c/ecma/test224.scxml61
-rw-r--r--test/w3c/ecma/test225.scxml68
-rw-r--r--test/w3c/ecma/test226.scxml43
-rw-r--r--test/w3c/ecma/test226sub1.scxml24
-rw-r--r--test/w3c/ecma/test228.scxml64
-rw-r--r--test/w3c/ecma/test229.scxml72
-rw-r--r--test/w3c/ecma/test230.scxml106
-rw-r--r--test/w3c/ecma/test232.scxml77
-rw-r--r--test/w3c/ecma/test233.scxml63
-rw-r--r--test/w3c/ecma/test234.scxml117
-rw-r--r--test/w3c/ecma/test235.scxml48
-rw-r--r--test/w3c/ecma/test236.scxml72
-rw-r--r--test/w3c/ecma/test237.scxml70
-rw-r--r--test/w3c/ecma/test239.scxml57
-rw-r--r--test/w3c/ecma/test239sub1.scxml10
-rw-r--r--test/w3c/ecma/test240.scxml116
-rw-r--r--test/w3c/ecma/test241.scxml160
-rw-r--r--test/w3c/ecma/test242.scxml97
-rw-r--r--test/w3c/ecma/test242sub1.scxml10
-rw-r--r--test/w3c/ecma/test243.scxml75
-rw-r--r--test/w3c/ecma/test244.scxml74
-rw-r--r--test/w3c/ecma/test245.scxml64
-rw-r--r--test/w3c/ecma/test247.scxml48
-rw-r--r--test/w3c/ecma/test250.scxml73
-rw-r--r--test/w3c/ecma/test252.scxml75
-rw-r--r--test/w3c/ecma/test253.scxml118
-rw-r--r--test/w3c/ecma/test276.scxml39
-rw-r--r--test/w3c/ecma/test276sub1.scxml37
-rw-r--r--test/w3c/ecma/test277.scxml56
-rw-r--r--test/w3c/ecma/test278.scxml40
-rw-r--r--test/w3c/ecma/test279.scxml41
-rw-r--r--test/w3c/ecma/test280.scxml45
-rw-r--r--test/w3c/ecma/test286.scxml41
-rw-r--r--test/w3c/ecma/test287.scxml41
-rw-r--r--test/w3c/ecma/test288.scxml25
-rw-r--r--test/w3c/ecma/test294.scxml80
-rw-r--r--test/w3c/ecma/test298.scxml55
-rw-r--r--test/w3c/ecma/test301.scxml32
-rw-r--r--test/w3c/ecma/test302.scxml34
-rw-r--r--test/w3c/ecma/test303.scxml46
-rw-r--r--test/w3c/ecma/test304.scxml32
-rw-r--r--test/w3c/ecma/test307.scxml71
-rw-r--r--test/w3c/ecma/test309.scxml28
-rw-r--r--test/w3c/ecma/test310.scxml39
-rw-r--r--test/w3c/ecma/test311.scxml39
-rw-r--r--test/w3c/ecma/test312.scxml45
-rw-r--r--test/w3c/ecma/test313.scxml47
-rw-r--r--test/w3c/ecma/test314.scxml63
-rw-r--r--test/w3c/ecma/test318.scxml57
-rw-r--r--test/w3c/ecma/test319.scxml45
-rw-r--r--test/w3c/ecma/test321.scxml34
-rw-r--r--test/w3c/ecma/test322.scxml63
-rw-r--r--test/w3c/ecma/test323.scxml34
-rw-r--r--test/w3c/ecma/test324.scxml42
-rw-r--r--test/w3c/ecma/test325.scxml37
-rw-r--r--test/w3c/ecma/test326.scxml68
-rw-r--r--test/w3c/ecma/test329.scxml101
-rw-r--r--test/w3c/ecma/test330.scxml51
-rw-r--r--test/w3c/ecma/test331.scxml113
-rw-r--r--test/w3c/ecma/test332.scxml59
-rw-r--r--test/w3c/ecma/test333.scxml37
-rw-r--r--test/w3c/ecma/test335.scxml37
-rw-r--r--test/w3c/ecma/test336.scxml52
-rw-r--r--test/w3c/ecma/test337.scxml37
-rw-r--r--test/w3c/ecma/test338.scxml74
-rw-r--r--test/w3c/ecma/test339.scxml37
-rw-r--r--test/w3c/ecma/test342.scxml54
-rw-r--r--test/w3c/ecma/test343.scxml61
-rw-r--r--test/w3c/ecma/test344.scxml41
-rw-r--r--test/w3c/ecma/test346.scxml93
-rw-r--r--test/w3c/ecma/test347.scxml80
-rw-r--r--test/w3c/ecma/test348.scxml39
-rw-r--r--test/w3c/ecma/test349.scxml58
-rw-r--r--test/w3c/ecma/test350.scxml52
-rw-r--r--test/w3c/ecma/test351.scxml85
-rw-r--r--test/w3c/ecma/test352.scxml55
-rw-r--r--test/w3c/ecma/test354.scxml90
-rw-r--r--test/w3c/ecma/test355.scxml34
-rw-r--r--test/w3c/ecma/test364.scxml136
-rw-r--r--test/w3c/ecma/test372.scxml55
-rw-r--r--test/w3c/ecma/test375.scxml48
-rw-r--r--test/w3c/ecma/test376.scxml46
-rw-r--r--test/w3c/ecma/test377.scxml58
-rw-r--r--test/w3c/ecma/test378.scxml52
-rw-r--r--test/w3c/ecma/test387.scxml160
-rw-r--r--test/w3c/ecma/test388.scxml124
-rw-r--r--test/w3c/ecma/test396.scxml35
-rw-r--r--test/w3c/ecma/test399.scxml123
-rw-r--r--test/w3c/ecma/test401.scxml42
-rw-r--r--test/w3c/ecma/test402.scxml78
-rw-r--r--test/w3c/ecma/test403a.scxml73
-rw-r--r--test/w3c/ecma/test403b.scxml70
-rw-r--r--test/w3c/ecma/test403c.scxml99
-rw-r--r--test/w3c/ecma/test404.scxml106
-rw-r--r--test/w3c/ecma/test405.scxml125
-rw-r--r--test/w3c/ecma/test406.scxml114
-rw-r--r--test/w3c/ecma/test407.scxml45
-rw-r--r--test/w3c/ecma/test409.scxml62
-rw-r--r--test/w3c/ecma/test411.scxml58
-rw-r--r--test/w3c/ecma/test412.scxml98
-rw-r--r--test/w3c/ecma/test413.scxml79
-rw-r--r--test/w3c/ecma/test415.scxml13
-rw-r--r--test/w3c/ecma/test416.scxml49
-rw-r--r--test/w3c/ecma/test417.scxml64
-rw-r--r--test/w3c/ecma/test419.scxml39
-rw-r--r--test/w3c/ecma/test421.scxml55
-rw-r--r--test/w3c/ecma/test422.scxml126
-rw-r--r--test/w3c/ecma/test423.scxml48
-rw-r--r--test/w3c/ecma/test436.scxml44
-rw-r--r--test/w3c/ecma/test444.scxml34
-rw-r--r--test/w3c/ecma/test445.scxml33
-rw-r--r--test/w3c/ecma/test446.scxml44
-rw-r--r--test/w3c/ecma/test448.scxml67
-rw-r--r--test/w3c/ecma/test449.scxml29
-rw-r--r--test/w3c/ecma/test451.scxml39
-rw-r--r--test/w3c/ecma/test452.scxml53
-rw-r--r--test/w3c/ecma/test453.scxml44
-rw-r--r--test/w3c/ecma/test456.scxml40
-rw-r--r--test/w3c/ecma/test457.scxml118
-rw-r--r--test/w3c/ecma/test459.scxml72
-rw-r--r--test/w3c/ecma/test460.scxml50
-rw-r--r--test/w3c/ecma/test487.scxml41
-rw-r--r--test/w3c/ecma/test488.scxml61
-rw-r--r--test/w3c/ecma/test495.scxml49
-rw-r--r--test/w3c/ecma/test496.scxml39
-rw-r--r--test/w3c/ecma/test500.scxml34
-rw-r--r--test/w3c/ecma/test501.scxml40
-rw-r--r--test/w3c/ecma/test503.scxml68
-rw-r--r--test/w3c/ecma/test504.scxml134
-rw-r--r--test/w3c/ecma/test505.scxml83
-rw-r--r--test/w3c/ecma/test506.scxml93
-rw-r--r--test/w3c/ecma/test509.scxml39
-rw-r--r--test/w3c/ecma/test510.scxml53
-rw-r--r--test/w3c/ecma/test518.scxml43
-rw-r--r--test/w3c/ecma/test519.scxml44
-rw-r--r--test/w3c/ecma/test520.scxml46
-rw-r--r--test/w3c/ecma/test521.scxml46
-rw-r--r--test/w3c/ecma/test522.scxml45
-rw-r--r--test/w3c/ecma/test525.scxml50
-rw-r--r--test/w3c/ecma/test527.scxml47
-rw-r--r--test/w3c/ecma/test528.scxml59
-rw-r--r--test/w3c/ecma/test529.scxml47
-rw-r--r--test/w3c/ecma/test530.scxml54
-rw-r--r--test/w3c/ecma/test531.scxml46
-rw-r--r--test/w3c/ecma/test532.scxml46
-rw-r--r--test/w3c/ecma/test533.scxml111
-rw-r--r--test/w3c/ecma/test534.scxml42
-rw-r--r--test/w3c/ecma/test550.scxml41
-rw-r--r--test/w3c/ecma/test551.scxml42
-rw-r--r--test/w3c/ecma/test552.scxml36
-rw-r--r--test/w3c/ecma/test553.scxml48
-rw-r--r--test/w3c/ecma/test554.scxml50
-rw-r--r--test/w3c/ecma/test557.scxml54
-rw-r--r--test/w3c/ecma/test558.scxml44
-rw-r--r--test/w3c/ecma/test560.scxml41
-rw-r--r--test/w3c/ecma/test561.scxml51
-rw-r--r--test/w3c/ecma/test562.scxml41
-rw-r--r--test/w3c/ecma/test567.scxml57
-rw-r--r--test/w3c/ecma/test569.scxml33
-rw-r--r--test/w3c/ecma/test570.scxml85
-rw-r--r--test/w3c/ecma/test576.scxml72
-rw-r--r--test/w3c/ecma/test577.scxml46
-rw-r--r--test/w3c/ecma/test578.scxml41
-rw-r--r--test/w3c/ecma/test579.scxml115
-rw-r--r--test/w3c/ecma/test580.scxml91
-rw-r--r--test/w3c/lua/test176.scxml9
-rw-r--r--test/w3c/txml/test252.txml4
-rw-r--r--test/w3c/txml/test288.txml24
-rw-r--r--test/w3c/xpath/test144.scxml46
-rw-r--r--test/w3c/xpath/test147.scxml61
-rw-r--r--test/w3c/xpath/test148.scxml61
-rw-r--r--test/w3c/xpath/test149.scxml52
-rw-r--r--test/w3c/xpath/test150.scxml84
-rw-r--r--test/w3c/xpath/test151.scxml84
-rw-r--r--test/w3c/xpath/test152.scxml97
-rw-r--r--test/w3c/xpath/test153.scxml73
-rw-r--r--test/w3c/xpath/test155.scxml55
-rw-r--r--test/w3c/xpath/test156.scxml61
-rw-r--r--test/w3c/xpath/test158.scxml48
-rw-r--r--test/w3c/xpath/test159.scxml42
-rw-r--r--test/w3c/xpath/test172.scxml41
-rw-r--r--test/w3c/xpath/test173.scxml43
-rw-r--r--test/w3c/xpath/test174.scxml43
-rw-r--r--test/w3c/xpath/test175.scxml51
-rw-r--r--test/w3c/xpath/test176.scxml59
-rw-r--r--test/w3c/xpath/test178.scxml46
-rw-r--r--test/w3c/xpath/test179.scxml39
-rw-r--r--test/w3c/xpath/test183.scxml42
-rw-r--r--test/w3c/xpath/test185.scxml46
-rw-r--r--test/w3c/xpath/test186.scxml59
-rw-r--r--test/w3c/xpath/test187.scxml53
-rw-r--r--test/w3c/xpath/test189.scxml45
-rw-r--r--test/w3c/xpath/test190.scxml67
-rw-r--r--test/w3c/xpath/test191.scxml48
-rw-r--r--test/w3c/xpath/test192.scxml93
-rw-r--r--test/w3c/xpath/test193.scxml53
-rw-r--r--test/w3c/xpath/test194.scxml46
-rw-r--r--test/w3c/xpath/test198.scxml40
-rw-r--r--test/w3c/xpath/test199.scxml38
-rw-r--r--test/w3c/xpath/test200.scxml38
-rw-r--r--test/w3c/xpath/test201.scxml40
-rw-r--r--test/w3c/xpath/test205.scxml62
-rw-r--r--test/w3c/xpath/test207.scxml91
-rw-r--r--test/w3c/xpath/test208.scxml43
-rw-r--r--test/w3c/xpath/test210.scxml48
-rw-r--r--test/w3c/xpath/test215.scxml52
-rw-r--r--test/w3c/xpath/test216.scxml46
-rw-r--r--test/w3c/xpath/test216sub1.scxml10
-rw-r--r--test/w3c/xpath/test220.scxml48
-rw-r--r--test/w3c/xpath/test223.scxml56
-rw-r--r--test/w3c/xpath/test224.scxml61
-rw-r--r--test/w3c/xpath/test225.scxml68
-rw-r--r--test/w3c/xpath/test226.scxml43
-rw-r--r--test/w3c/xpath/test226sub1.scxml24
-rw-r--r--test/w3c/xpath/test228.scxml64
-rw-r--r--test/w3c/xpath/test229.scxml72
-rw-r--r--test/w3c/xpath/test230.scxml106
-rw-r--r--test/w3c/xpath/test232.scxml77
-rw-r--r--test/w3c/xpath/test233.scxml63
-rw-r--r--test/w3c/xpath/test234.scxml117
-rw-r--r--test/w3c/xpath/test235.scxml48
-rw-r--r--test/w3c/xpath/test236.scxml72
-rw-r--r--test/w3c/xpath/test237.scxml70
-rw-r--r--test/w3c/xpath/test239.scxml57
-rw-r--r--test/w3c/xpath/test239sub1.scxml10
-rw-r--r--test/w3c/xpath/test240.scxml116
-rw-r--r--test/w3c/xpath/test241.scxml160
-rw-r--r--test/w3c/xpath/test242.scxml97
-rw-r--r--test/w3c/xpath/test242sub1.scxml10
-rw-r--r--test/w3c/xpath/test243.scxml75
-rw-r--r--test/w3c/xpath/test244.scxml74
-rw-r--r--test/w3c/xpath/test245.scxml64
-rw-r--r--test/w3c/xpath/test247.scxml48
-rw-r--r--test/w3c/xpath/test250.scxml73
-rw-r--r--test/w3c/xpath/test252.scxml75
-rw-r--r--test/w3c/xpath/test253.scxml118
-rw-r--r--test/w3c/xpath/test276.scxml39
-rw-r--r--test/w3c/xpath/test276sub1.scxml37
-rw-r--r--test/w3c/xpath/test277.scxml56
-rw-r--r--test/w3c/xpath/test278.scxml40
-rw-r--r--test/w3c/xpath/test279.scxml41
-rw-r--r--test/w3c/xpath/test280.scxml45
-rw-r--r--test/w3c/xpath/test286.scxml41
-rw-r--r--test/w3c/xpath/test287.scxml41
-rw-r--r--test/w3c/xpath/test288.scxml25
-rw-r--r--test/w3c/xpath/test294.scxml80
-rw-r--r--test/w3c/xpath/test298.scxml55
-rw-r--r--test/w3c/xpath/test301.scxml32
-rw-r--r--test/w3c/xpath/test302.scxml34
-rw-r--r--test/w3c/xpath/test303.scxml46
-rw-r--r--test/w3c/xpath/test304.scxml32
-rw-r--r--test/w3c/xpath/test307.scxml71
-rw-r--r--test/w3c/xpath/test309.scxml28
-rw-r--r--test/w3c/xpath/test310.scxml39
-rw-r--r--test/w3c/xpath/test311.scxml39
-rw-r--r--test/w3c/xpath/test312.scxml45
-rw-r--r--test/w3c/xpath/test313.scxml47
-rw-r--r--test/w3c/xpath/test314.scxml63
-rw-r--r--test/w3c/xpath/test318.scxml57
-rw-r--r--test/w3c/xpath/test319.scxml45
-rw-r--r--test/w3c/xpath/test321.scxml34
-rw-r--r--test/w3c/xpath/test322.scxml63
-rw-r--r--test/w3c/xpath/test323.scxml34
-rw-r--r--test/w3c/xpath/test324.scxml42
-rw-r--r--test/w3c/xpath/test325.scxml37
-rw-r--r--test/w3c/xpath/test326.scxml68
-rw-r--r--test/w3c/xpath/test329.scxml101
-rw-r--r--test/w3c/xpath/test330.scxml51
-rw-r--r--test/w3c/xpath/test331.scxml113
-rw-r--r--test/w3c/xpath/test332.scxml59
-rw-r--r--test/w3c/xpath/test333.scxml37
-rw-r--r--test/w3c/xpath/test335.scxml37
-rw-r--r--test/w3c/xpath/test336.scxml52
-rw-r--r--test/w3c/xpath/test337.scxml37
-rw-r--r--test/w3c/xpath/test338.scxml74
-rw-r--r--test/w3c/xpath/test339.scxml37
-rw-r--r--test/w3c/xpath/test342.scxml54
-rw-r--r--test/w3c/xpath/test343.scxml61
-rw-r--r--test/w3c/xpath/test344.scxml41
-rw-r--r--test/w3c/xpath/test346.scxml93
-rw-r--r--test/w3c/xpath/test347.scxml80
-rw-r--r--test/w3c/xpath/test348.scxml39
-rw-r--r--test/w3c/xpath/test349.scxml58
-rw-r--r--test/w3c/xpath/test350.scxml52
-rw-r--r--test/w3c/xpath/test351.scxml85
-rw-r--r--test/w3c/xpath/test352.scxml55
-rw-r--r--test/w3c/xpath/test354.scxml90
-rw-r--r--test/w3c/xpath/test355.scxml34
-rw-r--r--test/w3c/xpath/test364.scxml136
-rw-r--r--test/w3c/xpath/test372.scxml55
-rw-r--r--test/w3c/xpath/test375.scxml48
-rw-r--r--test/w3c/xpath/test376.scxml46
-rw-r--r--test/w3c/xpath/test377.scxml58
-rw-r--r--test/w3c/xpath/test378.scxml52
-rw-r--r--test/w3c/xpath/test387.scxml160
-rw-r--r--test/w3c/xpath/test388.scxml124
-rw-r--r--test/w3c/xpath/test396.scxml35
-rw-r--r--test/w3c/xpath/test399.scxml123
-rw-r--r--test/w3c/xpath/test401.scxml42
-rw-r--r--test/w3c/xpath/test402.scxml78
-rw-r--r--test/w3c/xpath/test403a.scxml73
-rw-r--r--test/w3c/xpath/test403b.scxml70
-rw-r--r--test/w3c/xpath/test403c.scxml99
-rw-r--r--test/w3c/xpath/test404.scxml106
-rw-r--r--test/w3c/xpath/test405.scxml125
-rw-r--r--test/w3c/xpath/test406.scxml114
-rw-r--r--test/w3c/xpath/test407.scxml45
-rw-r--r--test/w3c/xpath/test409.scxml62
-rw-r--r--test/w3c/xpath/test411.scxml58
-rw-r--r--test/w3c/xpath/test412.scxml98
-rw-r--r--test/w3c/xpath/test413.scxml79
-rw-r--r--test/w3c/xpath/test415.scxml13
-rw-r--r--test/w3c/xpath/test416.scxml49
-rw-r--r--test/w3c/xpath/test417.scxml64
-rw-r--r--test/w3c/xpath/test419.scxml39
-rw-r--r--test/w3c/xpath/test421.scxml55
-rw-r--r--test/w3c/xpath/test422.scxml126
-rw-r--r--test/w3c/xpath/test423.scxml48
-rw-r--r--test/w3c/xpath/test436.scxml44
-rw-r--r--test/w3c/xpath/test463.scxml35
-rw-r--r--test/w3c/xpath/test464.scxml33
-rw-r--r--test/w3c/xpath/test465.scxml43
-rw-r--r--test/w3c/xpath/test466.scxml31
-rw-r--r--test/w3c/xpath/test467.scxml28
-rw-r--r--test/w3c/xpath/test468.scxml35
-rw-r--r--test/w3c/xpath/test469.scxml46
-rw-r--r--test/w3c/xpath/test470.scxml44
-rw-r--r--test/w3c/xpath/test473.scxml79
-rw-r--r--test/w3c/xpath/test474.scxml77
-rw-r--r--test/w3c/xpath/test475.scxml77
-rw-r--r--test/w3c/xpath/test476.scxml77
-rw-r--r--test/w3c/xpath/test477.scxml77
-rw-r--r--test/w3c/xpath/test478.scxml76
-rw-r--r--test/w3c/xpath/test479.scxml76
-rw-r--r--test/w3c/xpath/test480.scxml68
-rw-r--r--test/w3c/xpath/test481.scxml78
-rw-r--r--test/w3c/xpath/test482.scxml36
-rw-r--r--test/w3c/xpath/test483.scxml54
-rw-r--r--test/w3c/xpath/test487.scxml41
-rw-r--r--test/w3c/xpath/test488.scxml61
-rw-r--r--test/w3c/xpath/test495.scxml49
-rw-r--r--test/w3c/xpath/test496.scxml39
-rw-r--r--test/w3c/xpath/test500.scxml34
-rw-r--r--test/w3c/xpath/test501.scxml40
-rw-r--r--test/w3c/xpath/test503.scxml68
-rw-r--r--test/w3c/xpath/test504.scxml134
-rw-r--r--test/w3c/xpath/test505.scxml83
-rw-r--r--test/w3c/xpath/test506.scxml93
-rw-r--r--test/w3c/xpath/test509.scxml39
-rw-r--r--test/w3c/xpath/test510.scxml53
-rw-r--r--test/w3c/xpath/test518.scxml43
-rw-r--r--test/w3c/xpath/test519.scxml44
-rw-r--r--test/w3c/xpath/test520.scxml46
-rw-r--r--test/w3c/xpath/test521.scxml46
-rw-r--r--test/w3c/xpath/test522.scxml45
-rw-r--r--test/w3c/xpath/test525.scxml56
-rw-r--r--test/w3c/xpath/test527.scxml47
-rw-r--r--test/w3c/xpath/test528.scxml59
-rw-r--r--test/w3c/xpath/test529.scxml47
-rw-r--r--test/w3c/xpath/test530.scxml54
-rw-r--r--test/w3c/xpath/test531.scxml46
-rw-r--r--test/w3c/xpath/test532.scxml46
-rw-r--r--test/w3c/xpath/test533.scxml111
-rw-r--r--test/w3c/xpath/test534.scxml42
-rw-r--r--test/w3c/xpath/test537.scxml35
-rw-r--r--test/w3c/xpath/test539.scxml54
-rw-r--r--test/w3c/xpath/test540.scxml41
-rw-r--r--test/w3c/xpath/test542.scxml66
-rw-r--r--test/w3c/xpath/test543.scxml38
-rw-r--r--test/w3c/xpath/test544.scxml38
-rw-r--r--test/w3c/xpath/test545.scxml42
-rw-r--r--test/w3c/xpath/test546.scxml38
-rw-r--r--test/w3c/xpath/test547.scxml66
-rw-r--r--test/w3c/xpath/test550.scxml41
-rw-r--r--test/w3c/xpath/test551.scxml48
-rw-r--r--test/w3c/xpath/test552.scxml36
-rw-r--r--test/w3c/xpath/test553.scxml48
-rw-r--r--test/w3c/xpath/test554.scxml50
-rw-r--r--test/w3c/xpath/test555.scxml53
-rw-r--r--test/w3c/xpath/test567.scxml57
-rw-r--r--test/w3c/xpath/test568.scxml33
-rw-r--r--test/w3c/xpath/test570.scxml85
-rw-r--r--test/w3c/xpath/test576.scxml72
-rw-r--r--test/w3c/xpath/test577.scxml46
-rw-r--r--test/w3c/xpath/test579.scxml115
-rw-r--r--test/w3c/xpath/test580.scxml91
430 files changed, 13530 insertions, 11828 deletions
diff --git a/test/w3c/convert-tests.sh b/test/w3c/convert-tests.sh
index a8357aa..ea624ea 100755
--- a/test/w3c/convert-tests.sh
+++ b/test/w3c/convert-tests.sh
@@ -23,4 +23,12 @@ cp txml/*.txt ecma/
cp txml/*.txt xpath/
find ./ecma -type f -exec grep -Ili 'datamodel="xpath"' {} \; |xargs rm -fv
-find ./xpath -type f -exec grep -Ili 'datamodel="ecmascript"' {} \; |xargs rm -fv \ No newline at end of file
+find ./xpath -type f -exec grep -Ili 'datamodel="ecmascript"' {} \; |xargs rm -fv
+
+SCXMLS=`find . -type f -name '*.scxml'`
+for SCXML in $SCXMLS
+do
+ mv $SCXML $SCXML.unformatted.xml
+ xmllint --format $SCXML.unformatted.xml > $SCXML
+ rm $SCXML.unformatted.xml
+done
diff --git a/test/w3c/draft/calc.scxml b/test/w3c/draft/calc.scxml
index e854401..bc6db8b 100644
--- a/test/w3c/draft/calc.scxml
+++ b/test/w3c/draft/calc.scxml
@@ -1,158 +1,157 @@
-<?xml version="1.0" ?>
-<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
- initial="on" datamodel="ecmascript" name="calc">
- <datamodel>
- <data id="long_expr" />
- <data id="short_expr" expr="0" />
- <data id="res" />
- </datamodel>
- <state id="wrapper" initial="on">
+<?xml version="1.0"?>
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="on" datamodel="ecmascript" name="calc">
+ <datamodel>
+ <data id="long_expr"/>
+ <data id="short_expr" expr="0"/>
+ <data id="res"/>
+ </datamodel>
+ <state id="wrapper" initial="on">
<state id="on" initial="ready">
- <onentry>
- <send event="DISPLAY.UPDATE" />
- </onentry>
- <state id="ready" initial="begin">
+ <onentry>
+ <send event="DISPLAY.UPDATE"/>
+ </onentry>
+ <state id="ready" initial="begin">
<state id="begin">
- <transition event="OPER.MINUS" target="negated1" />
- <onentry>
- <send event="DISPLAY.UPDATE" />
- </onentry>
+ <transition event="OPER.MINUS" target="negated1"/>
+ <onentry>
+ <send event="DISPLAY.UPDATE"/>
+ </onentry>
</state>
<state id="result">
</state>
- <transition event="OPER" target="opEntered" />
- <transition event="DIGIT.0" target="zero1">
- <assign location="short_expr" expr="''" />
- </transition>
- <transition event="DIGIT" target="int1">
- <assign location="short_expr" expr="''" />
- </transition>
- <transition event="POINT" target="frac1">
- <assign location="short_expr" expr="''" />
- </transition>
+ <transition event="OPER" target="opEntered"/>
+ <transition event="DIGIT.0" target="zero1">
+ <assign location="short_expr" expr="''"/>
+ </transition>
+ <transition event="DIGIT" target="int1">
+ <assign location="short_expr" expr="''"/>
+ </transition>
+ <transition event="POINT" target="frac1">
+ <assign location="short_expr" expr="''"/>
+ </transition>
+ </state>
+ <state id="negated1">
+ <onentry>
+ <assign location="short_expr" expr="'-'"/>
+ <send event="DISPLAY.UPDATE"/>
+ </onentry>
+ <transition event="DIGIT.0" target="zero1"/>
+ <transition event="DIGIT" target="int1"/>
+ <transition event="POINT" target="frac1"/>
+ </state>
+ <state id="operand1">
+ <state id="zero1">
+ <transition event="DIGIT" cond="_event.name != 'DIGIT.0'" target="int1"/>
+ <transition event="POINT" target="frac1"/>
</state>
- <state id="negated1">
- <onentry>
- <assign location="short_expr" expr="'-'" />
- <send event="DISPLAY.UPDATE" />
- </onentry>
- <transition event="DIGIT.0" target="zero1" />
- <transition event="DIGIT" target="int1" />
- <transition event="POINT" target="frac1" />
+ <state id="int1">
+ <transition event="POINT" target="frac1"/>
+ <transition event="DIGIT">
+ <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)"/>
+ <send event="DISPLAY.UPDATE"/>
+ </transition>
+ <onentry>
+ <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)"/>
+ <send event="DISPLAY.UPDATE"/>
+ </onentry>
</state>
- <state id="operand1">
- <state id="zero1">
- <transition event="DIGIT" cond="_event.name != 'DIGIT.0'" target="int1" />
- <transition event="POINT" target="frac1" />
- </state>
- <state id="int1">
- <transition event="POINT" target="frac1" />
- <transition event="DIGIT">
- <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)" />
- <send event="DISPLAY.UPDATE" />
- </transition>
- <onentry>
- <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)" />
- <send event="DISPLAY.UPDATE" />
- </onentry>
- </state>
- <state id="frac1">
- <onentry>
- <assign location="short_expr" expr="short_expr+'.'" />
- <send event="DISPLAY.UPDATE" />
- </onentry>
- <transition event="DIGIT">
- <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)" />
- <send event="DISPLAY.UPDATE" />
- </transition>
- </state>
- <transition event="OPER" target="opEntered" />
+ <state id="frac1">
+ <onentry>
+ <assign location="short_expr" expr="short_expr+'.'"/>
+ <send event="DISPLAY.UPDATE"/>
+ </onentry>
+ <transition event="DIGIT">
+ <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)"/>
+ <send event="DISPLAY.UPDATE"/>
+ </transition>
</state>
- <state id="opEntered">
- <transition event="OPER.MINUS" target="negated2" />
- <transition event="POINT" target="frac2" />
- <transition event="DIGIT.0" target="zero2" />
- <transition event="DIGIT" target="int2" />
- <onentry>
- <raise event="CALC.SUB" />
- <send target="_internal" event="OP.INSERT">
- <param name="operator" expr="_event.name" />
- </send>
- </onentry>
+ <transition event="OPER" target="opEntered"/>
+ </state>
+ <state id="opEntered">
+ <transition event="OPER.MINUS" target="negated2"/>
+ <transition event="POINT" target="frac2"/>
+ <transition event="DIGIT.0" target="zero2"/>
+ <transition event="DIGIT" target="int2"/>
+ <onentry>
+ <raise event="CALC.SUB"/>
+ <send target="_internal" event="OP.INSERT">
+ <param name="operator" expr="_event.name"/>
+ </send>
+ </onentry>
+ </state>
+ <state id="negated2">
+ <onentry>
+ <assign location="short_expr" expr="'-'"/>
+ <send event="DISPLAY.UPDATE"/>
+ </onentry>
+ <transition event="DIGIT.0" target="zero2"/>
+ <transition event="DIGIT" target="int2"/>
+ <transition event="POINT" target="frac2"/>
+ </state>
+ <state id="operand2">
+ <state id="zero2">
+ <transition event="DIGIT" cond="_event.name != 'DIGIT.0'" target="int2"/>
+ <transition event="POINT" target="frac2"/>
</state>
- <state id="negated2">
- <onentry>
- <assign location="short_expr" expr="'-'" />
- <send event="DISPLAY.UPDATE" />
- </onentry>
- <transition event="DIGIT.0" target="zero2" />
- <transition event="DIGIT" target="int2" />
- <transition event="POINT" target="frac2" />
+ <state id="int2">
+ <transition event="DIGIT">
+ <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)"/>
+ <send event="DISPLAY.UPDATE"/>
+ </transition>
+ <onentry>
+ <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)"/>
+ <send event="DISPLAY.UPDATE"/>
+ </onentry>
+ <transition event="POINT" target="frac2"/>
</state>
- <state id="operand2">
- <state id="zero2">
- <transition event="DIGIT" cond="_event.name != 'DIGIT.0'" target="int2" />
- <transition event="POINT" target="frac2" />
- </state>
- <state id="int2">
- <transition event="DIGIT">
- <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)" />
- <send event="DISPLAY.UPDATE" />
- </transition>
- <onentry>
- <assign location="short_expr" expr="short_expr+_event.name.substr(_event.name.lastIndexOf('.')+1)" />
- <send event="DISPLAY.UPDATE" />
- </onentry>
- <transition event="POINT" target="frac2" />
- </state>
- <state id="frac2">
- <onentry>
- <assign location="short_expr" expr="short_expr +'.'" />
- <send event="DISPLAY.UPDATE" />
- </onentry>
- <transition event="DIGIT">
- <assign location="short_expr" expr="short_expr +_event.name.substr(_event.name.lastIndexOf('.')+1)" />
- <send event="DISPLAY.UPDATE" />
- </transition>
- </state>
- <transition event="OPER" target="opEntered">
- <raise event="CALC.SUB" />
- <raise event="OP.INSERT" />
- </transition>
- <transition event="EQUALS" target="result">
- <raise event="CALC.SUB" />
- <raise event="CALC.DO" />
- </transition>
+ <state id="frac2">
+ <onentry>
+ <assign location="short_expr" expr="short_expr +'.'"/>
+ <send event="DISPLAY.UPDATE"/>
+ </onentry>
+ <transition event="DIGIT">
+ <assign location="short_expr" expr="short_expr +_event.name.substr(_event.name.lastIndexOf('.')+1)"/>
+ <send event="DISPLAY.UPDATE"/>
+ </transition>
</state>
- <transition event="C" target="on" />
+ <transition event="OPER" target="opEntered">
+ <raise event="CALC.SUB"/>
+ <raise event="OP.INSERT"/>
+ </transition>
+ <transition event="EQUALS" target="result">
+ <raise event="CALC.SUB"/>
+ <raise event="CALC.DO"/>
+ </transition>
+ </state>
+ <transition event="C" target="on"/>
</state>
<transition event="CALC.DO">
- <assign location="short_expr" expr="''+ res" />
- <assign location="long_expr" expr="''" />
- <assign location="res" expr="0" />
+ <assign location="short_expr" expr="''+ res"/>
+ <assign location="long_expr" expr="''"/>
+ <assign location="res" expr="0"/>
</transition>
<transition event="CALC.SUB">
- <if cond="short_expr!=''">
- <assign location="long_expr" expr="long_expr+'('+short_expr+')'" />
- </if>
- <assign location="res" expr="eval(long_expr)" />
- <assign location="short_expr" expr="''" />
- <send event="DISPLAY.UPDATE" />
+ <if cond="short_expr!=''">
+ <assign location="long_expr" expr="long_expr+'('+short_expr+')'"/>
+ </if>
+ <assign location="res" expr="eval(long_expr)"/>
+ <assign location="short_expr" expr="''"/>
+ <send event="DISPLAY.UPDATE"/>
</transition>
<transition event="DISPLAY.UPDATE">
- <!--log level="0" label="'result'" expr=".short_expr==''?res:short_expr" / -->
+ <!--log level="0" label="'result'" expr=".short_expr==''?res:short_expr" / -->
</transition>
<transition event="OP.INSERT">
- <log level="0" expr="_event.data[0]" />
- <if cond="_event.data[0] == 'OPER.PLUS'">
- <assign location="long_expr" expr="long_expr+'+'" />
- <elseif cond="_event.data[0]=='OPER.MINUS'" />
- <assign location="long_expr" expr="long_expr+'-'" />
- <elseif cond="_event.data[0]=='OPER.STAR'" />
- <assign location="long_expr" expr="long_expr+'*'" />
- <elseif cond="_event.data[0]=='OPER.DIV'" />
- <assign location="long_expr" expr="long_expr+'/'" />
- </if>
+ <log level="0" expr="_event.data[0]"/>
+ <if cond="_event.data[0] == 'OPER.PLUS'">
+ <assign location="long_expr" expr="long_expr+'+'"/>
+ <elseif cond="_event.data[0]=='OPER.MINUS'"/>
+ <assign location="long_expr" expr="long_expr+'-'"/>
+ <elseif cond="_event.data[0]=='OPER.STAR'"/>
+ <assign location="long_expr" expr="long_expr+'*'"/>
+ <elseif cond="_event.data[0]=='OPER.DIV'"/>
+ <assign location="long_expr" expr="long_expr+'/'"/>
+ </if>
</transition>
- </state>
+ </state>
</scxml>
diff --git a/test/w3c/ecma/test144.scxml b/test/w3c/ecma/test144.scxml
index fcec83a..76ee416 100644
--- a/test/w3c/ecma/test144.scxml
+++ b/test/w3c/ecma/test144.scxml
@@ -1,23 +1,27 @@
-<?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"/>
+<?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"/>
+ <transition event="foo" target="s1"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test147.scxml b/test/w3c/ecma/test147.scxml
index f877ecf..f12029a 100644
--- a/test/w3c/ecma/test147.scxml
+++ b/test/w3c/ecma/test147.scxml
@@ -1,30 +1,35 @@
-<?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"/>
+<?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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test148.scxml b/test/w3c/ecma/test148.scxml
index acebba7..988d679 100644
--- a/test/w3c/ecma/test148.scxml
+++ b/test/w3c/ecma/test148.scxml
@@ -1,31 +1,36 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the else clause executes if <if> and <elseif> evaluate to false.
+<?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"/>
+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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test149.scxml b/test/w3c/ecma/test149.scxml
index b7626c6..7dbe881 100644
--- a/test/w3c/ecma/test149.scxml
+++ b/test/w3c/ecma/test149.scxml
@@ -1,25 +1,31 @@
-<?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"/>
+<?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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test150.scxml b/test/w3c/ecma/test150.scxml
index 41e1895..9624c8c 100644
--- a/test/w3c/ecma/test150.scxml
+++ b/test/w3c/ecma/test150.scxml
@@ -1,41 +1,45 @@
-<?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">
+<?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
+ <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>
diff --git a/test/w3c/ecma/test151.scxml b/test/w3c/ecma/test151.scxml
index 119bb65..e7947d0 100644
--- a/test/w3c/ecma/test151.scxml
+++ b/test/w3c/ecma/test151.scxml
@@ -1,41 +1,45 @@
-<?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">
+<?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
+ <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>
diff --git a/test/w3c/ecma/test152.scxml b/test/w3c/ecma/test152.scxml
index 8af51a8..155652c 100644
--- a/test/w3c/ecma/test152.scxml
+++ b/test/w3c/ecma/test152.scxml
@@ -1,48 +1,51 @@
-<?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">
+<?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
+ <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>
diff --git a/test/w3c/ecma/test153.scxml b/test/w3c/ecma/test153.scxml
index c46c32d..cb30088 100644
--- a/test/w3c/ecma/test153.scxml
+++ b/test/w3c/ecma/test153.scxml
@@ -1,35 +1,42 @@
-<?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
+<?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">
+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 -->
+ <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
+ <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>
diff --git a/test/w3c/ecma/test155.scxml b/test/w3c/ecma/test155.scxml
index 17d3a70..e671d17 100644
--- a/test/w3c/ecma/test155.scxml
+++ b/test/w3c/ecma/test155.scxml
@@ -1,26 +1,31 @@
-<?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">
+<?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
+ <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>
diff --git a/test/w3c/ecma/test156.scxml b/test/w3c/ecma/test156.scxml
index aa9e2b0..1d2c9ee 100644
--- a/test/w3c/ecma/test156.scxml
+++ b/test/w3c/ecma/test156.scxml
@@ -1,28 +1,33 @@
-<?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">
+<?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
+ <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>
diff --git a/test/w3c/ecma/test158.scxml b/test/w3c/ecma/test158.scxml
index f1a583f..7947480 100644
--- a/test/w3c/ecma/test158.scxml
+++ b/test/w3c/ecma/test158.scxml
@@ -1,23 +1,29 @@
-<?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"/>
+<?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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test159.scxml b/test/w3c/ecma/test159.scxml
index d7b7821..b17e5f5 100644
--- a/test/w3c/ecma/test159.scxml
+++ b/test/w3c/ecma/test159.scxml
@@ -1,20 +1,26 @@
-<?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"/>
+<?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" target="baz"/>
- <assign location="Var1" expr="Var1 + 1"/>
+ <state id="s0">
+ <onentry>
+ <send event="thisWillFail" target="baz"/>
+ <assign location="Var1" expr="Var1 + 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
+ <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>
diff --git a/test/w3c/ecma/test172.scxml b/test/w3c/ecma/test172.scxml
index 28f2bcb..5194a97 100644
--- a/test/w3c/ecma/test172.scxml
+++ b/test/w3c/ecma/test172.scxml
@@ -1,20 +1,25 @@
-<?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'"/>
+<?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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test173.scxml b/test/w3c/ecma/test173.scxml
index fa2a289..b3694a6 100644
--- a/test/w3c/ecma/test173.scxml
+++ b/test/w3c/ecma/test173.scxml
@@ -1,21 +1,26 @@
-<?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"/>
+<?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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test174.scxml b/test/w3c/ecma/test174.scxml
index f78feee..227b787 100644
--- a/test/w3c/ecma/test174.scxml
+++ b/test/w3c/ecma/test174.scxml
@@ -1,21 +1,26 @@
-<?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"/>
+<?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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test175.scxml b/test/w3c/ecma/test175.scxml
index cda3b5a..1ec619f 100644
--- a/test/w3c/ecma/test175.scxml
+++ b/test/w3c/ecma/test175.scxml
@@ -1,27 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that delayexpr uses the current value of var1, not its initial value
+<?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'"/>
+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="'1s'"/>
- <send delayexpr="(Var1.slice(0, - 1)) * 50 + 'ms'" event="event2"/>
- <send delayexpr="'25ms'" event="event1"/>
+ <state id="s0">
+ <onentry>
+ <assign location="Var1" expr="'1s'"/>
+ <send delayexpr="(Var1.slice(0, - 1)) * 50 + 'ms'" event="event2"/>
+ <send delayexpr="'25ms'" 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"/>
+ <transition event="event1" target="s1"/>
+ <transition event="event2" 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
+ <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>
diff --git a/test/w3c/ecma/test176.scxml b/test/w3c/ecma/test176.scxml
index 4b120ec..c4a5c0a 100644
--- a/test/w3c/ecma/test176.scxml
+++ b/test/w3c/ecma/test176.scxml
@@ -1,30 +1,35 @@
-<?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"/>
+<?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>
+ <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"/>
+ <transition event="event1" target="s1">
+ <assign location="Var2" expr="_event.data.aParam"/>
+ </transition>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test178.scxml b/test/w3c/ecma/test178.scxml
index 91b4681..da69af2 100644
--- a/test/w3c/ecma/test178.scxml
+++ b/test/w3c/ecma/test178.scxml
@@ -1,27 +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.
+<?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
+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>
diff --git a/test/w3c/ecma/test179.scxml b/test/w3c/ecma/test179.scxml
index f5c9169..3c4b09a 100644
--- a/test/w3c/ecma/test179.scxml
+++ b/test/w3c/ecma/test179.scxml
@@ -1,18 +1,23 @@
-<?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>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test183.scxml b/test/w3c/ecma/test183.scxml
index 2c17ea8..825907e 100644
--- a/test/w3c/ecma/test183.scxml
+++ b/test/w3c/ecma/test183.scxml
@@ -1,21 +1,25 @@
-<?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"/>
-
+<?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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test185.scxml b/test/w3c/ecma/test185.scxml
index 6a83574..7e4c408 100644
--- a/test/w3c/ecma/test185.scxml
+++ b/test/w3c/ecma/test185.scxml
@@ -1,23 +1,27 @@
-<?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" delayexpr="'50ms'"/>
- <send event="event1"/>
+<?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" delayexpr="'50ms'"/>
+ <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"/>
+ <transition event="event1" target="s1"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test186.scxml b/test/w3c/ecma/test186.scxml
index 68254d3..ef42d18 100644
--- a/test/w3c/ecma/test186.scxml
+++ b/test/w3c/ecma/test186.scxml
@@ -1,31 +1,36 @@
-<?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
+<?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" delayexpr="'50ms'">
- <param name="aParam" expr="Var1"/>
- </send>
- <assign location="Var1" expr="2"/>
+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" delayexpr="'50ms'">
+ <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 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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test187.scxml b/test/w3c/ecma/test187.scxml
index c4f2a6f..06b08a2 100644
--- a/test/w3c/ecma/test187.scxml
+++ b/test/w3c/ecma/test187.scxml
@@ -1,33 +1,38 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that delayed <send> is not sent if the sending session terminates. In this case,
+<?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">
+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" delayexpr="'50ms'"/>
- </onentry>
+ </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" delayexpr="'25ms'"/>
+ <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" delayexpr="'25ms'"/>
</onentry>
- <transition target="subFinal"/>
+ <transition target="subFinal"/>
</state>
- <final id="subFinal"/>
- </scxml>
- </content>
- </invoke>
-
+ <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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test189.scxml b/test/w3c/ecma/test189.scxml
index 683b874..6a861cd 100644
--- a/test/w3c/ecma/test189.scxml
+++ b/test/w3c/ecma/test189.scxml
@@ -1,22 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that #_internal as a target of <send> puts the event on the internal queue. If it does,
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that #_internal as a target of <send> puts the event on the internal queue. If it does,
event1 will be processed before event2, because event1 is added to the internal queue while event2 is
-added to the external queue (event though event2 is generated first) --><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>
- <!-- goes to the external queue -->
- <send event="event2"/>
- <!-- to the internal queue -->
- <send event="event1" target="#_internal"/>
+added to the external queue (event though event2 is generated first) -->
+<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>
+ <!-- goes to the external queue -->
+ <send event="event2"/>
+ <!-- to the internal queue -->
+ <send event="event1" target="#_internal"/>
</onentry>
-
- <!-- once we've entered the state, we should check for internal events first -->
- <transition event="event1" target="pass"/>
- <transition event="event2" 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
+ <!-- once we've entered the state, we should check for internal events first -->
+ <transition event="event1" target="pass"/>
+ <transition event="event2" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test190.scxml b/test/w3c/ecma/test190.scxml
index a1f6d56..f5b766b 100644
--- a/test/w3c/ecma/test190.scxml
+++ b/test/w3c/ecma/test190.scxml
@@ -1,35 +1,40 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that #_scxml_sessionid as a target of <send> puts the event on the external queue. If it does,
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that #_scxml_sessionid as a target of <send> puts the event on the external queue. If it does,
event1 will be processed before event2, because event1 is added to the internal queue while event2 is
added to the external queue (event though event2 is generated first). we have to make sure that event2
-is actually delivered. The delayed <send> makes sure another event is generated (so 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="'#_scxml_'"/>
- <data id="Var2" expr="_sessionid"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <assign location="Var1" expr="Var1 + Var2"/>
- <!-- goes to the external queue -->
- <send event="event2" targetexpr="Var1"/>
- <!-- to the internal queue -->
- <raise event="event1"/>
- <!-- this should get added to the external queue after event2 -->
- <send event="timeout"/>
+is actually delivered. The delayed <send> makes sure another event is generated (so 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="'#_scxml_'"/>
+ <data id="Var2" expr="_sessionid"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <assign location="Var1" expr="Var1 + Var2"/>
+ <!-- goes to the external queue -->
+ <send event="event2" targetexpr="Var1"/>
+ <!-- to the internal queue -->
+ <raise event="event1"/>
+ <!-- this should get added to the external queue after event2 -->
+ <send event="timeout"/>
</onentry>
-
- <!-- once we've entered the state, we should check for internal events first -->
- <transition event="event1" target="s1"/>
- <transition event="*" target="fail"/>
- </state>
-
-<!-- now check that we get event2 and not a timeout -->
-<state id="s1">
- <transition event="event2" target="pass"/>
- <transition event="*" target="fail"/>
+ <!-- once we've entered the state, we should check for internal events first -->
+ <transition event="event1" target="s1"/>
+ <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
+ <!-- now check that we get event2 and not a timeout -->
+ <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>
diff --git a/test/w3c/ecma/test191.scxml b/test/w3c/ecma/test191.scxml
index 6e82274..dc956f1 100644
--- a/test/w3c/ecma/test191.scxml
+++ b/test/w3c/ecma/test191.scxml
@@ -1,31 +1,37 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that #_parent works as a target of <send> . a subscript is invoked and sends the event
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that #_parent works as a target of <send> . a subscript is invoked and sends the event
childToParent to its parent session (ths session) using #_parent as the target. If we get this event, we
-pass, otherwise we fail. The timer insures that some event is generated and that the test does not 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">
-
-
-<state id="s0">
+pass, otherwise we fail. The timer insures that some event is generated and that the test does not 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">
+ <state id="s0">
<onentry>
<send event="timeout" delay="5s"/>
- </onentry>
+ </onentry>
<invoke type="scxml">
- <content>
- <!-- send an event to the parent session using #_parent as the target -->
+ <content>
+ <!-- send an event to the parent session using #_parent as the target -->
<scxml initial="sub0" version="1.0" datamodel="ecmascript">
<state id="sub0">
<onentry>
- <send event="childToParent" target="#_parent"/>
- </onentry>
- <transition target="subFinal"/>
- </state>
- <final id="subFinal"/>
- </scxml>
- </content>
+ <send event="childToParent" target="#_parent"/>
+ </onentry>
+ <transition target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
</invoke>
<transition event="childToParent" 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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test192.scxml b/test/w3c/ecma/test192.scxml
index a74a05e..c63a211 100644
--- a/test/w3c/ecma/test192.scxml
+++ b/test/w3c/ecma/test192.scxml
@@ -1,55 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that #_invokeid works as a target of <send> . A child script is invoked and sends us
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that #_invokeid works as a target of <send> . A child script is invoked and sends us
childToParent once its running. Then we send it the event parentToChild using its invokeid as the target.
If it receives this event, it sends sends the event eventReceived to its parent session (ths session).
If we get this event, we pass, otherwise the child script eventually times out sends invoke.done and we fail.
-We also set a timeout in this process to make sure 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" datamodel="ecmascript" version="1.0">
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="5s"/>
- </onentry>
-
- <invoke type="scxml" id="invokedChild">
- <content>
- <!-- let the parent session know we're running by sending childToParent, then wait for parentToChild.
+We also set a timeout in this process to make sure 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" datamodel="ecmascript" version="1.0">
+ <state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ </onentry>
+ <invoke type="scxml" id="invokedChild">
+ <content>
+ <!-- let the parent session know we're running by sending childToParent, then wait for parentToChild.
If we get it, send eventReceived. If we don't we eventually time out -->
- <scxml initial="sub0" version="1.0" datamodel="ecmascript">
-
- <state id="sub0">
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
<onentry>
- <send event="childToParent" target="#_parent"/>
- <send event="timeout" delay="3s"/>
- </onentry>
-
- <transition event="parentToChild" target="subFinal">
- <send target="#_parent" event="eventReceived"/>
- </transition>
-
- <transition event="timeout" target="subFinal"/>
- </state>
-
- <final id="subFinal"/>
-
- </scxml>
+ <send event="childToParent" target="#_parent"/>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <transition event="parentToChild" target="subFinal">
+ <send target="#_parent" event="eventReceived"/>
+ </transition>
+ <transition event="timeout" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
</content>
- </invoke>
-
- <transition event="timeout" target="fail"/>
- <transition event="done.invoke" target="fail"/>
-
-<state id="s01">
- <transition event="childToParent" target="s02">
- <send target="#_invokedChild" event="parentToChild"/>
- </transition>
-</state>
-
-<state id="s02">
- <transition event="eventReceived" target="pass"/>
+ </invoke>
+ <transition event="timeout" target="fail"/>
+ <transition event="done.invoke" target="fail"/>
+ <state id="s01">
+ <transition event="childToParent" target="s02">
+ <send target="#_invokedChild" event="parentToChild"/>
+ </transition>
+ </state>
+ <state id="s02">
+ <transition event="eventReceived" target="pass"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test193.scxml b/test/w3c/ecma/test193.scxml
index 286513d..92e0cce 100644
--- a/test/w3c/ecma/test193.scxml
+++ b/test/w3c/ecma/test193.scxml
@@ -1,26 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that omitting target and targetexpr of <send> when using the
-SCXML event i/o processor puts the event on the external queue. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
-
-
-<state id="s0">
- <onentry>
- <send event="internal"/>
- <!-- this should put event1 in the external queue -->
- <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
- <send event="timeout" delay="1s"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that omitting target and targetexpr of <send> when using the
+SCXML event i/o processor puts the event on the external queue. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+ <state id="s0">
+ <onentry>
+ <send event="internal"/>
+ <!-- this should put event1 in the external queue -->
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ <send event="timeout" delay="1s"/>
</onentry>
-
- <transition event="event1" target="fail"/>
- <transition event="internal" target="s1"/>
- </state>
-
- <state id="s1">
- <transition event="event1" target="pass"/>
- <transition event="timeout" target="fail"/>
-
- </state>
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <transition event="event1" target="fail"/>
+ <transition event="internal" target="s1"/>
+ </state>
+ <state id="s1">
+ <transition event="event1" target="pass"/>
+ <transition event="timeout" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test194.scxml b/test/w3c/ecma/test194.scxml
index e7dcd76..b4a5a5a 100644
--- a/test/w3c/ecma/test194.scxml
+++ b/test/w3c/ecma/test194.scxml
@@ -1,22 +1,26 @@
-<?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"/>
+<?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
+ <!-- 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>
diff --git a/test/w3c/ecma/test198.scxml b/test/w3c/ecma/test198.scxml
index e804625..bcb2cee 100644
--- a/test/w3c/ecma/test198.scxml
+++ b/test/w3c/ecma/test198.scxml
@@ -1,19 +1,23 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test199.scxml b/test/w3c/ecma/test199.scxml
index 2119cd8..cbc4a52 100644
--- a/test/w3c/ecma/test199.scxml
+++ b/test/w3c/ecma/test199.scxml
@@ -1,18 +1,22 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test200.scxml b/test/w3c/ecma/test200.scxml
index 2aa85a9..ef53be4 100644
--- a/test/w3c/ecma/test200.scxml
+++ b/test/w3c/ecma/test200.scxml
@@ -1,18 +1,22 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test201.scxml b/test/w3c/ecma/test201.scxml
index 8ded0d5..f7e1916 100644
--- a/test/w3c/ecma/test201.scxml
+++ b/test/w3c/ecma/test201.scxml
@@ -1,19 +1,23 @@
-<?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" targetexpr="_ioprocessors['basichttp']['location']" event="event1"/>
- <send event="timeout"/>
+<?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" targetexpr="_ioprocessors['basichttp']['location']" 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
+ <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>
diff --git a/test/w3c/ecma/test205.scxml b/test/w3c/ecma/test205.scxml
index 5adefbe..70068ab 100644
--- a/test/w3c/ecma/test205.scxml
+++ b/test/w3c/ecma/test205.scxml
@@ -1,30 +1,34 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test207.scxml b/test/w3c/ecma/test207.scxml
index fe30bf1..5b89697 100644
--- a/test/w3c/ecma/test207.scxml
+++ b/test/w3c/ecma/test207.scxml
@@ -1,56 +1,55 @@
-<?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
+<?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" delayexpr="'100ms'"/>
+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" delayexpr="'100ms'"/>
</onentry>
- <invoke type="scxml">
- <content>
- <!-- when invoked, we raise a delayed event1 with sendid 'foo' and notify our parent. Then we wait.
+ <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">
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript">
+ <state id="sub0">
<onentry>
- <send event="event1" id="foo" delayexpr="'50ms'"/>
+ <send event="event1" id="foo" delayexpr="'50ms'"/>
<send event="event2" delayexpr="'75ms'"/>
<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>
+ </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"/>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test208.scxml b/test/w3c/ecma/test208.scxml
index 043e537..ed0de3e 100644
--- a/test/w3c/ecma/test208.scxml
+++ b/test/w3c/ecma/test208.scxml
@@ -1,21 +1,24 @@
-<?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" delayexpr="'50ms'"/>
- <send event="event2" delayexpr="'75ms'"/>
- <cancel sendid="foo"/>
+<?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" delayexpr="'50ms'"/>
+ <send event="event2" delayexpr="'75ms'"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test210.scxml b/test/w3c/ecma/test210.scxml
index f103ecd..15d892d 100644
--- a/test/w3c/ecma/test210.scxml
+++ b/test/w3c/ecma/test210.scxml
@@ -1,24 +1,28 @@
-<?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'"/>
+<?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" delayexpr="'50ms'"/>
- <send event="event2" delayexpr="'75ms'"/>
- <assign location="Var1" expr="'foo'"/>
- <cancel sendidexpr="Var1"/>
+ <state id="s0">
+ <onentry>
+ <send id="foo" event="event1" delayexpr="'50ms'"/>
+ <send event="event2" delayexpr="'75ms'"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test215.scxml b/test/w3c/ecma/test215.scxml
index 97e6a39..a8e53b4 100644
--- a/test/w3c/ecma/test215.scxml
+++ b/test/w3c/ecma/test215.scxml
@@ -1,29 +1,35 @@
-<?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
+<?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/'"/>
+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>
+ <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"/>
+ <final id="subFinal"/>
</scxml>
- </content>
+ </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
+ <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>
diff --git a/test/w3c/ecma/test216.scxml b/test/w3c/ecma/test216.scxml
index 97b2a77..ae6f69c 100644
--- a/test/w3c/ecma/test216.scxml
+++ b/test/w3c/ecma/test216.scxml
@@ -1,22 +1,28 @@
-<?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
+<?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'"/>
+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
+ <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>
diff --git a/test/w3c/ecma/test216sub1.scxml b/test/w3c/ecma/test216sub1.scxml
index 3c3a88d..1081831 100644
--- a/test/w3c/ecma/test216sub1.scxml
+++ b/test/w3c/ecma/test216sub1.scxml
@@ -1,5 +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
+<?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>
diff --git a/test/w3c/ecma/test220.scxml b/test/w3c/ecma/test220.scxml
index 2d447c4..a5c3bb2 100644
--- a/test/w3c/ecma/test220.scxml
+++ b/test/w3c/ecma/test220.scxml
@@ -1,21 +1,29 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test223.scxml b/test/w3c/ecma/test223.scxml
index 63ceadd..d5c042e 100644
--- a/test/w3c/ecma/test223.scxml
+++ b/test/w3c/ecma/test223.scxml
@@ -1,29 +1,35 @@
-<?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"/>
+<?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"/>
+ <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>
+ </content>
</invoke>
- <transition event="*" target="s1"/>
-</state>
-
-<state id="s1">
- <transition cond="Var1" target="pass"/>
- <transition target="fail"/>
+ <transition event="*" target="s1"/>
</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
+ <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>
diff --git a/test/w3c/ecma/test224.scxml b/test/w3c/ecma/test224.scxml
index e2e8a32..f573a3f 100644
--- a/test/w3c/ecma/test224.scxml
+++ b/test/w3c/ecma/test224.scxml
@@ -1,31 +1,36 @@
-<?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"/>
+<?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 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"/>
+ <transition event="*" target="s1"/>
</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
+ <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"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test225.scxml b/test/w3c/ecma/test225.scxml
index 467d1ba..353d234 100644
--- a/test/w3c/ecma/test225.scxml
+++ b/test/w3c/ecma/test225.scxml
@@ -1,38 +1,42 @@
-<?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"/>
+<?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">
+ <invoke type="http://www.w3.org/TR/scxml/" idlocation="Var1">
<content>
- <scxml initial="subFinal1" version="1.0" datamodel="ecmascript">
- <final id="subFinal1"/>
+ <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>
+ </invoke>
+ <invoke type="http://www.w3.org/TR/scxml/" idlocation="Var2">
<content>
- <scxml initial="subFinal2" version="1.0" datamodel="ecmascript">
- <final id="subFinal2"/>
+ <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"/>
+ </content>
+ </invoke>
+ <transition event="*" target="s1"/>
</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
+ <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>
diff --git a/test/w3c/ecma/test226.scxml b/test/w3c/ecma/test226.scxml
index e1c6d3f..0983033 100644
--- a/test/w3c/ecma/test226.scxml
+++ b/test/w3c/ecma/test226.scxml
@@ -1,23 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- this is basically just a test that invoke works correctly and that you can pass data
+<?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"/>
+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">
+ <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
+ </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>
diff --git a/test/w3c/ecma/test226sub1.scxml b/test/w3c/ecma/test226sub1.scxml
index 809efb0..91ec4cb 100644
--- a/test/w3c/ecma/test226sub1.scxml
+++ b/test/w3c/ecma/test226sub1.scxml
@@ -1,16 +1,14 @@
-<?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"/>
+<?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"/>
+ <state id="s0">
+ <transition cond="Var1" target="final">
+ <send target="#_parent" event="varBound"/>
</transition>
- <transition target="final"/>
+ <transition target="final"/>
</state>
-
-<final id="final"/>
-
-</scxml> \ No newline at end of file
+ <final id="final"/>
+</scxml>
diff --git a/test/w3c/ecma/test228.scxml b/test/w3c/ecma/test228.scxml
index b44de56..73ea7ca 100644
--- a/test/w3c/ecma/test228.scxml
+++ b/test/w3c/ecma/test228.scxml
@@ -1,33 +1,37 @@
-<?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"/>
+<?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 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 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
+ <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>
diff --git a/test/w3c/ecma/test229.scxml b/test/w3c/ecma/test229.scxml
index e3aeecb..a64f673 100644
--- a/test/w3c/ecma/test229.scxml
+++ b/test/w3c/ecma/test229.scxml
@@ -1,42 +1,46 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that autofoward works. If the child process receives back a copy of the
+<?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"/>
+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.
+ <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 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>
+ </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
+ <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>
diff --git a/test/w3c/ecma/test230.scxml b/test/w3c/ecma/test230.scxml
index ae13476..ab72b35 100644
--- a/test/w3c/ecma/test230.scxml
+++ b/test/w3c/ecma/test230.scxml
@@ -1,62 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- a manual test that an autofowarded event has the same fields and values as the original event.
+<?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"/>
+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
+ <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">
+ <state id="sub0">
<onentry>
- <send target="#_parent" event="childToParent"/>
+ <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"/>
+ </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
+ <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>
diff --git a/test/w3c/ecma/test232.scxml b/test/w3c/ecma/test232.scxml
index 9515e15..f4f3940 100644
--- a/test/w3c/ecma/test232.scxml
+++ b/test/w3c/ecma/test232.scxml
@@ -1,40 +1,41 @@
-<?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"/>
+<?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 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
+ <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>
diff --git a/test/w3c/ecma/test233.scxml b/test/w3c/ecma/test233.scxml
index 1e07c20..49c8f93 100644
--- a/test/w3c/ecma/test233.scxml
+++ b/test/w3c/ecma/test233.scxml
@@ -1,35 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that finalize markup runs before the event is processed. The invoked process will
+<?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"/>
+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"/>
+ <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">
+ <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>
+ <send target="#_parent" event="childToParent">
+ <param name="aParam" expr="2"/>
+ </send>
+ </onentry>
</final>
- </scxml>
- </content>
- <finalize>
- <assign location="Var1" expr="_event.data.aParam"/>
+ </scxml>
+ </content>
+ <finalize>
+ <assign location="Var1" expr="_event.data.aParam"/>
</finalize>
- </invoke>
-
- <transition event="childToParent" cond="Var1==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
+ </invoke>
+ <transition event="childToParent" cond="Var1==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>
diff --git a/test/w3c/ecma/test234.scxml b/test/w3c/ecma/test234.scxml
index b874fe9..a243526 100644
--- a/test/w3c/ecma/test234.scxml
+++ b/test/w3c/ecma/test234.scxml
@@ -1,66 +1,69 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that only finalize markup in the invoking state runs. the first invoked process will
+<?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"/>
+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">
+ <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"/>
+ <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>
-
+ </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>
+ <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>
+ <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>
-
-</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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test235.scxml b/test/w3c/ecma/test235.scxml
index 17d0cf0..daa9d61 100644
--- a/test/w3c/ecma/test235.scxml
+++ b/test/w3c/ecma/test235.scxml
@@ -1,23 +1,29 @@
-<?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"/>
+<?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"/>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test236.scxml b/test/w3c/ecma/test236.scxml
index acb1cda..2907f36 100644
--- a/test/w3c/ecma/test236.scxml
+++ b/test/w3c/ecma/test236.scxml
@@ -1,39 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that done.invoke.id event is the last event we receive. the invoked process sends childToParent
+<?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" delayexpr="'100ms'"/>
+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" delayexpr="'100ms'"/>
</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"/>
+ <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>
+ </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"/>
+ </invoke>
+ <transition event="childToParent" target="s1"/>
+ <transition event="done.invoke" 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
+ <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>
diff --git a/test/w3c/ecma/test237.scxml b/test/w3c/ecma/test237.scxml
index 442b04c..5453e33 100644
--- a/test/w3c/ecma/test237.scxml
+++ b/test/w3c/ecma/test237.scxml
@@ -1,41 +1,45 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that cancelling works. invoked child sleeps for two seconds, then terminates. We
+<?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" delayexpr="'50ms'"/>
+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" delayexpr="'50ms'"/>
</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">
+ <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" delayexpr="'100ms'"/>
- </onentry>
- <transition event="timeout" target="subFinal"/>
- </state>
- <final id="subFinal"/>
- </scxml>
- </content>
- </invoke>
-
- <transition event="timeout1" target="s1"/>
-
-</state>
-
-<state id="s1">
+ </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" delayexpr="'75ms'"/>
+ <send event="timeout2" delayexpr="'75ms'"/>
</onentry>
- <!-- here we should NOT get done.invoke -->
- <transition event="done.invoke" target="fail"/>
- <transition event="*" target="pass"/>
+ <!-- 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test239.scxml b/test/w3c/ecma/test239.scxml
index 4fcfc92..0c79b73 100644
--- a/test/w3c/ecma/test239.scxml
+++ b/test/w3c/ecma/test239.scxml
@@ -1,32 +1,35 @@
-<?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"/>
+<?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">
+ <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"/>
+ <content>
+ <scxml version="1.0" initial="final" datamodel="ecmascript">
+ <final id="final"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="done.invoke" target="pass"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test239sub1.scxml b/test/w3c/ecma/test239sub1.scxml
index 0f099d3..9e058d7 100644
--- a/test/w3c/ecma/test239sub1.scxml
+++ b/test/w3c/ecma/test239sub1.scxml
@@ -1,5 +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
+<?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>
diff --git a/test/w3c/ecma/test240.scxml b/test/w3c/ecma/test240.scxml
index 6d74d4c..381b04b 100644
--- a/test/w3c/ecma/test240.scxml
+++ b/test/w3c/ecma/test240.scxml
@@ -1,67 +1,71 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that datamodel values can be specified both by 'namelist' and by <param>.
+<?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"/>
+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"/>
+ <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"/>
+ <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>
+ <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"/>
+ <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"/>
+ </invoke>
+ <transition event="success" target="pass"/>
+ <transition event="failure" target="fail"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test241.scxml b/test/w3c/ecma/test241.scxml
index af1471f..e036c0b 100644
--- a/test/w3c/ecma/test241.scxml
+++ b/test/w3c/ecma/test241.scxml
@@ -1,98 +1,96 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- The child process will return success ifits Var1 is set to 1, failure otherwise. For this test
+<?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"/>
+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"/>
+ <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">
+ <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>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition target="subFinal1">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
-
+ <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">
+ </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">
+ <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>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition target="subFinal2">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
-
+ <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">
+ </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">
+ <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>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition target="subFinal3">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
-
+ <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"/>
+ </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>
-
-</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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test242.scxml b/test/w3c/ecma/test242.scxml
index f0fa504..44886cc 100644
--- a/test/w3c/ecma/test242.scxml
+++ b/test/w3c/ecma/test242.scxml
@@ -1,53 +1,56 @@
-<?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"/>
+<?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">
+ <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>
- <send event="timeout2" delay="1s"/>
+ <log label="Outcome" expr="'pass'"/>
</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">
+ </final>
+ <final id="fail">
<onentry>
- <send event="timeout3" delay="1s"/>
+ <log label="Outcome" expr="'fail'"/>
</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
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test242sub1.scxml b/test/w3c/ecma/test242sub1.scxml
index 0f099d3..9e058d7 100644
--- a/test/w3c/ecma/test242sub1.scxml
+++ b/test/w3c/ecma/test242sub1.scxml
@@ -1,5 +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
+<?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>
diff --git a/test/w3c/ecma/test243.scxml b/test/w3c/ecma/test243.scxml
index 18f2175..96021a7 100644
--- a/test/w3c/ecma/test243.scxml
+++ b/test/w3c/ecma/test243.scxml
@@ -1,36 +1,41 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test244.scxml b/test/w3c/ecma/test244.scxml
index d251c59..29d8a53 100644
--- a/test/w3c/ecma/test244.scxml
+++ b/test/w3c/ecma/test244.scxml
@@ -1,39 +1,45 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that datamodel values can be specified by namelist.
+<?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"/>
+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"/>
+ <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">
+ <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
+ <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>
diff --git a/test/w3c/ecma/test245.scxml b/test/w3c/ecma/test245.scxml
index 58838b2..e8e6169 100644
--- a/test/w3c/ecma/test245.scxml
+++ b/test/w3c/ecma/test245.scxml
@@ -1,34 +1,40 @@
-<?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"/>
+<?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"/>
+ <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"/>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test247.scxml b/test/w3c/ecma/test247.scxml
index b543bf1..d399355 100644
--- a/test/w3c/ecma/test247.scxml
+++ b/test/w3c/ecma/test247.scxml
@@ -1,22 +1,28 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test250.scxml b/test/w3c/ecma/test250.scxml
index f5228ab..1e012bd 100644
--- a/test/w3c/ecma/test250.scxml
+++ b/test/w3c/ecma/test250.scxml
@@ -1,42 +1,39 @@
-<?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
+<?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"/>
+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"/>
+ <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 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>
+ <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
+ </invoke>
+ <!-- this transition will cause the invocation to be cancelled -->
+ <transition event="foo" target="final"/>
+ </state>
+ <final id="final"/>
+</scxml>
diff --git a/test/w3c/ecma/test252.scxml b/test/w3c/ecma/test252.scxml
index 14c6686..4bdf7e7 100644
--- a/test/w3c/ecma/test252.scxml
+++ b/test/w3c/ecma/test252.scxml
@@ -1,47 +1,48 @@
-<?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
+<?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"/>
+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" delayexpr="'50ms'"/>
</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"/>
+ </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" delayexpr="'25ms'"/>
+ </onentry>
+ <transition event="timeout" target="subFinal"/>
+ <onexit>
+ <send target="#_parent" event="childToParent"/>
+ </onexit>
+ </state>
+ <final id="subFinal"/>
</scxml>
- </content>
+ </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
+ <!-- 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>
diff --git a/test/w3c/ecma/test253.scxml b/test/w3c/ecma/test253.scxml
index e8924ec..4b1c80b 100644
--- a/test/w3c/ecma/test253.scxml
+++ b/test/w3c/ecma/test253.scxml
@@ -1,79 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the scxml event processor is used in both directions. If child process uses the
+<?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"/>
+'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"/>
+ <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
+ <!-- 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"/>
+ <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>
+ <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>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition cond="Var2=='scxml'" target="subFinal">
- <send target="#_parent" event="success"/>
- </transition>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition target="subFinal">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
<final id="subFinal"/>
- </scxml>
- </content>
- </invoke>
-
+ </scxml>
+ </content>
+ </invoke>
<state id="s01">
- <transition event="childRunning" target="s02">
- <assign location="Var1" expr="_event.origintype"/>
- </transition>
- </state>
-
+ <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">
+ <transition cond="Var1=='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" target="s03">
<send target="#_foo" event="parentToChild"/>
- </transition>
- <transition cond="Var1=='scxml'" target="s03">
+ </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
+ </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>
diff --git a/test/w3c/ecma/test276.scxml b/test/w3c/ecma/test276.scxml
index 233c171..9cd9045 100644
--- a/test/w3c/ecma/test276.scxml
+++ b/test/w3c/ecma/test276.scxml
@@ -1,17 +1,22 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test276sub1.scxml b/test/w3c/ecma/test276sub1.scxml
index b18ceb2..2a0cf95 100644
--- a/test/w3c/ecma/test276sub1.scxml
+++ b/test/w3c/ecma/test276sub1.scxml
@@ -1,21 +1,16 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test277.scxml b/test/w3c/ecma/test277.scxml
index eb6a1ee..889c615 100644
--- a/test/w3c/ecma/test277.scxml
+++ b/test/w3c/ecma/test277.scxml
@@ -1,28 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that platform creates undound variable if we assign an illegal value to it. Thus
- we can assign to it later in state s1. --><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="return"/>
- </datamodel>
-
- <state id="s0">
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that platform creates undound variable if we assign an illegal value to it. Thus
+ we can assign to it later in state s1. -->
+<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="return"/>
+ </datamodel>
+ <state id="s0">
<onentry>
- <raise event="foo"/>
+ <raise event="foo"/>
</onentry>
-
- <transition event="error.execution" cond="typeof Var1 === 'undefined' " target="s1"/>
- <transition event="*" target="fail"/>
- </state>
-
- <state id="s1">
- <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
+ <transition event="error.execution" cond="typeof Var1 === 'undefined' " target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s1">
+ <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>
diff --git a/test/w3c/ecma/test278.scxml b/test/w3c/ecma/test278.scxml
index b26c6f2..1b807f1 100644
--- a/test/w3c/ecma/test278.scxml
+++ b/test/w3c/ecma/test278.scxml
@@ -1,21 +1,23 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test279.scxml b/test/w3c/ecma/test279.scxml
index 2de6fd2..3b61652 100644
--- a/test/w3c/ecma/test279.scxml
+++ b/test/w3c/ecma/test279.scxml
@@ -1,21 +1,24 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test280.scxml b/test/w3c/ecma/test280.scxml
index 78865bf..f406a8e 100644
--- a/test/w3c/ecma/test280.scxml
+++ b/test/w3c/ecma/test280.scxml
@@ -1,28 +1,33 @@
-<?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
+<?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">
+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="Var2" expr="1"/>
+ <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"/>
+ <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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test286.scxml b/test/w3c/ecma/test286.scxml
index 1c4c6bd..77ea22a 100644
--- a/test/w3c/ecma/test286.scxml
+++ b/test/w3c/ecma/test286.scxml
@@ -1,18 +1,23 @@
-<?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="foo.bar.baz " 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
+<?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="foo.bar.baz " 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>
diff --git a/test/w3c/ecma/test287.scxml b/test/w3c/ecma/test287.scxml
index 030c6b5..428f621 100644
--- a/test/w3c/ecma/test287.scxml
+++ b/test/w3c/ecma/test287.scxml
@@ -1,19 +1,24 @@
-<?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>
+<?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
+ </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>
diff --git a/test/w3c/ecma/test288.scxml b/test/w3c/ecma/test288.scxml
new file mode 100644
index 0000000..8beef13
--- /dev/null
+++ b/test/w3c/ecma/test288.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- a simple test that a legal value may be assigned to a valid data model location
+using child content -->
+<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">123</assign>
+ </onentry>
+ <transition cond="Var1 == 123" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test294.scxml b/test/w3c/ecma/test294.scxml
index fea1d8c..da034d7 100644
--- a/test/w3c/ecma/test294.scxml
+++ b/test/w3c/ecma/test294.scxml
@@ -1,46 +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">
+<?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 event="done.state.s0" target="fail">
</transition>
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <param name="Var1" expr="1"/>
+ <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">
+ </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 event="done.state.s1" target="fail">
</transition>
-
- <state id="s11">
- <transition target="s12"/>
- </state>
- <final id="s12">
- <donedata>
- <content>foo</content>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test298.scxml b/test/w3c/ecma/test298.scxml
index 38c0e6d..0ef06fd 100644
--- a/test/w3c/ecma/test298.scxml
+++ b/test/w3c/ecma/test298.scxml
@@ -1,27 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- reference a non-existent data model location in param in donedata and see that the right error is raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="1s"/>
- </onentry>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- reference a non-existent data model location in param in donedata and see that the right error is raised -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
<transition event="error.execution" target="pass"/>
- <transition event="*" target="fail"/>
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <param name="Var3" location="foo.bar.baz "/>
+ <transition event="*" target="fail"/>
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param name="Var3" location="foo.bar.baz "/>
</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
+ </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>
diff --git a/test/w3c/ecma/test301.scxml b/test/w3c/ecma/test301.scxml
index 59125c8..0b2bd50 100644
--- a/test/w3c/ecma/test301.scxml
+++ b/test/w3c/ecma/test301.scxml
@@ -1,13 +1,19 @@
-<?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" 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
+<?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" 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>
diff --git a/test/w3c/ecma/test302.scxml b/test/w3c/ecma/test302.scxml
index 166b4fc..3c4c2bc 100644
--- a/test/w3c/ecma/test302.scxml
+++ b/test/w3c/ecma/test302.scxml
@@ -1,15 +1,21 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that a script is evaluated at load time. <conf:script> shoudl assign the value 1 to
+<?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" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="ecmascript" 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
+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" version="1.0" datamodel="ecmascript" 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>
diff --git a/test/w3c/ecma/test303.scxml b/test/w3c/ecma/test303.scxml
index 0b1e11c..d02eb07 100644
--- a/test/w3c/ecma/test303.scxml
+++ b/test/w3c/ecma/test303.scxml
@@ -1,20 +1,26 @@
-<?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" version="1.0" datamodel="ecmascript" 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
+<?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" version="1.0" datamodel="ecmascript" 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>
diff --git a/test/w3c/ecma/test304.scxml b/test/w3c/ecma/test304.scxml
index 250d0cd..7a8f7b2 100644
--- a/test/w3c/ecma/test304.scxml
+++ b/test/w3c/ecma/test304.scxml
@@ -1,13 +1,19 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test307.scxml b/test/w3c/ecma/test307.scxml
index 3f93f10..61f49fc 100644
--- a/test/w3c/ecma/test307.scxml
+++ b/test/w3c/ecma/test307.scxml
@@ -1,42 +1,35 @@
-<?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
+<?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: " 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
+ <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>
diff --git a/test/w3c/ecma/test309.scxml b/test/w3c/ecma/test309.scxml
index 7ac405c..be86376 100644
--- a/test/w3c/ecma/test309.scxml
+++ b/test/w3c/ecma/test309.scxml
@@ -1,12 +1,18 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test310.scxml b/test/w3c/ecma/test310.scxml
index e939ded..880d746 100644
--- a/test/w3c/ecma/test310.scxml
+++ b/test/w3c/ecma/test310.scxml
@@ -1,18 +1,21 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test311.scxml b/test/w3c/ecma/test311.scxml
index 9398c38..14d2294 100644
--- a/test/w3c/ecma/test311.scxml
+++ b/test/w3c/ecma/test311.scxml
@@ -1,17 +1,22 @@
-<?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>
- <send event="timeout" delay="1s"/>
- <assign location="foo.bar.baz " 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
+<?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>
+ <send event="timeout" delay="1s"/>
+ <assign location="foo.bar.baz " 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>
diff --git a/test/w3c/ecma/test312.scxml b/test/w3c/ecma/test312.scxml
index a9741e5..2ccef13 100644
--- a/test/w3c/ecma/test312.scxml
+++ b/test/w3c/ecma/test312.scxml
@@ -1,20 +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" 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
+<?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>
diff --git a/test/w3c/ecma/test313.scxml b/test/w3c/ecma/test313.scxml
index fcec4ac..0d64312 100644
--- a/test/w3c/ecma/test313.scxml
+++ b/test/w3c/ecma/test313.scxml
@@ -1,21 +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" 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
+<?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>
diff --git a/test/w3c/ecma/test314.scxml b/test/w3c/ecma/test314.scxml
index ed78e79..6b117c8 100644
--- a/test/w3c/ecma/test314.scxml
+++ b/test/w3c/ecma/test314.scxml
@@ -1,34 +1,35 @@
-<?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">
+<?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 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>
-
-</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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test318.scxml b/test/w3c/ecma/test318.scxml
index 15bf7f8..091e674 100644
--- a/test/w3c/ecma/test318.scxml
+++ b/test/w3c/ecma/test318.scxml
@@ -1,27 +1,32 @@
-<?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"/>
+<?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 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
+ <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>
diff --git a/test/w3c/ecma/test319.scxml b/test/w3c/ecma/test319.scxml
index adac328..89f02f6 100644
--- a/test/w3c/ecma/test319.scxml
+++ b/test/w3c/ecma/test319.scxml
@@ -1,20 +1,25 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test321.scxml b/test/w3c/ecma/test321.scxml
index 66fcf58..3ed4446 100644
--- a/test/w3c/ecma/test321.scxml
+++ b/test/w3c/ecma/test321.scxml
@@ -1,15 +1,21 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test322.scxml b/test/w3c/ecma/test322.scxml
index 2d0fee1..21747fe 100644
--- a/test/w3c/ecma/test322.scxml
+++ b/test/w3c/ecma/test322.scxml
@@ -1,33 +1,34 @@
-<?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"/>
+<?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"/>
+ <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"/>
- </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
+ <transition event="error.execution" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s2">
+ <transition cond="Var1==_sessionid" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test323.scxml b/test/w3c/ecma/test323.scxml
index 43fa9c8..11c26ec 100644
--- a/test/w3c/ecma/test323.scxml
+++ b/test/w3c/ecma/test323.scxml
@@ -1,15 +1,21 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test324.scxml b/test/w3c/ecma/test324.scxml
index 7e5023e..45ac791 100644
--- a/test/w3c/ecma/test324.scxml
+++ b/test/w3c/ecma/test324.scxml
@@ -1,21 +1,25 @@
-<?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"/>
+<?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'"/>
+ </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
+ <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>
diff --git a/test/w3c/ecma/test325.scxml b/test/w3c/ecma/test325.scxml
index eaa4c22..a16a7ed 100644
--- a/test/w3c/ecma/test325.scxml
+++ b/test/w3c/ecma/test325.scxml
@@ -1,18 +1,23 @@
-<?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
+<?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"/>
+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
+ <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>
diff --git a/test/w3c/ecma/test326.scxml b/test/w3c/ecma/test326.scxml
index f18a661..1da20b1 100644
--- a/test/w3c/ecma/test326.scxml
+++ b/test/w3c/ecma/test326.scxml
@@ -1,35 +1,37 @@
-<?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"/>
+<?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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test329.scxml b/test/w3c/ecma/test329.scxml
index 9a95643..2d891b4 100644
--- a/test/w3c/ecma/test329.scxml
+++ b/test/w3c/ecma/test329.scxml
@@ -1,53 +1,54 @@
-<?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"/>
+<?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 cond="Var2==_event" target="s2"/>
- <transition target="fail"/>
- </state>
-
-<state id="s2">
- <onentry>
- <assign location="Var3" expr="_name"/>
- <assign location="_name" expr="27"/>
+ <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="Var3==_name" target="s3"/>
- <transition target="fail"/>
- </state>
-
-
-<state id="s3">
- <onentry>
- <assign location="Var4" expr="_ioprocessors"/>
- <assign location="_ioprocessors" expr="27"/>
+ <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="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
+ <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>
diff --git a/test/w3c/ecma/test330.scxml b/test/w3c/ecma/test330.scxml
index 5488f96..71578f3 100644
--- a/test/w3c/ecma/test330.scxml
+++ b/test/w3c/ecma/test330.scxml
@@ -1,23 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- check that the required fields are present in both internal and external events --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="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 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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- check that the required fields are present in both internal and external events -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="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 id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test331.scxml b/test/w3c/ecma/test331.scxml
index 82272ea..6c5b8bf 100644
--- a/test/w3c/ecma/test331.scxml
+++ b/test/w3c/ecma/test331.scxml
@@ -1,60 +1,59 @@
-<?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"/>
+<?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="s2">
- <onentry>
- <!-- this will generate an error, which is a platform event -->
- <assign location="foo.bar.baz " 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 id="s1">
+ <transition cond="Var1=='internal'" target="s2"/>
+ <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 id="s2">
+ <onentry>
+ <!-- this will generate an error, which is a platform event -->
+ <assign location="foo.bar.baz " expr="1"/>
+ </onentry>
+ <transition event="error" target="s3">
+ <assign location="Var1" expr="_event.type"/>
+ </transition>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test332.scxml b/test/w3c/ecma/test332.scxml
index da68cf4..5b14559 100644
--- a/test/w3c/ecma/test332.scxml
+++ b/test/w3c/ecma/test332.scxml
@@ -1,29 +1,34 @@
-<?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"/>
+<?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"/>
+ </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>
-
- <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
+ <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>
diff --git a/test/w3c/ecma/test333.scxml b/test/w3c/ecma/test333.scxml
index 9e06896..3124c9e 100644
--- a/test/w3c/ecma/test333.scxml
+++ b/test/w3c/ecma/test333.scxml
@@ -1,16 +1,21 @@
-<?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="typeof _event.sendid === 'undefined' " 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
+<?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="typeof _event.sendid === 'undefined' " 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>
diff --git a/test/w3c/ecma/test335.scxml b/test/w3c/ecma/test335.scxml
index a56074a..ae4931e 100644
--- a/test/w3c/ecma/test335.scxml
+++ b/test/w3c/ecma/test335.scxml
@@ -1,16 +1,21 @@
-<?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="typeof _event.origin === 'undefined' " 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
+<?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="typeof _event.origin === 'undefined' " 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>
diff --git a/test/w3c/ecma/test336.scxml b/test/w3c/ecma/test336.scxml
index 92bd3dd..c8e276a 100644
--- a/test/w3c/ecma/test336.scxml
+++ b/test/w3c/ecma/test336.scxml
@@ -1,25 +1,31 @@
-<?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"/>
+<?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="bar" target="pass"/>
- <transition event="*" target="fail"/>
+ <transition event="foo" target="s1">
+ <send event="bar" targetexpr="_event.origin" typeexpr="_event.origintype"/>
+ </transition>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test337.scxml b/test/w3c/ecma/test337.scxml
index 71092a8..d600a7b 100644
--- a/test/w3c/ecma/test337.scxml
+++ b/test/w3c/ecma/test337.scxml
@@ -1,16 +1,21 @@
-<?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="typeof _event.origintype === 'undefined' " 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
+<?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="typeof _event.origintype === 'undefined' " 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>
diff --git a/test/w3c/ecma/test338.scxml b/test/w3c/ecma/test338.scxml
index fef53be..abfd71f 100644
--- a/test/w3c/ecma/test338.scxml
+++ b/test/w3c/ecma/test338.scxml
@@ -1,39 +1,43 @@
-<?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"/>
+<?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>
+ <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"/>
+ <transition event="event1" target="s1">
+ <assign location="Var2" expr="_event.invokeid"/>
+ </transition>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test339.scxml b/test/w3c/ecma/test339.scxml
index 82864c9..0c747ca 100644
--- a/test/w3c/ecma/test339.scxml
+++ b/test/w3c/ecma/test339.scxml
@@ -1,16 +1,21 @@
-<?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="typeof _event.invokeid === 'undefined' " 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
+<?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="typeof _event.invokeid === 'undefined' " 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>
diff --git a/test/w3c/ecma/test342.scxml b/test/w3c/ecma/test342.scxml
index 2934704..50b2e10 100644
--- a/test/w3c/ecma/test342.scxml
+++ b/test/w3c/ecma/test342.scxml
@@ -1,25 +1,31 @@
-<?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">
+<?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
+ </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>
diff --git a/test/w3c/ecma/test343.scxml b/test/w3c/ecma/test343.scxml
index a1455d9..ee23db1 100644
--- a/test/w3c/ecma/test343.scxml
+++ b/test/w3c/ecma/test343.scxml
@@ -1,34 +1,35 @@
-<?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">
+<?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="foo.bar.baz " name="someParam"/>
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param location="foo.bar.baz " name="someParam"/>
</donedata>
- </final>
+ </final>
</state>
-
-
- <!-- if we get here, we received the error event. Now check that the done
+ <!-- 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="typeof _event.data === 'undefined'" 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
+ <state id="s1">
+ <transition event="done.state.s0" cond="typeof _event.data === 'undefined'" 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>
diff --git a/test/w3c/ecma/test344.scxml b/test/w3c/ecma/test344.scxml
index 068581d..d8da1c3 100644
--- a/test/w3c/ecma/test344.scxml
+++ b/test/w3c/ecma/test344.scxml
@@ -1,23 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that a cond expression that cannot be evaluated as a
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that a cond expression that cannot be evaluated as a
boolean cond expression evaluates to false and causes error.execution to be raised.
In some languages, any valid expression/object can be converted to a boolean, so conf:nonBoolean will
-have to be mapped onto something that produces a syntax error or something similarly invalid --><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"/>
+have to be mapped onto something that produces a syntax error or something similarly invalid -->
+<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"/>
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
</onentry>
- <transition event="error.execution" target="pass"/>
- <transition event="*" target="fail"/>
+ <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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test346.scxml b/test/w3c/ecma/test346.scxml
index 622de71..3f7cd3a 100644
--- a/test/w3c/ecma/test346.scxml
+++ b/test/w3c/ecma/test346.scxml
@@ -1,53 +1,54 @@
-<?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.
+<?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"/>
+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"/>
+ <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
+ <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"/>
+ <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"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test347.scxml b/test/w3c/ecma/test347.scxml
index 7ed7cca..a51becd 100644
--- a/test/w3c/ecma/test347.scxml
+++ b/test/w3c/ecma/test347.scxml
@@ -1,40 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the scxml event I/O processor works by sending events back and forth between an invoked child
-and its parent process --><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" initial="s01">
- <invoke id="child" type="scxml">
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that the scxml event I/O processor works by sending events back and forth between an invoked child
+and its parent process -->
+<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" initial="s01">
+ <invoke id="child" type="scxml">
<content>
- <scxml initial="sub0" version="1.0" datamodel="ecmascript" name="machineName">
- <state id="sub0">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_parent" event="childToParent"/>
- </onentry>
- <transition event="parentToChild" target="subFinal"/>
- </state>
- <final id="subFinal"/>
- </scxml>
- </content>
- </invoke>
- <onentry>
- <send delay="20s" event="timeout"/>
- </onentry>
- <transition event="timeout" target="fail"/>
-
- <state id="s01">
+ <scxml initial="sub0" version="1.0" datamodel="ecmascript" name="machineName">
+ <state id="sub0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_parent" event="childToParent"/>
+ </onentry>
+ <transition event="parentToChild" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <onentry>
+ <send delay="20s" event="timeout"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+ <state id="s01">
<transition event="childToParent" target="s02"/>
- </state>
-
- <state id="s02">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_child" event="parentToChild"/>
- </onentry>
- <transition event="done.invoke" target="pass"/>
- <transition event="error" 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
+ </state>
+ <state id="s02">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_child" event="parentToChild"/>
+ </onentry>
+ <transition event="done.invoke" target="pass"/>
+ <transition event="error" 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>
diff --git a/test/w3c/ecma/test348.scxml b/test/w3c/ecma/test348.scxml
index dc4b301..a83cba2 100644
--- a/test/w3c/ecma/test348.scxml
+++ b/test/w3c/ecma/test348.scxml
@@ -1,18 +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" datamodel="ecmascript" version="1.0">
-
- <!-- test that event param of send sets the name of the event -->
-
-<state id="s0">
-
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="pass"/>
- <transition event="*" target="fail"/>
-
-</state>
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+<?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" datamodel="ecmascript" version="1.0">
+ <!-- test that event param of send sets the name of the event -->
+ <state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test349.scxml b/test/w3c/ecma/test349.scxml
index 7fe2408..1edef13 100644
--- a/test/w3c/ecma/test349.scxml
+++ b/test/w3c/ecma/test349.scxml
@@ -1,29 +1,33 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that value in origin field can be used to send an event back to the sender --><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"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that value in origin field can be used to send an event back to the sender -->
+<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 type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="s2">
- <assign location="Var1" expr="_event.origin"/>
+ <state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="s2">
+ <assign location="Var1" expr="_event.origin"/>
</transition>
- <transition event="*" target="fail"/>
-
-</state>
-
-<state id="s2">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="Var1" event="s0Event2"/>
- </onentry>
- <transition event="s0Event2" 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
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s2">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="Var1" event="s0Event2"/>
+ </onentry>
+ <transition event="s0Event2" 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>
diff --git a/test/w3c/ecma/test350.scxml b/test/w3c/ecma/test350.scxml
index 176903e..329585d 100644
--- a/test/w3c/ecma/test350.scxml
+++ b/test/w3c/ecma/test350.scxml
@@ -1,24 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that target value is used to decide what session to deliver the event to. A session should be
-able to send an event to itself using its own session ID as the target --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0">
-<datamodel>
- <data id="Var1" expr="'#_scxml_'"/>
- <data id="Var2" expr="_sessionid"/>
-</datamodel>
-
-<state id="s0">
-
- <onentry>
- <assign location="Var1" expr="Var1 + Var2"/>
- <send delay="5s" event="timeout"/>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="Var1" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="pass"/>
- <transition event="*" target="fail"/>
-
-</state>
-
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that target value is used to decide what session to deliver the event to. A session should be
+able to send an event to itself using its own session ID as the target -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="'#_scxml_'"/>
+ <data id="Var2" expr="_sessionid"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <assign location="Var1" expr="Var1 + Var2"/>
+ <send delay="5s" event="timeout"/>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="Var1" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test351.scxml b/test/w3c/ecma/test351.scxml
index a308a14..2bc4c8a 100644
--- a/test/w3c/ecma/test351.scxml
+++ b/test/w3c/ecma/test351.scxml
@@ -1,48 +1,47 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that sendid is set in event if present in send, blank otherwise --><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"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that sendid is set in event if present in send, blank otherwise -->
+<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"/>
</datamodel>
-
-
-<state id="s0">
-
- <onentry>
- <send delay="5s" event="timeout"/>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" id="send1" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="s1">
- <assign location="Var1" expr="_event.sendid"/>
+ <state id="s0">
+ <onentry>
+ <send delay="5s" event="timeout"/>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" id="send1" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="s1">
+ <assign location="Var1" expr="_event.sendid"/>
</transition>
- <transition event="*" target="fail">
+ <transition event="*" target="fail">
</transition>
-
-</state>
-
-<state id="s1">
- <transition cond="Var1=='send1'" target="s2"/>
- <transition target="fail"/>
- </state>
-
-<state id="s2">
-
- <onentry>
- <send delay="5s" event="timeout"/>
+ </state>
+ <state id="s1">
+ <transition cond="Var1=='send1'" target="s2"/>
+ <transition target="fail"/>
+ </state>
+ <state id="s2">
+ <onentry>
+ <send delay="5s" event="timeout"/>
<send event="s0Event2"/>
- </onentry>
- <transition event="s0Event2" target="s3">
- <assign location="Var2" expr="_event.sendid"/>
+ </onentry>
+ <transition event="s0Event2" target="s3">
+ <assign location="Var2" expr="_event.sendid"/>
</transition>
- <transition event="*" target="fail"/>
-</state>
-
-<state id="s3">
- <transition cond="!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
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s3">
+ <transition cond="!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>
diff --git a/test/w3c/ecma/test352.scxml b/test/w3c/ecma/test352.scxml
index 513089a..f550255 100644
--- a/test/w3c/ecma/test352.scxml
+++ b/test/w3c/ecma/test352.scxml
@@ -1,29 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test the origintype is 'http://www.w3.org/TR/scxml/#SCXMLEventProcessor' --><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"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test the origintype is 'http://www.w3.org/TR/scxml/#SCXMLEventProcessor' -->
+<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 delay="5s" event="timeout"/>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="s1">
- <assign location="Var1" expr="_event.origintype"/>
+ <state id="s0">
+ <onentry>
+ <send delay="5s" event="timeout"/>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="s1">
+ <assign location="Var1" expr="_event.origintype"/>
</transition>
- <transition event="*" target="fail">
+ <transition event="*" target="fail">
</transition>
-
-</state>
-
-<state id="s1">
- <transition cond="Var1=='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" 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
+ </state>
+ <state id="s1">
+ <transition cond="Var1=='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test354.scxml b/test/w3c/ecma/test354.scxml
index 6c544a4..329b11c 100644
--- a/test/w3c/ecma/test354.scxml
+++ b/test/w3c/ecma/test354.scxml
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that event.data can be populated using both namelist, param and <content>
-and that correct values are used --><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"/>
- <data id="Var3"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that event.data can be populated using both namelist, param and <content>
+and that correct values are used -->
+<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"/>
+ <data id="Var3"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send delay="5s" event="timeout"/>
- <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" namelist="Var1">
- <param name="param1" expr="2"/>
- </send>
- </onentry>
- <transition event="event1" target="s1">
- <assign location="Var2" expr="_event.data.Var1"/>
- <assign location="Var3" expr="_event.data.param1"/>
+ <state id="s0">
+ <onentry>
+ <send delay="5s" event="timeout"/>
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" namelist="Var1">
+ <param name="param1" expr="2"/>
+ </send>
+ </onentry>
+ <transition event="event1" target="s1">
+ <assign location="Var2" expr="_event.data.Var1"/>
+ <assign location="Var3" expr="_event.data.param1"/>
</transition>
- <transition event="*" target="fail">
+ <transition event="*" target="fail">
</transition>
-
-</state>
-
-<state id="s1">
-
- <transition cond="Var2==1" target="s2"/>
- <transition target="fail"/>
</state>
-
-<state id="s2">
+ <state id="s1">
+ <transition cond="Var2==1" target="s2"/>
+ <transition target="fail"/>
+ </state>
+ <state id="s2">
<transition cond="Var3==2" target="s3"/>
- <transition target="fail"/>
+ <transition target="fail"/>
</state>
-
-<state id="s3">
- <onentry>
- <send delay="5s" event="timeout"/>
- <send event="event2">
- <content>123</content>
+ <state id="s3">
+ <onentry>
+ <send delay="5s" event="timeout"/>
+ <send event="event2">
+ <content>123</content>
</send>
- </onentry>
- <transition event="event2" 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
+ </onentry>
+ <transition event="event2" 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>
diff --git a/test/w3c/ecma/test355.scxml b/test/w3c/ecma/test355.scxml
index 6a77251..d379987 100644
--- a/test/w3c/ecma/test355.scxml
+++ b/test/w3c/ecma/test355.scxml
@@ -1,14 +1,20 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test364.scxml b/test/w3c/ecma/test364.scxml
index ac57647..9d726e1 100644
--- a/test/w3c/ecma/test364.scxml
+++ b/test/w3c/ecma/test364.scxml
@@ -1,73 +1,79 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that default initial states are entered when a compound state is entered. First we test
+<?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"/>
+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"/>
+ <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>
+ <state id="s11p12" initial="s11p121">
+ <state id="s11p121"/>
+ <state id="s11p122">
+ <transition event="In-s11p112" target="s2"/>
+ </state>
+ </state>
</parallel>
+ </state>
</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 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>
+ </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>
-</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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test372.scxml b/test/w3c/ecma/test372.scxml
index 9b6c7ec..355382b 100644
--- a/test/w3c/ecma/test372.scxml
+++ b/test/w3c/ecma/test372.scxml
@@ -1,28 +1,33 @@
-<?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"/>
+<?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"/>
+ <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>
- <transition event="done.state.s0" cond="Var1==2" target="pass"/>
- <transition event="*" target="fail"/>
-
- <final id="s0final">
+ </final>
+ <final id="fail">
<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
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test375.scxml b/test/w3c/ecma/test375.scxml
index 1652588..4c860d2 100644
--- a/test/w3c/ecma/test375.scxml
+++ b/test/w3c/ecma/test375.scxml
@@ -1,26 +1,28 @@
-<?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"/>
+<?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>
+ <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"/>
+ <transition event="event1" target="s1"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test376.scxml b/test/w3c/ecma/test376.scxml
index 1da5a9a..ddafdc5 100644
--- a/test/w3c/ecma/test376.scxml
+++ b/test/w3c/ecma/test376.scxml
@@ -1,22 +1,28 @@
-<?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"/>
+<?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>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test377.scxml b/test/w3c/ecma/test377.scxml
index 49549c8..3ee07cf 100644
--- a/test/w3c/ecma/test377.scxml
+++ b/test/w3c/ecma/test377.scxml
@@ -1,31 +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"/>
+<?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>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test378.scxml b/test/w3c/ecma/test378.scxml
index 34501fb..05578d4 100644
--- a/test/w3c/ecma/test378.scxml
+++ b/test/w3c/ecma/test378.scxml
@@ -1,25 +1,31 @@
-<?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"/>
+<?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>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test387.scxml b/test/w3c/ecma/test387.scxml
index 35fb910..f94191a 100644
--- a/test/w3c/ecma/test387.scxml
+++ b/test/w3c/ecma/test387.scxml
@@ -1,97 +1,93 @@
-<?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
+<?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"/>
+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 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"/>
+ <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>
- <state id="s02" initial="s021">
- <state id="s021">
- <onentry>
- <raise event="enteringS021"/>
- </onentry>
- </state>
- <state id="s022">
- <onentry>
- <raise event="enteringS022"/>
+ <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>
-
-<state id="s1" initial="s11">
-
- <transition event="enteringS122" target="pass"/>
- <transition event="*" target="fail"/>
-
- <history type="shallow" id="s1HistShallow">
- <transition target="s11"/>
+ <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 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"/>
+ <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>
- <state id="s12" initial="s121">
- <state id="s121">
- <onentry>
- <raise event="enteringS121"/>
- </onentry>
- </state>
- <state id="s122">
- <onentry>
- <raise event="enteringS122"/>
+ <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>
-
-
-<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
+ <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>
diff --git a/test/w3c/ecma/test388.scxml b/test/w3c/ecma/test388.scxml
index 6a93fd0..347e7f6 100644
--- a/test/w3c/ecma/test388.scxml
+++ b/test/w3c/ecma/test388.scxml
@@ -1,76 +1,74 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that history states works correctly. The counter Var1 counts how many times
+<?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"/>
+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"/>
+ <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"/>
+ <!-- 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"/>
+ <!-- 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 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"/>
+ <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>
- <state id="s02" initial="s021">
- <state id="s021">
- <onentry>
- <raise event="entering.s021"/>
- </onentry>
- </state>
- <state id="s022">
- <onentry>
- <raise event="entering.s022"/>
+ <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>
-
-
-<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
+ <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>
diff --git a/test/w3c/ecma/test396.scxml b/test/w3c/ecma/test396.scxml
index dbbb124..975aa07 100644
--- a/test/w3c/ecma/test396.scxml
+++ b/test/w3c/ecma/test396.scxml
@@ -1,16 +1,21 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test399.scxml b/test/w3c/ecma/test399.scxml
index e5a951e..a29358e 100644
--- a/test/w3c/ecma/test399.scxml
+++ b/test/w3c/ecma/test399.scxml
@@ -1,66 +1,65 @@
-<?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"/>
+<?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"/>
+ <!-- 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>
-
- <state id="s03">
- <onentry>
- <raise event="foo.zoo"/>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
</onentry>
- <!-- test that a prefix descriptor matches -->
- <transition event="foo bar" target="s04"/>
- </state>
-
-<state id="s04">
- <onentry>
- <raise event="foos"/>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
</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
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test401.scxml b/test/w3c/ecma/test401.scxml
index d5f0545..5d4aec6 100644
--- a/test/w3c/ecma/test401.scxml
+++ b/test/w3c/ecma/test401.scxml
@@ -1,21 +1,25 @@
-<?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
+<?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="foo.bar.baz " expr="2"/>
+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="foo.bar.baz " 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
+ <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>
diff --git a/test/w3c/ecma/test402.scxml b/test/w3c/ecma/test402.scxml
index 969256e..95a5ebf 100644
--- a/test/w3c/ecma/test402.scxml
+++ b/test/w3c/ecma/test402.scxml
@@ -1,40 +1,42 @@
-<?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"/>
+<?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="foo.bar.baz " 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"/>
+ <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="foo.bar.baz " 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>
-
-<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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test403a.scxml b/test/w3c/ecma/test403a.scxml
index 89a4ad9..901ce49 100644
--- a/test/w3c/ecma/test403a.scxml
+++ b/test/w3c/ecma/test403a.scxml
@@ -1,43 +1,46 @@
-<?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
+<?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"/>
+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 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"/>
+ <raise event="event2"/>
+ </onentry>
+ <transition event="event1" target="fail"/>
+ <transition event="event2" cond="false" target="fail"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test403b.scxml b/test/w3c/ecma/test403b.scxml
index 18acfb5..d781517 100644
--- a/test/w3c/ecma/test403b.scxml
+++ b/test/w3c/ecma/test403b.scxml
@@ -1,40 +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">
+<?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
+ <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>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test403c.scxml b/test/w3c/ecma/test403c.scxml
index 9e7fd12..8bb126d 100644
--- a/test/w3c/ecma/test403c.scxml
+++ b/test/w3c/ecma/test403c.scxml
@@ -1,54 +1,53 @@
-<?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">
+<?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"/>
+ <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
+ <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"/>
+ <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>
-
-<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
+ <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>
diff --git a/test/w3c/ecma/test404.scxml b/test/w3c/ecma/test404.scxml
index ad6bb24..19db251 100644
--- a/test/w3c/ecma/test404.scxml
+++ b/test/w3c/ecma/test404.scxml
@@ -1,60 +1,56 @@
-<?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
+<?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>
+ 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>
- </parallel>
-
- <state id="s02">
- <transition event="event1" target="s03"/>
- <transition event="*" target="fail"/>
+ <state id="s03">
+ <transition event="event2" target="s04"/>
+ <transition event="*" target="fail"/>
</state>
-
- <state id="s03">
- <transition event="event2" target="s04"/>
- <transition event="*" target="fail"/>
+ <state id="s04">
+ <transition event="event3" target="s05"/>
+ <transition event="*" target="fail"/>
</state>
-
- <state id="s04">
- <transition event="event3" target="s05"/>
- <transition event="*" target="fail"/>
+ <state id="s05">
+ <transition event="event4" target="pass"/>
+ <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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test405.scxml b/test/w3c/ecma/test405.scxml
index 114cf22..85e6231 100644
--- a/test/w3c/ecma/test405.scxml
+++ b/test/w3c/ecma/test405.scxml
@@ -1,67 +1,66 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the executable content in the transitions is executed in document order after
+<?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 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 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 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
+ </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>
diff --git a/test/w3c/ecma/test406.scxml b/test/w3c/ecma/test406.scxml
index a8f8f99..33dd708 100644
--- a/test/w3c/ecma/test406.scxml
+++ b/test/w3c/ecma/test406.scxml
@@ -1,64 +1,60 @@
-<?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)
+<?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"/>
+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>
- </parallel>
-
-
- <state id="s03">
- <transition event="event2" target="s04"/>
- <transition event="*" target="fail"/>
+ <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 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 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
+ </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>
diff --git a/test/w3c/ecma/test407.scxml b/test/w3c/ecma/test407.scxml
index 0407c99..41a722d 100644
--- a/test/w3c/ecma/test407.scxml
+++ b/test/w3c/ecma/test407.scxml
@@ -1,20 +1,27 @@
-<?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"/>
+<?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
+ <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>
diff --git a/test/w3c/ecma/test409.scxml b/test/w3c/ecma/test409.scxml
index 0fa71a2..5cb5865 100644
--- a/test/w3c/ecma/test409.scxml
+++ b/test/w3c/ecma/test409.scxml
@@ -1,32 +1,36 @@
-<?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
+<?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" delayexpr="'50ms'"/>
+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" delayexpr="'50ms'"/>
</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"/>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test411.scxml b/test/w3c/ecma/test411.scxml
index 8e1c673..047dff0 100644
--- a/test/w3c/ecma/test411.scxml
+++ b/test/w3c/ecma/test411.scxml
@@ -1,32 +1,36 @@
-<?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
+<?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"/>
+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">
+ <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>
- <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
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test412.scxml b/test/w3c/ecma/test412.scxml
index 4a8b26a..cd6da7e 100644
--- a/test/w3c/ecma/test412.scxml
+++ b/test/w3c/ecma/test412.scxml
@@ -1,52 +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">
+<?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>
- <raise event="event1"/>
- </onentry>
- <initial>
- <transition target="s011">
- <raise event="event2"/>
- </transition>
+ <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 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>
-
-</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
+ <!-- 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>
diff --git a/test/w3c/ecma/test413.scxml b/test/w3c/ecma/test413.scxml
index 94e32a2..057b2c5 100644
--- a/test/w3c/ecma/test413.scxml
+++ b/test/w3c/ecma/test413.scxml
@@ -1,45 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the state machine is put into the configuration specified by the initial element, without regard
+<?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
+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 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>
-
- </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>
+ </parallel>
</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
+ <!-- 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>
diff --git a/test/w3c/ecma/test415.scxml b/test/w3c/ecma/test415.scxml
index 159218b..6faed20 100644
--- a/test/w3c/ecma/test415.scxml
+++ b/test/w3c/ecma/test415.scxml
@@ -1,12 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- Test that the state machine halts when it enters a top-level final state. Since
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Test that the state machine halts when it enters a top-level final state. Since
the initial state is a final state, this machine should halt immediately without
processing "event1" which is raised in the final state's on-entry handler. This
is a manual test since there is no platform-independent way to test that event1
- is not processed --><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">
+ is not processed -->
+<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">
<onentry>
<raise event="event1"/>
- </onentry>
- </final>
-
-</scxml> \ No newline at end of file
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test416.scxml b/test/w3c/ecma/test416.scxml
index 45799e4..e260d9f 100644
--- a/test/w3c/ecma/test416.scxml
+++ b/test/w3c/ecma/test416.scxml
@@ -1,22 +1,27 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test417.scxml b/test/w3c/ecma/test417.scxml
index 5ca6144..d43be89 100644
--- a/test/w3c/ecma/test417.scxml
+++ b/test/w3c/ecma/test417.scxml
@@ -1,34 +1,36 @@
-<?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">
+<?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"/>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test419.scxml b/test/w3c/ecma/test419.scxml
index c4de17e..b782637 100644
--- a/test/w3c/ecma/test419.scxml
+++ b/test/w3c/ecma/test419.scxml
@@ -1,17 +1,22 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test421.scxml b/test/w3c/ecma/test421.scxml
index 1747334..0174c89 100644
--- a/test/w3c/ecma/test421.scxml
+++ b/test/w3c/ecma/test421.scxml
@@ -1,28 +1,31 @@
-<?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>
+<?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"/>
+ <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>
-
-
-<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
+ <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>
diff --git a/test/w3c/ecma/test422.scxml b/test/w3c/ecma/test422.scxml
index 637ff77..91ba18d 100644
--- a/test/w3c/ecma/test422.scxml
+++ b/test/w3c/ecma/test422.scxml
@@ -1,75 +1,81 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- Test that at the end of a macrostep, the processor executes all invokes in states
+<?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" delayexpr="'100ms'"/>
- </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>
+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" delayexpr="'100ms'"/>
+ </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 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. -->
+ </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>
+ <onentry>
<send target="#_parent" event="invokeS11"/>
- </onentry>
- <transition target="subFinal1"/>
- </state>
- <final id="subFinal1"/>
- </scxml>
- </content>
+ </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. -->
+ <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>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test423.scxml b/test/w3c/ecma/test423.scxml
index ab6c84f..3fc15d3 100644
--- a/test/w3c/ecma/test423.scxml
+++ b/test/w3c/ecma/test423.scxml
@@ -1,25 +1,29 @@
-<?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" delayexpr="'50ms'"/>
- <raise event="internalEvent"/>
+<?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" delayexpr="'50ms'"/>
+ <raise event="internalEvent"/>
</onentry>
<!-- in this state we should process only internalEvent -->
- <transition event="internalEvent" target="s1"/>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test436.scxml b/test/w3c/ecma/test436.scxml
index d8b2ca2..072370e 100644
--- a/test/w3c/ecma/test436.scxml
+++ b/test/w3c/ecma/test436.scxml
@@ -1,21 +1,23 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test444.scxml b/test/w3c/ecma/test444.scxml
index c689674..799fad2 100644
--- a/test/w3c/ecma/test444.scxml
+++ b/test/w3c/ecma/test444.scxml
@@ -1,16 +1,22 @@
-<?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">
+<?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
+ </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>
diff --git a/test/w3c/ecma/test445.scxml b/test/w3c/ecma/test445.scxml
index f1ae24b..ba56f15 100644
--- a/test/w3c/ecma/test445.scxml
+++ b/test/w3c/ecma/test445.scxml
@@ -1,16 +1,21 @@
-<?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">
+<?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
+ </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>
diff --git a/test/w3c/ecma/test446.scxml b/test/w3c/ecma/test446.scxml
index 64ab3c9..46dcc6d 100644
--- a/test/w3c/ecma/test446.scxml
+++ b/test/w3c/ecma/test446.scxml
@@ -1,21 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that if the child of <data> is JSON, the processor
- assigns it as the value of the var --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
- <datamodel>
- <data id="var1">[1, 2, 3]</data>
- <data id="var2" src="file:test446.txt"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- in the ECMA data model, test that if the child of <data> is JSON, the processor
+ assigns it as the value of the var -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="var1">[1, 2, 3]</data>
+ <data id="var2" src="file:test446.txt"/>
</datamodel>
-
-<state id="s0">
- <transition cond="var1 instanceof Array" target="s1"/>
- <transition target="fail"/>
+ <state id="s0">
+ <transition cond="var1 instanceof Array" target="s1"/>
+ <transition target="fail"/>
</state>
-
-<state id="s1">
- <transition cond="var2 instanceof Array" target="pass"/>
- <transition target="fail"/>
- </state>
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <state id="s1">
+ <transition cond="var2 instanceof Array" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test448.scxml b/test/w3c/ecma/test448.scxml
index adbc121..050e4cd 100644
--- a/test/w3c/ecma/test448.scxml
+++ b/test/w3c/ecma/test448.scxml
@@ -1,31 +1,38 @@
-<?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>
+<?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
+ </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>
diff --git a/test/w3c/ecma/test449.scxml b/test/w3c/ecma/test449.scxml
index d06cc9a..60bb1d5 100644
--- a/test/w3c/ecma/test449.scxml
+++ b/test/w3c/ecma/test449.scxml
@@ -1,11 +1,18 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test451.scxml b/test/w3c/ecma/test451.scxml
index e939ded..880d746 100644
--- a/test/w3c/ecma/test451.scxml
+++ b/test/w3c/ecma/test451.scxml
@@ -1,18 +1,21 @@
-<?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
+<?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>
diff --git a/test/w3c/ecma/test452.scxml b/test/w3c/ecma/test452.scxml
index 4f38ca7..51a285a 100644
--- a/test/w3c/ecma/test452.scxml
+++ b/test/w3c/ecma/test452.scxml
@@ -1,24 +1,33 @@
-<?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>
+<?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
+ </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>
diff --git a/test/w3c/ecma/test453.scxml b/test/w3c/ecma/test453.scxml
index 33b904d..81be4a8 100644
--- a/test/w3c/ecma/test453.scxml
+++ b/test/w3c/ecma/test453.scxml
@@ -1,19 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that we can use any ecmascript expression as a value expression.
+<?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
+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>
diff --git a/test/w3c/ecma/test456.scxml b/test/w3c/ecma/test456.scxml
index 2865fb2..d08d626 100644
--- a/test/w3c/ecma/test456.scxml
+++ b/test/w3c/ecma/test456.scxml
@@ -1,19 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we can't test that _any_ ecmascript is valid inside <script>, so we
-just run a simple one and check that it can update the data model. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
-<datamodel>
- <data id="Var1" expr="0"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we can't test that _any_ ecmascript is valid inside <script>, so we
+just run a simple one and check that it can update the data model. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
</datamodel>
-
- <state id="s0">
- <onentry>
- <script>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test457.scxml b/test/w3c/ecma/test457.scxml
index 86cf156..40ea9fd 100644
--- a/test/w3c/ecma/test457.scxml
+++ b/test/w3c/ecma/test457.scxml
@@ -1,59 +1,61 @@
-<?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"/>
+<?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
+ <state id="s0">
+ <onentry>
+ <!-- invalid array, legal item -->
+ <foreach item="Var2" index="Var3" array="Var4">
+ <assign location="Var1" expr="Var1 + 1"/>
+ </foreach>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s1">
+ <onentry>
+ <!-- illegal item, legal array -->
+ <foreach item="'continue'" index="Var3" array="Var5">
+ <assign location="Var1" expr="Var1 + 1"/>
+ </foreach>
+ <raise event="bar"/>
+ </onentry>
+ <transition event="error.execution" target="s2"/>
+ <transition event="bar" target="fail"/>
+ </state>
+ <state id="s2">
+ <!-- check that var1 has its original value (so executable content never got executed -->
+ <transition cond="Var1==0" target="s3"/>
+ <transition target="fail"/>
+ </state>
+ <!-- finally check that a legal array works properly -->
+ <state id="s3">
+ <onentry>
+ <assign location="Var6" expr="0"/>
+ <foreach item="Var2" array="Var5">
+ <assign location="Var6" expr="Var6 + Var2"/>
+ </foreach>
+ </onentry>
+ <transition cond="Var6==6" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test459.scxml b/test/w3c/ecma/test459.scxml
index b631c25..9037a93 100644
--- a/test/w3c/ecma/test459.scxml
+++ b/test/w3c/ecma/test459.scxml
@@ -1,35 +1,43 @@
-<?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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that foreach goes over the array in the right order. since the array contains 1 2 3, we compare the current
value with the previous value, which is stored in var1. The current value should always be larger. If
it ever isn't, set Var4 to 0, indicating failure. Also check that the final value of the index
-is 2 (meaning that the initial value was 0, not 1) --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
-<datamodel>
- <data id="Var1" expr="0"/> <!-- contains the previous value -->
- <data id="Var2"/> <!-- the item which will contain the current value -->
- <data id="Var3"/> <!-- the index -->
- <data id="Var4" expr="[1,2,3]"/>
- <data id="Var5" expr="1"/> <!-- 1 if success, 0 if failure -->
+is 2 (meaning that the initial value was 0, not 1) -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ <!-- contains the previous value -->
+ <data id="Var2"/>
+ <!-- the item which will contain the current value -->
+ <data id="Var3"/>
+ <!-- the index -->
+ <data id="Var4" expr="[1,2,3]"/>
+ <data id="Var5" expr="1"/>
+ <!-- 1 if success, 0 if failure -->
</datamodel>
-
- <state id="s0">
- <onentry>
- <foreach item="Var2" array="Var4" index="Var3">
- <if cond="Var1&lt;Var2">
- <assign location="Var1" expr="Var2"/>
- <else/>
- <!-- values are out of order, record failure -->
- <assign location="Var5" expr="0"/>
- </if>
- </foreach>
- </onentry>
-
- <!-- check that var1 has its original value -->
- <transition cond="Var4==0 | Var3 != 2" target="fail"/>
- <transition target="pass"/>
- </state>
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-
-
-</scxml> \ No newline at end of file
+ <state id="s0">
+ <onentry>
+ <foreach item="Var2" array="Var4" index="Var3">
+ <if cond="Var1&lt;Var2">
+ <assign location="Var1" expr="Var2"/>
+ <else/>
+ <!-- values are out of order, record failure -->
+ <assign location="Var5" expr="0"/>
+ </if>
+ </foreach>
+ </onentry>
+ <!-- check that var1 has its original value -->
+ <transition cond="Var4==0 | Var3 != 2" target="fail"/>
+ <transition target="pass"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test460.scxml b/test/w3c/ecma/test460.scxml
index 8ba3e5e..3e05b0e 100644
--- a/test/w3c/ecma/test460.scxml
+++ b/test/w3c/ecma/test460.scxml
@@ -1,24 +1,30 @@
-<?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">
+<?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
+ <data id="Var2" expr="0"/>
+ <!-- counts the number of iterations -->
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <foreach item="Var3" array="Var1">
+ <assign location="Var1" expr="[].concat(Var1, [4])"/>
+ <assign location="Var2" expr="Var2 + 1"/>
+ </foreach>
+ </onentry>
+ <transition cond="Var2==3" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test487.scxml b/test/w3c/ecma/test487.scxml
index 5baacbe..017df8e 100644
--- a/test/w3c/ecma/test487.scxml
+++ b/test/w3c/ecma/test487.scxml
@@ -1,18 +1,25 @@
-<?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"/>
+<?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"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <assign location="Var1" expr="return"/>
- <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
+ <state id="s0">
+ <onentry>
+ <assign location="Var1" expr="return"/>
+ <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>
diff --git a/test/w3c/ecma/test488.scxml b/test/w3c/ecma/test488.scxml
index 9d9e1d8..f321736 100644
--- a/test/w3c/ecma/test488.scxml
+++ b/test/w3c/ecma/test488.scxml
@@ -1,34 +1,35 @@
-<?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">
+<?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"/>
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param expr="return" name="someParam"/>
</donedata>
- </final>
+ </final>
</state>
-
-
- <!-- if we get here, we received the error event. Now check that the done
+ <!-- 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="typeof _event.data === 'undefined'" 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
+ <state id="s1">
+ <transition event="done.state.s0" cond="typeof _event.data === 'undefined'" 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>
diff --git a/test/w3c/ecma/test495.scxml b/test/w3c/ecma/test495.scxml
index e3a8e58..1e31173 100644
--- a/test/w3c/ecma/test495.scxml
+++ b/test/w3c/ecma/test495.scxml
@@ -1,23 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the scxml event i/o processor puts events in the correct queues.--><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">
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that the scxml event i/o processor puts events in the correct queues.-->
+<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>
- <!-- default target is external queue -->
- <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
- <send event="event2" target="#_internal" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
- </onentry>
- <!-- we should get the internal event first -->
- <transition event="event1" target="fail"/>
- <transition event="event2" target="s1"/>
- </state>
-
-<state id="s1">
- <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
+ <!-- default target is external queue -->
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ <send event="event2" target="#_internal" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ </onentry>
+ <!-- we should get the internal event first -->
+ <transition event="event1" target="fail"/>
+ <transition event="event2" target="s1"/>
+ </state>
+ <state id="s1">
+ <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>
diff --git a/test/w3c/ecma/test496.scxml b/test/w3c/ecma/test496.scxml
index 28c79a5..fc6e4ec 100644
--- a/test/w3c/ecma/test496.scxml
+++ b/test/w3c/ecma/test496.scxml
@@ -1,18 +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">
-
-
-<state id="s0">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event" target="#_scxml_foo"/>
- <raise event="foo"/>
- </onentry>
- <transition event="error.communication" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
-
-
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+<?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">
+ <state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event" target="#_scxml_foo"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.communication" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test500.scxml b/test/w3c/ecma/test500.scxml
index 26beec6..b7a2579 100644
--- a/test/w3c/ecma/test500.scxml
+++ b/test/w3c/ecma/test500.scxml
@@ -1,15 +1,21 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that location field is found inside entry for 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" version="1.0" datamodel="ecmascript">
-<datamodel>
- <data id="Var1" expr="_ioprocessors['http://www.w3.org/TR/scxml/#SCXMLEventProcessor'].location"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that location field is found inside entry for 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" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="_ioprocessors['http://www.w3.org/TR/scxml/#SCXMLEventProcessor'].location"/>
</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
+ <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>
diff --git a/test/w3c/ecma/test501.scxml b/test/w3c/ecma/test501.scxml
index 6cca0f5..c90aa5b 100644
--- a/test/w3c/ecma/test501.scxml
+++ b/test/w3c/ecma/test501.scxml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the location entry for the SCXML Event I/O processor can be used as the target for 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">
-<datamodel>
- <data id="Var1" expr="_ioprocessors['http://www.w3.org/TR/scxml/#SCXMLEventProcessor'].location"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that the location entry for the SCXML Event I/O processor can be used as the target for 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">
+ <datamodel>
+ <data id="Var1" expr="_ioprocessors['http://www.w3.org/TR/scxml/#SCXMLEventProcessor'].location"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send targetexpr="Var1" event="foo"/>
- <send event="timeout" delay="2s"/>
+ <state id="s0">
+ <onentry>
+ <send targetexpr="Var1" event="foo"/>
+ <send event="timeout" delay="2s"/>
</onentry>
- <transition event="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
+ <transition event="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>
diff --git a/test/w3c/ecma/test503.scxml b/test/w3c/ecma/test503.scxml
index 6e1ab2b..94a70c5 100644
--- a/test/w3c/ecma/test503.scxml
+++ b/test/w3c/ecma/test503.scxml
@@ -1,37 +1,43 @@
-<?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 -->
+<?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"/>
+ <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"/>
+ <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 -->
+ <!-- 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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test504.scxml b/test/w3c/ecma/test504.scxml
index 6e2679b..2d1897e 100644
--- a/test/w3c/ecma/test504.scxml
+++ b/test/w3c/ecma/test504.scxml
@@ -1,75 +1,79 @@
-<?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 -->
+<?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"/>
+ <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>
+ <transition target="p"/>
</state>
- <state id="ps2">
- <onexit>
- <assign location="Var3" expr="Var3 + 1"/>
- </onexit>
+ <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>
-</parallel>
-</state>
-
-<state id="s3">
- <!-- make sure that p was exited twice -->
+ <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 -->
+ </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 -->
+ </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
+ </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>
diff --git a/test/w3c/ecma/test505.scxml b/test/w3c/ecma/test505.scxml
index 01d326b..4c59e70 100644
--- a/test/w3c/ecma/test505.scxml
+++ b/test/w3c/ecma/test505.scxml
@@ -1,47 +1,52 @@
-<?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 -->
+<?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"/>
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
</onentry>
- <onexit>
- <assign location="Var1" expr="Var1 + 1"/>
+ <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>
+ <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>
-
-<state id="s2">
- <!-- make sure that s1 was exited once -->
+ <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 -->
+ </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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test506.scxml b/test/w3c/ecma/test506.scxml
index 1a7a1da..155dffd 100644
--- a/test/w3c/ecma/test506.scxml
+++ b/test/w3c/ecma/test506.scxml
@@ -1,53 +1,56 @@
-<?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 -->
+<?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"/>
+ <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"/>
+ <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>
+ <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>
-
-<state id="s3">
- <!-- make sure that s2 was exited twice -->
+ <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 -->
+ </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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test509.scxml b/test/w3c/ecma/test509.scxml
index de55b5d..5b6cbc4 100644
--- a/test/w3c/ecma/test509.scxml
+++ b/test/w3c/ecma/test509.scxml
@@ -1,17 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that Basic HTTP Event I/O processor uses POST method and that it can receive messages
-at the accessURI --><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 event="timeout" delay="30s"/>
- <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- </onentry>
- <!-- if the event was send by http and we get it, we succeed -->
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that Basic HTTP Event I/O processor uses POST method and that it can receive messages
+at the accessURI -->
+<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 event="timeout" delay="30s"/>
+ <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ </onentry>
+ <!-- if the event was send by http and we get it, we succeed -->
<transition event="test" cond="_event.raw.search('POST') !== -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
+ <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>
diff --git a/test/w3c/ecma/test510.scxml b/test/w3c/ecma/test510.scxml
index 45d3057..6f6660a 100644
--- a/test/w3c/ecma/test510.scxml
+++ b/test/w3c/ecma/test510.scxml
@@ -1,24 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that Basic HTTP messages go into external queue. --><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 event="timeout" delay="30s"/>
- <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- <!-- this creates an internal event -->
- <raise event="internal"/>
-
- </onentry>
- <!-- we should get 'internal' first, then 'test' -->
- <transition event="internal" target="s1"/>
- <transition event="*" target="fail"/>
- </state>
-
- <state id="s1">
- <transition event="test" 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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that Basic HTTP messages go into external queue. -->
+<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 event="timeout" delay="30s"/>
+ <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ <!-- this creates an internal event -->
+ <raise event="internal"/>
+ </onentry>
+ <!-- we should get 'internal' first, then 'test' -->
+ <transition event="internal" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s1">
+ <transition event="test" 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>
diff --git a/test/w3c/ecma/test518.scxml b/test/w3c/ecma/test518.scxml
index 69f171c..355cdb3 100644
--- a/test/w3c/ecma/test518.scxml
+++ b/test/w3c/ecma/test518.scxml
@@ -1,20 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that namelist values get encoded as POST parameters. --><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="2"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that namelist values get encoded as POST parameters. -->
+<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="2"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="30s"/>
- <send event="test" targetexpr="_ioprocessors['basichttp']['location']" namelist="Var1" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- </onentry>
-
- <transition event="test" cond="_event.raw.search(/Var1=2/) !== -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
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" targetexpr="_ioprocessors['basichttp']['location']" namelist="Var1" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ </onentry>
+ <transition event="test" cond="_event.raw.search(/Var1=2/) !== -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>
diff --git a/test/w3c/ecma/test519.scxml b/test/w3c/ecma/test519.scxml
index 0f937b1..e0586ab 100644
--- a/test/w3c/ecma/test519.scxml
+++ b/test/w3c/ecma/test519.scxml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that <param> values get encoded as POST parameters. . --><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 event="timeout" delay="30s"/>
- <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <param name="param1" expr="1"/>
- </send>
- </onentry>
-
- <!-- if other end sends us back this event, we succeed -->
- <transition event="test" cond="_event.raw.search('param1=1') !== -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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that <param> values get encoded as POST parameters. . -->
+<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 event="timeout" delay="30s"/>
+ <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <param name="param1" expr="1"/>
+ </send>
+ </onentry>
+ <!-- if other end sends us back this event, we succeed -->
+ <transition event="test" cond="_event.raw.search('param1=1') !== -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>
diff --git a/test/w3c/ecma/test520.scxml b/test/w3c/ecma/test520.scxml
index cfef477..3db1d22 100644
--- a/test/w3c/ecma/test520.scxml
+++ b/test/w3c/ecma/test520.scxml
@@ -1,21 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that <content> gets sent as the body of the message. --><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 event="timeout" delay="30s"/>
- <send targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <content>this is some content</content>
- </send>
- </onentry>
-
- <!-- if other end sends us back this event, we succeed. Test for two common
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that <content> gets sent as the body of the message. -->
+<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 event="timeout" delay="30s"/>
+ <send targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <content>this is some content</content>
+ </send>
+ </onentry>
+ <!-- if other end sends us back this event, we succeed. Test for two common
ways of encoding -->
- <transition event="HTTP.POST" cond="_event.raw.search(/this+is+some+content/) !== -1" target="pass"/>
- <transition event="HTTP.POST" cond="_event.raw.search(/this%20is%20some%20content/) !== -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
+ <transition event="HTTP.POST" cond="_event.raw.search(/this+is+some+content/) !== -1" target="pass"/>
+ <transition event="HTTP.POST" cond="_event.raw.search(/this%20is%20some%20content/) !== -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>
diff --git a/test/w3c/ecma/test521.scxml b/test/w3c/ecma/test521.scxml
index e4b00d8..699a9f1 100644
--- a/test/w3c/ecma/test521.scxml
+++ b/test/w3c/ecma/test521.scxml
@@ -1,23 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that the processor raises error.communication if it cannot dispatch the event.
+<?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"/>
+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
+ <!-- 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>
diff --git a/test/w3c/ecma/test522.scxml b/test/w3c/ecma/test522.scxml
index 3f16dac..ae6ff4b 100644
--- a/test/w3c/ecma/test522.scxml
+++ b/test/w3c/ecma/test522.scxml
@@ -1,22 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that location field the entry for Basic HTTP Event I/O processor can be used
-to send a message to the 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 event="timeout" delay="30s"/>
- <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" targetexpr="_ioprocessors['basichttp']['location']"/>
-
- </onentry>
- <!-- the event we receive should be called 'test', but that's not actually
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that location field the entry for Basic HTTP Event I/O processor can be used
+to send a message to the 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 event="timeout" delay="30s"/>
+ <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" targetexpr="_ioprocessors['basichttp']['location']"/>
+ </onentry>
+ <!-- the event we receive should be called 'test', but that's not actually
required for this test. Only that the send deliver some event to us. So if
we get something other than timeout or error, we call it success -->
- <transition event="timeout" target="fail"/>
- <transition event="error" 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
+ <transition event="timeout" target="fail"/>
+ <transition event="error" 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>
diff --git a/test/w3c/ecma/test525.scxml b/test/w3c/ecma/test525.scxml
index 432e760..10249a1 100644
--- a/test/w3c/ecma/test525.scxml
+++ b/test/w3c/ecma/test525.scxml
@@ -1,26 +1,32 @@
-<?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">
+<?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
+ <data id="Var2" expr="0"/>
+ <!-- counts the number of iterations -->
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <foreach item="Var3" array="Var1">
+ <assign location="Var1" expr="[].concat(Var1, [4])"/>
+ <assign location="Var2" expr="Var2 + 1"/>
+ </foreach>
+ </onentry>
+ <transition cond="Var2==3" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test527.scxml b/test/w3c/ecma/test527.scxml
index 623495a..245a8b9 100644
--- a/test/w3c/ecma/test527.scxml
+++ b/test/w3c/ecma/test527.scxml
@@ -1,25 +1,28 @@
-<?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">
+<?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 event="done.state.s0" target="fail">
</transition>
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <content expr="'foo'"/>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test528.scxml b/test/w3c/ecma/test528.scxml
index 891215f..ee7303a 100644
--- a/test/w3c/ecma/test528.scxml
+++ b/test/w3c/ecma/test528.scxml
@@ -1,32 +1,33 @@
-<?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"/>
-
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <content expr="return"/>
+<?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"/>
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <content expr="return"/>
</donedata>
- </final>
+ </final>
</state>
-
-
- <!-- if we get here, we received the error event. Now check that the done
+ <!-- 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="typeof _event.data === 'undefined'" 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
+ <state id="s1">
+ <transition event="done.state.s0" cond="typeof _event.data === 'undefined'" 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>
diff --git a/test/w3c/ecma/test529.scxml b/test/w3c/ecma/test529.scxml
index 0ef20c4..ee02755 100644
--- a/test/w3c/ecma/test529.scxml
+++ b/test/w3c/ecma/test529.scxml
@@ -1,25 +1,28 @@
-<?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">
+<?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 event="done.state.s0" target="fail">
</transition>
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <content>21</content>
+ <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
+ </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>
diff --git a/test/w3c/ecma/test530.scxml b/test/w3c/ecma/test530.scxml
index 9361181..edbdbee 100644
--- a/test/w3c/ecma/test530.scxml
+++ b/test/w3c/ecma/test530.scxml
@@ -1,26 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that <content> child is evaluated when <invoke> is. Var1 is initialized
+<?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">
+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
+ </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>
diff --git a/test/w3c/ecma/test531.scxml b/test/w3c/ecma/test531.scxml
index 2110135..664d0d6 100644
--- a/test/w3c/ecma/test531.scxml
+++ b/test/w3c/ecma/test531.scxml
@@ -1,20 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that the value of the <param> _scxmleventname gets used as the name
-of the raised event. --><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 event="timeout" delay="3s"/>
- <send targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <param name="_scxmleventname" expr="'test'"/>
- </send>
- </onentry>
-
- <!-- if we get an event named 'test' we succeed. Otherwise fail -->
- <transition event="test" 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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that the value of the <param> _scxmleventname gets used as the name
+of the raised event. -->
+<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 event="timeout" delay="3s"/>
+ <send targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <param name="_scxmleventname" expr="'test'"/>
+ </send>
+ </onentry>
+ <!-- if we get an event named 'test' we succeed. Otherwise fail -->
+ <transition event="test" 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>
diff --git a/test/w3c/ecma/test532.scxml b/test/w3c/ecma/test532.scxml
index 412310c..419203f 100644
--- a/test/w3c/ecma/test532.scxml
+++ b/test/w3c/ecma/test532.scxml
@@ -1,20 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that if _scxmleventname is not present, the name of the HTTP method is used
-as the name of the resulting event. --><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 event="timeout" delay="3s"/>
- <send targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <!-- this content will be ignored, but it's here to make sure we have a message body -->
- <content>some content</content>
- </send>
- </onentry>
-
- <transition event="HTTP.POST" 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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that if _scxmleventname is not present, the name of the HTTP method is used
+as the name of the resulting event. -->
+<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 event="timeout" delay="3s"/>
+ <send targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <!-- this content will be ignored, but it's here to make sure we have a message body -->
+ <content>some content</content>
+ </send>
+ </onentry>
+ <transition event="HTTP.POST" 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>
diff --git a/test/w3c/ecma/test533.scxml b/test/w3c/ecma/test533.scxml
index a4550e3..5bd776a 100644
--- a/test/w3c/ecma/test533.scxml
+++ b/test/w3c/ecma/test533.scxml
@@ -1,62 +1,67 @@
-<?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 -->
+<?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"/>
+ <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>
+ <transition target="p"/>
</state>
-</parallel>
-
-<state id="s2">
- <!-- make sure that p was exited twice -->
+ <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 -->
+ </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 -->
+ </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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test534.scxml b/test/w3c/ecma/test534.scxml
index 57a54bf..60b3759 100644
--- a/test/w3c/ecma/test534.scxml
+++ b/test/w3c/ecma/test534.scxml
@@ -1,18 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that <send> 'event' value gets sent as the param _scxmleventname . --><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 event="timeout" delay="30s"/>
- <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- </send>
- </onentry>
-
- <!-- if other end sends us back this event, we succeed -->
- <transition event="test" cond="_event.raw.search('_scxmleventname=test') !== -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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that <send> 'event' value gets sent as the param _scxmleventname . -->
+<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 event="timeout" delay="30s"/>
+ <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ </send>
+ </onentry>
+ <!-- if other end sends us back this event, we succeed -->
+ <transition event="test" cond="_event.raw.search('_scxmleventname=test') !== -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>
diff --git a/test/w3c/ecma/test550.scxml b/test/w3c/ecma/test550.scxml
index 0ca4c1a..49548aa 100644
--- a/test/w3c/ecma/test550.scxml
+++ b/test/w3c/ecma/test550.scxml
@@ -1,20 +1,23 @@
-<?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"/>
+<?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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test551.scxml b/test/w3c/ecma/test551.scxml
index cd267eb..b495492 100644
--- a/test/w3c/ecma/test551.scxml
+++ b/test/w3c/ecma/test551.scxml
@@ -1,23 +1,25 @@
-<?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">
+<?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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test552.scxml b/test/w3c/ecma/test552.scxml
index 94267c6..a4a79e5 100644
--- a/test/w3c/ecma/test552.scxml
+++ b/test/w3c/ecma/test552.scxml
@@ -1,18 +1,22 @@
-<?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">
+<?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
+ </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>
diff --git a/test/w3c/ecma/test553.scxml b/test/w3c/ecma/test553.scxml
index 87062e4..8ccfd5a 100644
--- a/test/w3c/ecma/test553.scxml
+++ b/test/w3c/ecma/test553.scxml
@@ -1,23 +1,27 @@
-<?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" delayexpr="'50ms'"/>
- <!-- generate an invalid namelist -->
- <send event="event1" namelist="&#34;foo"/>
+<?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" delayexpr="'50ms'"/>
+ <!-- generate an invalid namelist -->
+ <send event="event1" namelist="&quot;foo"/>
</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
+ <!-- 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>
diff --git a/test/w3c/ecma/test554.scxml b/test/w3c/ecma/test554.scxml
index b2fa50e..7ef3597 100644
--- a/test/w3c/ecma/test554.scxml
+++ b/test/w3c/ecma/test554.scxml
@@ -1,25 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that if the evaluation of <invoke>'s args causes an error, the
+<?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" delayexpr="'50ms'"/>
+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" delayexpr="'50ms'"/>
</onentry>
-
- <!-- reference an invalid namelist -->
- <invoke type="http://www.w3.org/TR/scxml/" namelist="&#34;foo">
+ <!-- reference an invalid namelist -->
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="&quot;foo">
<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
+ <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>
diff --git a/test/w3c/ecma/test557.scxml b/test/w3c/ecma/test557.scxml
index 6f4eed1..2774d9b 100644
--- a/test/w3c/ecma/test557.scxml
+++ b/test/w3c/ecma/test557.scxml
@@ -1,26 +1,32 @@
-<?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"/>
+<?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 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
+ <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>
diff --git a/test/w3c/ecma/test558.scxml b/test/w3c/ecma/test558.scxml
index a075100..9b8d79c 100644
--- a/test/w3c/ecma/test558.scxml
+++ b/test/w3c/ecma/test558.scxml
@@ -1,24 +1,30 @@
-<?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">
+<?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"/>
+ <data id="var2" src="file:test558.txt"/>
</datamodel>
-
-<state id="s0">
- <transition cond="var1 == 'this is a string'" target="s1"/>
- <transition target="fail"/>
+ <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
+ <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>
diff --git a/test/w3c/ecma/test560.scxml b/test/w3c/ecma/test560.scxml
index d283b1a..1a58997 100644
--- a/test/w3c/ecma/test560.scxml
+++ b/test/w3c/ecma/test560.scxml
@@ -1,19 +1,24 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test561.scxml b/test/w3c/ecma/test561.scxml
index e94a813..e7a2729 100644
--- a/test/w3c/ecma/test561.scxml
+++ b/test/w3c/ecma/test561.scxml
@@ -1,24 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that processor creates an ECMAScript DOM object
- _event.data when receiving XML in an event --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
-
-
-<state id="s0">
- <onentry>
- <send event="foo">
- <content>
-<books xmlns="">
-<book title="title1"/>
-<book title="title2"/>
-</books>
-</content>
- </send>
- </onentry>
- <transition event="foo" cond="_event.data.getElementsByTagName('book')[1].getAttribute('title') == 'title2'" target="pass"/>
- <transition event="*" target="fail"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- in the ECMA data model, test that processor creates an ECMAScript DOM object
+ _event.data when receiving XML in an event -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+ <state id="s0">
+ <onentry>
+ <send event="foo">
+ <content>
+ <books xmlns="">
+ <book title="title1"/>
+ <book title="title2"/>
+ </books>
+ </content>
+ </send>
+ </onentry>
+ <transition event="foo" cond="_event.data.getElementsByTagName('book')[1].getAttribute('title') == 'title2'" target="pass"/>
+ <transition event="*" target="fail"/>
</state>
-
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test562.scxml b/test/w3c/ecma/test562.scxml
index f5997bb..408741f 100644
--- a/test/w3c/ecma/test562.scxml
+++ b/test/w3c/ecma/test562.scxml
@@ -1,22 +1,27 @@
-<?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>
+<?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"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test567.scxml b/test/w3c/ecma/test567.scxml
index 465105b..025634e 100644
--- a/test/w3c/ecma/test567.scxml
+++ b/test/w3c/ecma/test567.scxml
@@ -1,30 +1,37 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that any content in the message other than _scxmleventname is used to populate
-_event.data. --><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="2"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that any content in the message other than _scxmleventname is used to populate
+_event.data. -->
+<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="2"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
- <!-- in this case, 'test' will be placed in _scxmleventname. The <param> should
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ <!-- in this case, 'test' will be placed in _scxmleventname. The <param> should
be used to populate _event.data -->
- <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <param name="param1" expr="2"/>
- </send>
- </onentry>
-
- <!-- if we get this event, we succeed -->
- <transition event="test" target="s1">
- <assign location="Var1" expr="_event.data.param1"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
+ <send event="test" targetexpr="_ioprocessors['basichttp']['location']" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <param name="param1" expr="2"/>
+ </send>
+ </onentry>
+ <!-- if we get this event, we succeed -->
+ <transition event="test" target="s1">
+ <assign location="Var1" expr="_event.data.param1"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test569.scxml b/test/w3c/ecma/test569.scxml
index 832a0c0..3fb3829 100644
--- a/test/w3c/ecma/test569.scxml
+++ b/test/w3c/ecma/test569.scxml
@@ -1,15 +1,20 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that location field is found inside entry for SCXML Event I/O processor in the ECMAScript
+<?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
+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>
diff --git a/test/w3c/ecma/test570.scxml b/test/w3c/ecma/test570.scxml
index 2f5ccbe..a7aeddc 100644
--- a/test/w3c/ecma/test570.scxml
+++ b/test/w3c/ecma/test570.scxml
@@ -1,45 +1,48 @@
-<?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">
+<?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"/>
+ </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"/>
+ <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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test576.scxml b/test/w3c/ecma/test576.scxml
index 2bed2ca..f1b9a24 100644
--- a/test/w3c/ecma/test576.scxml
+++ b/test/w3c/ecma/test576.scxml
@@ -1,37 +1,43 @@
-<?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"/>
+<?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"/>
+ <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>
+ </state>
</parallel>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test577.scxml b/test/w3c/ecma/test577.scxml
index d115e88..46a4f25 100644
--- a/test/w3c/ecma/test577.scxml
+++ b/test/w3c/ecma/test577.scxml
@@ -1,21 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that <send> without target in basichttp event i/o processor
-causes error.communication to get added to internal queue . --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0">
-
-
-<state id="s0">
- <onentry>
- <!-- sent by scxml event i/o processor, added to external queue -->
- <send event="event1"/>
- <!-- should put error.communication on internal queue -->
- <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
-
- </onentry>
-
-
- <transition event="error.communication" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-</scxml> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that <send> without target in basichttp event i/o processor
+causes error.communication to get added to internal queue . -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0">
+ <state id="s0">
+ <onentry>
+ <!-- sent by scxml event i/o processor, added to external queue -->
+ <send event="event1"/>
+ <!-- should put error.communication on internal queue -->
+ <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ </onentry>
+ <transition event="error.communication" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test578.scxml b/test/w3c/ecma/test578.scxml
index 9a25195..2557437 100644
--- a/test/w3c/ecma/test578.scxml
+++ b/test/w3c/ecma/test578.scxml
@@ -1,19 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- in the ECMA data model, test that processor creates an ECMAScript object
- _event.data when receiving JSON in an event --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
-
-
-<state id="s0">
- <onentry>
- <send event="foo">
- <content>{ "productName" : "bar", "size" : 27 }</content>
- </send>
- </onentry>
- <transition event="foo" cond="_event.data.productName == 'bar'" target="pass"/>
- <transition event="*" target="fail"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- in the ECMA data model, test that processor creates an ECMAScript object
+ _event.data when receiving JSON in an event -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+ <state id="s0">
+ <onentry>
+ <send event="foo">
+ <content>{ "productName" : "bar", "size" : 27 }</content>
+ </send>
+ </onentry>
+ <transition event="foo" cond="_event.data.productName == 'bar'" target="pass"/>
+ <transition event="*" target="fail"/>
</state>
-
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test579.scxml b/test/w3c/ecma/test579.scxml
index c315f82..dbf7dc1 100644
--- a/test/w3c/ecma/test579.scxml
+++ b/test/w3c/ecma/test579.scxml
@@ -1,61 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that default history content is executed correctly. The Process MUST execute any executable content in the transition after the parent state's onentry handlers, and, in the case where the history pseudo-state is the target of an <initial> transition,
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that default history content is executed correctly. The Process MUST execute any executable content in the transition after the parent state's onentry handlers, and, in the case where the history pseudo-state is the target of an <initial> transition,
the executable content inside the <initial> transition. However the Processor MUST
execute this content only if there is no stored history. Once the history state's
-parent state has been visited and exited, the default history content must not be executed --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="ecmascript">
-
-
-<state id="s0">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
- <initial>
- <transition target="sh1">
- <raise event="event2"/>
- </transition>
- </initial>
- <onentry>
- <send delayexpr="'50ms'" event="timeout"/>
- <raise event="event1"/>
+parent state has been visited and exited, the default history content must not be executed -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="ecmascript">
+ <state id="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <initial>
+ <transition target="sh1">
+ <raise event="event2"/>
+ </transition>
+ </initial>
+ <onentry>
+ <send delayexpr="'50ms'" event="timeout"/>
+ <raise event="event1"/>
</onentry>
- <onexit>
- <assign location="Var1" expr="Var1 + 1"/>
- </onexit>
- <history id="sh1">
- <transition target="s01">
- <raise event="event3"/>
- </transition>
- </history>
-
- <state id="s01">
- <transition event="event1" target="s02"/>
- <transition event="*" target="fail"/>
- </state>
-
- <state id="s02">
- <transition event="event2" target="s03"/>
- <transition event="*" target="fail"/>
- </state>
- <state id="s03">
-
- <transition cond="Var1==0" event="event3" target="s0"/>
- <transition cond="Var1==1" event="event1" target="s2"/>
- <transition event="*" target="fail"/>
- </state>
-</state>
-
-<state id="s2">
- <transition event="event2" target="s3"/>
- <transition event="*" target="fail"/>
-
- </state>
-
-<state id="s3">
- <transition event="event3" target="fail"/>
- <transition event="timeout" target="pass"/>
- </state>
-
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ <history id="sh1">
+ <transition target="s01">
+ <raise event="event3"/>
+ </transition>
+ </history>
+ <state id="s01">
+ <transition event="event1" target="s02"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s02">
+ <transition event="event2" target="s03"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s03">
+ <transition cond="Var1==0" event="event3" target="s0"/>
+ <transition cond="Var1==1" event="event1" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+ </state>
+ <state id="s2">
+ <transition event="event2" target="s3"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s3">
+ <transition event="event3" target="fail"/>
+ <transition event="timeout" target="pass"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/ecma/test580.scxml b/test/w3c/ecma/test580.scxml
index 4c4d522..74020fd 100644
--- a/test/w3c/ecma/test580.scxml
+++ b/test/w3c/ecma/test580.scxml
@@ -1,48 +1,45 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that a history state never ends up part of the configuration --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="p1" datamodel="ecmascript">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
-<parallel id="p1">
- <onentry>
- <send delay="2s" event="timeout"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that a history state never ends up part of the configuration -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="p1" datamodel="ecmascript">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <parallel id="p1">
+ <onentry>
+ <send delay="2s" event="timeout"/>
</onentry>
-
-
- <state id="s0">
- <transition cond="In('sh1')" target="fail"/>
- <transition event="timeout" target="fail"/>
- </state>
-
-
-<state id="s1">
- <initial>
- <transition target="sh1"/>
- </initial>
-
-
- <history id="sh1">
- <transition target="s11"/>
- </history>
-
- <state id="s11">
- <transition cond="In('sh1')" target="fail"/>
- <transition target="s12"/>
- </state>
-
- <state id="s12"/>
- <transition cond="In('sh1')" target="fail"/>
- <transition cond="Var1==0" target="sh1"/>
- <transition cond="Var1==1" target="pass"/>
- <onexit>
- <assign location="Var1" expr="Var1 + 1"/>
- </onexit>
- </state>
-
-
- </parallel>
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <state id="s0">
+ <transition cond="In('sh1')" target="fail"/>
+ <transition event="timeout" target="fail"/>
+ </state>
+ <state id="s1">
+ <initial>
+ <transition target="sh1"/>
+ </initial>
+ <history id="sh1">
+ <transition target="s11"/>
+ </history>
+ <state id="s11">
+ <transition cond="In('sh1')" target="fail"/>
+ <transition target="s12"/>
+ </state>
+ <state id="s12"/>
+ <transition cond="In('sh1')" target="fail"/>
+ <transition cond="Var1==0" target="sh1"/>
+ <transition cond="Var1==1" target="pass"/>
+ <onexit>
+ <assign location="Var1" expr="Var1 + 1"/>
+ </onexit>
+ </state>
+ </parallel>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/lua/test176.scxml b/test/w3c/lua/test176.scxml
index 7e5f460..c82be88 100644
--- a/test/w3c/lua/test176.scxml
+++ b/test/w3c/lua/test176.scxml
@@ -19,11 +19,10 @@ aParam in event1 is 2 so that var2 gets set to 2, success, otherwise failure --
<transition event="*" target="fail"/>
</state>
<state id="s1">
- <onentry>
- <log label="asdfasdf" expr="testvar2" />
- <log label="123123" expr="_event.data.aParam" />
-
- </onentry>
+ <onentry>
+ <log label="asdfasdf" expr="testvar2"/>
+ <log label="123123" expr="_event.data.aParam"/>
+ </onentry>
<transition cond="testvar2 == 2" target="pass"/>
<transition target="fail"/>
</state>
diff --git a/test/w3c/txml/test252.txml b/test/w3c/txml/test252.txml
index 40c36cb..ba43543 100644
--- a/test/w3c/txml/test252.txml
+++ b/test/w3c/txml/test252.txml
@@ -9,7 +9,7 @@ timeout indicates success. -->
<state id="s0" initial="s01">
<onentry>
- <send event="timeout" delay="2s"/>
+ <send event="timeout" conf:delay="1"/>
</onentry>
<transition event="timeout" conf:targetpass=""/>
@@ -26,7 +26,7 @@ timeout indicates success. -->
<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"/>
+ <send event="timeout" conf:delay=".5"/>
</onentry>
<transition event="timeout" target="subFinal"/>
<onexit>
diff --git a/test/w3c/txml/test288.txml b/test/w3c/txml/test288.txml
new file mode 100644
index 0000000..8d6a53f
--- /dev/null
+++ b/test/w3c/txml/test288.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- a simple test that a legal value may be assigned to a valid data model location
+using child content -->
+
+<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:someInlineVal/></assign>
+ </onentry>
+
+ <transition conf:idSomeVal="1" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/xpath/test144.scxml b/test/w3c/xpath/test144.scxml
index 612f793..c4220d5 100644
--- a/test/w3c/xpath/test144.scxml
+++ b/test/w3c/xpath/test144.scxml
@@ -1,23 +1,27 @@
-<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <raise event="foo"/>
- <raise event="bar"/>
+<?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="xpath">
+ <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"/>
+ <transition event="foo" target="s1"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test147.scxml b/test/w3c/xpath/test147.scxml
index d07b56d..8b889fd 100644
--- a/test/w3c/xpath/test147.scxml
+++ b/test/w3c/xpath/test147.scxml
@@ -1,30 +1,35 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1" expr="0"/>
+<?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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <if cond="0&gt;1">
- <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"/>
+ <state id="s0">
+ <onentry>
+ <if cond="0&gt;1">
+ <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/text() =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
+ <transition event="bar" cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test148.scxml b/test/w3c/xpath/test148.scxml
index 805c223..f643b10 100644
--- a/test/w3c/xpath/test148.scxml
+++ b/test/w3c/xpath/test148.scxml
@@ -1,31 +1,36 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the else clause executes if <if> and <elseif> evaluate to false.
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="0"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <if cond="0&gt;1">
- <raise event="foo"/>
- <assign location="$Var1" expr="$Var1 + 1"/>
- <elseif cond="0&gt;1"/>
- <raise event="bar"/>
- <assign location="$Var1" expr="$Var1 + 1"/>
- <else/>
- <raise event="baz"/>
- <assign location="$Var1" expr="$Var1 + 1"/>
- </if>
- <raise event="bat"/>
+ <state id="s0">
+ <onentry>
+ <if cond="0&gt;1">
+ <raise event="foo"/>
+ <assign location="$Var1" expr="$Var1 + 1"/>
+ <elseif cond="0&gt;1"/>
+ <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/text() =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
+ <transition event="baz" cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test149.scxml b/test/w3c/xpath/test149.scxml
index 547fdc3..b87b162 100644
--- a/test/w3c/xpath/test149.scxml
+++ b/test/w3c/xpath/test149.scxml
@@ -1,25 +1,31 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1" expr="0"/>
+<?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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <if cond="0&gt;1">
- <raise event="foo"/>
- <assign location="$Var1" expr="$Var1 + 1"/>
- <elseif cond="0&gt;1"/>
- <raise event="bar"/>
- <assign location="$Var1" expr="$Var1 + 1"/>
- </if>
- <raise event="bat"/>
+ <state id="s0">
+ <onentry>
+ <if cond="0&gt;1">
+ <raise event="foo"/>
+ <assign location="$Var1" expr="$Var1 + 1"/>
+ <elseif cond="0&gt;1"/>
+ <raise event="bar"/>
+ <assign location="$Var1" expr="$Var1 + 1"/>
+ </if>
+ <raise event="bat"/>
</onentry>
- <transition event="bat" cond="$Var1/text() =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
+ <transition event="bat" cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test150.scxml b/test/w3c/xpath/test150.scxml
index afa8909..4d817e3 100644
--- a/test/w3c/xpath/test150.scxml
+++ b/test/w3c/xpath/test150.scxml
@@ -1,41 +1,47 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1"/>
- <data id="Var2"/>
- <data id="Var3">
- <node xmlns="">1</node><node xmlns="">2</node><node xmlns="">3</node>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1"/>
+ <data id="Var2"/>
+ <data id="Var3">
+ <node xmlns="">1</node>
+ <node xmlns="">2</node>
+ <node xmlns="">3</node>
</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/* or $Var4/text()" 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
+ <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/* or $Var4/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test151.scxml b/test/w3c/xpath/test151.scxml
index 5933b09..6509635 100644
--- a/test/w3c/xpath/test151.scxml
+++ b/test/w3c/xpath/test151.scxml
@@ -1,41 +1,47 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1"/>
- <data id="Var2"/>
- <data id="Var3">
- <node xmlns="">1</node><node xmlns="">2</node><node xmlns="">3</node>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1"/>
+ <data id="Var2"/>
+ <data id="Var3">
+ <node xmlns="">1</node>
+ <node xmlns="">2</node>
+ <node xmlns="">3</node>
</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/* or $Var5/text()" 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
+ <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/* or $Var5/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test152.scxml b/test/w3c/xpath/test152.scxml
index 1ebbf38..8b8ddec 100644
--- a/test/w3c/xpath/test152.scxml
+++ b/test/w3c/xpath/test152.scxml
@@ -1,48 +1,53 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="0"/>
- <data id="Var2"/>
- <data id="Var3"/>
- <data id="Var4" expr="("/>
- <data id="Var5">
- <node xmlns="">1</node><node xmlns="">2</node><node xmlns="">3</node>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ <data id="Var2"/>
+ <data id="Var3"/>
+ <data id="Var4" expr="("/>
+ <data id="Var5">
+ <node xmlns="">1</node>
+ <node xmlns="">2</node>
+ <node xmlns="">3</node>
</data>
</datamodel>
-
- <state id="s0">
- <onentry>
-<!-- invalid array, legal item -->
- <foreach item="Var2" index="Var3" array="$Var4/text()">
- <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=".." 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/text() =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
+ <state id="s0">
+ <onentry>
+ <!-- invalid array, legal item -->
+ <foreach item="Var2" index="Var3" array="$Var4/text()">
+ <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=".." 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/text() =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>
diff --git a/test/w3c/xpath/test153.scxml b/test/w3c/xpath/test153.scxml
index 35b22bc..f1bd4ad 100644
--- a/test/w3c/xpath/test153.scxml
+++ b/test/w3c/xpath/test153.scxml
@@ -1,35 +1,44 @@
-<?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
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="0"/> <!-- contains the previous value -->
- <data id="Var2"/> <!-- the item which will contain the current value -->
- <data id="Var3">
- <node xmlns="">1</node><node xmlns="">2</node><node xmlns="">3</node>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ <!-- contains the previous value -->
+ <data id="Var2"/>
+ <!-- the item which will contain the current value -->
+ <data id="Var3">
+ <node xmlns="">1</node>
+ <node xmlns="">2</node>
+ <node xmlns="">3</node>
</data>
- <data id="Var4" expr="1"/> <!-- 1 if success, 0 if failure -->
+ <data id="Var4" expr="1"/>
+ <!-- 1 if success, 0 if failure -->
</datamodel>
-
- <state id="s0">
- <onentry>
- <foreach item="Var2" array="$Var3/*">
- <if cond="$Var1/text() &lt;$Var2/text() ">
- <assign location="$Var1" expr="$Var2/text()"/>
- <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/text() =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
+ <state id="s0">
+ <onentry>
+ <foreach item="Var2" array="$Var3/*">
+ <if cond="$Var1/text() &lt;$Var2/text() ">
+ <assign location="$Var1" expr="$Var2/text()"/>
+ <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/text() =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>
diff --git a/test/w3c/xpath/test155.scxml b/test/w3c/xpath/test155.scxml
index 553861e..3e1a102 100644
--- a/test/w3c/xpath/test155.scxml
+++ b/test/w3c/xpath/test155.scxml
@@ -1,26 +1,33 @@
-<?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="xpath">
-
-<datamodel>
- <data id="Var1" expr="0"/>
- <data id="Var2"/>
- <data id="Var3">
- <node xmlns="">1</node><node xmlns="">2</node><node xmlns="">3</node>
+<?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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ <data id="Var2"/>
+ <data id="Var3">
+ <node xmlns="">1</node>
+ <node xmlns="">2</node>
+ <node xmlns="">3</node>
</data>
</datamodel>
-
- <state id="s0">
- <onentry>
- <foreach item="Var2" array="$Var3/*">
- <assign location="$Var1" expr="$Var1/text() + $Var2/text()"/>
- </foreach>
- </onentry>
-
- <transition cond="$Var1/text() =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
+ <state id="s0">
+ <onentry>
+ <foreach item="Var2" array="$Var3/*">
+ <assign location="$Var1" expr="$Var1/text() + $Var2/text()"/>
+ </foreach>
+ </onentry>
+ <transition cond="$Var1/text() =6" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test156.scxml b/test/w3c/xpath/test156.scxml
index 3ed65b4..efee3ac 100644
--- a/test/w3c/xpath/test156.scxml
+++ b/test/w3c/xpath/test156.scxml
@@ -1,28 +1,35 @@
-<?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="xpath">
-
-<datamodel>
- <data id="Var1" expr="0"/>
- <data id="Var2"/>
- <data id="Var3">
- <node xmlns="">1</node><node xmlns="">2</node><node xmlns="">3</node>
- </data>
+<?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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ <data id="Var2"/>
+ <data id="Var3">
+ <node xmlns="">1</node>
+ <node xmlns="">2</node>
+ <node xmlns="">3</node>
+ </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="!1"/>
- </foreach>
- </onentry>
-
- <transition cond="$Var1/text() =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
+ <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="!1"/>
+ </foreach>
+ </onentry>
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test158.scxml b/test/w3c/xpath/test158.scxml
index c682c5f..db267d1 100644
--- a/test/w3c/xpath/test158.scxml
+++ b/test/w3c/xpath/test158.scxml
@@ -1,23 +1,29 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="0"/>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <raise event="event1"/>
- <raise event="event2"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test159.scxml b/test/w3c/xpath/test159.scxml
index 779ed7c..80ef9fc 100644
--- a/test/w3c/xpath/test159.scxml
+++ b/test/w3c/xpath/test159.scxml
@@ -1,20 +1,26 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="0"/>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="thisWillFail" target="baz"/>
- <assign location="$Var1" expr="$Var1 + 1"/>
+ <state id="s0">
+ <onentry>
+ <send event="thisWillFail" target="baz"/>
+ <assign location="$Var1" expr="$Var1 + 1"/>
</onentry>
- <transition cond="$Var1/text() =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
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test172.scxml b/test/w3c/xpath/test172.scxml
index 9a8e019..becc3d7 100644
--- a/test/w3c/xpath/test172.scxml
+++ b/test/w3c/xpath/test172.scxml
@@ -1,20 +1,25 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="'event1'"/>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="'event1'"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <assign location="$Var1" expr="'event2'"/>
- <send eventexpr="$Var1"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test173.scxml b/test/w3c/xpath/test173.scxml
index 3e4a97d..ce743c8 100644
--- a/test/w3c/xpath/test173.scxml
+++ b/test/w3c/xpath/test173.scxml
@@ -1,21 +1,26 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1" expr="27"/>
+<?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="xpath">
+ <datamodel>
+ <data id="Var1" expr="27"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <assign location="$Var1" expr="'#_internal'"/>
- <send targetexpr="$Var1" event="event1"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test174.scxml b/test/w3c/xpath/test174.scxml
index 5a7254e..f9b39b6 100644
--- a/test/w3c/xpath/test174.scxml
+++ b/test/w3c/xpath/test174.scxml
@@ -1,21 +1,26 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="27"/>
+<?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="xpath" 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"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test175.scxml b/test/w3c/xpath/test175.scxml
index 67fa473..2b69238 100644
--- a/test/w3c/xpath/test175.scxml
+++ b/test/w3c/xpath/test175.scxml
@@ -1,27 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that delayexpr uses the current value of var1, not its initial value
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="'0s'"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="'0s'"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <assign location="$Var1" expr="'1s'"/>
- <send delayexpr="$Var1" event="event2"/>
- <send delayexpr="'.5s'" event="event1"/>
+ <state id="s0">
+ <onentry>
+ <assign location="$Var1" expr="'1s'"/>
+ <send delayexpr="$Var1" event="event2"/>
+ <send delayexpr="'.5s'" 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"/>
+ <transition event="event1" target="s1"/>
+ <transition event="event2" 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
+ <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>
diff --git a/test/w3c/xpath/test176.scxml b/test/w3c/xpath/test176.scxml
index 7b59453..87b26bc 100644
--- a/test/w3c/xpath/test176.scxml
+++ b/test/w3c/xpath/test176.scxml
@@ -1,30 +1,35 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1" expr="1"/>
- <data id="Var2"/>
+<?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="xpath">
+ <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/text()"/>
- </send>
+ <state id="s0">
+ <onentry>
+ <assign location="$Var1" expr="2"/>
+ <send event="event1">
+ <param name="aParam" expr="$Var1/text()"/>
+ </send>
</onentry>
-
- <transition event="event1" target="s1">
- <assign location="$Var2" expr="$_event/data/data[@id='aParam']/text()"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
-<state id="s1">
- <transition cond="$Var2/text() =2" target="pass"/>
- <transition target="fail"/>
+ <transition event="event1" target="s1">
+ <assign location="$Var2" expr="$_event/data/data[@id='aParam']/text()"/>
+ </transition>
+ <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
+ <state id="s1">
+ <transition cond="$Var2/text() =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>
diff --git a/test/w3c/xpath/test178.scxml b/test/w3c/xpath/test178.scxml
index 86922d1..b82a6b4 100644
--- a/test/w3c/xpath/test178.scxml
+++ b/test/w3c/xpath/test178.scxml
@@ -1,27 +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.
+<?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="xpath">
-
-<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/text()"/>
- </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
+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="xpath">
+ <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/text()"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="final"/>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test179.scxml b/test/w3c/xpath/test179.scxml
index 42d1533..6d71865 100644
--- a/test/w3c/xpath/test179.scxml
+++ b/test/w3c/xpath/test179.scxml
@@ -1,18 +1,23 @@
-<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="event1">
- <content>123</content>
- </send>
+<?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="xpath">
+ <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
+ <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>
diff --git a/test/w3c/xpath/test183.scxml b/test/w3c/xpath/test183.scxml
index dcb5bb3..a706fbc 100644
--- a/test/w3c/xpath/test183.scxml
+++ b/test/w3c/xpath/test183.scxml
@@ -1,21 +1,25 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1"/>
-
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="event1" idlocation="$Var1"/>
+ <state id="s0">
+ <onentry>
+ <send event="event1" idlocation="$Var1"/>
</onentry>
-
- <transition cond="$Var1/* or $Var1/text()" 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
+ <transition cond="$Var1/* or $Var1/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test185.scxml b/test/w3c/xpath/test185.scxml
index 387086d..6afa988 100644
--- a/test/w3c/xpath/test185.scxml
+++ b/test/w3c/xpath/test185.scxml
@@ -1,23 +1,27 @@
-<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="event2" delayexpr="'1s'"/>
- <send event="event1"/>
+<?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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="event2" delayexpr="'1s'"/>
+ <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"/>
+ <transition event="event1" target="s1"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test186.scxml b/test/w3c/xpath/test186.scxml
index 8121a17..cb8ad3e 100644
--- a/test/w3c/xpath/test186.scxml
+++ b/test/w3c/xpath/test186.scxml
@@ -1,31 +1,36 @@
-<?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
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="1"/>
- <data id="Var2"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <send event="event1" delayexpr="'1s'">
- <param name="aParam" expr="$Var1/text()"/>
- </send>
- <assign location="$Var1" expr="2"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="1"/>
+ <data id="Var2"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <send event="event1" delayexpr="'1s'">
+ <param name="aParam" expr="$Var1/text()"/>
+ </send>
+ <assign location="$Var1" expr="2"/>
</onentry>
-
- <transition event="event1" target="s1">
- <assign location="$Var2" expr="$_event/data/data[@id='aParam']/text()"/>
+ <transition event="event1" target="s1">
+ <assign location="$Var2" expr="$_event/data/data[@id='aParam']/text()"/>
</transition>
- <transition event="*" target="fail"/>
- </state>
-
-<state id="s1">
- <transition cond="$Var2/text() =1" target="pass"/>
- <transition target="fail"/>
+ <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
+ <state id="s1">
+ <transition cond="$Var2/text() =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>
diff --git a/test/w3c/xpath/test187.scxml b/test/w3c/xpath/test187.scxml
index 5cbb817..4f715e2 100644
--- a/test/w3c/xpath/test187.scxml
+++ b/test/w3c/xpath/test187.scxml
@@ -1,33 +1,38 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that delayed <send> is not sent if the sending session terminates. In this case,
+<?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="xpath">
-
-
-<state id="s0">
+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="xpath">
+ <state id="s0">
<onentry>
<send event="timeout" delayexpr="'1s'"/>
- </onentry>
+ </onentry>
<invoke type="scxml">
- <content>
- <!-- exit before the delayed send can execute -->
- <scxml initial="sub0" version="1.0" datamodel="xpath">
- <state id="sub0">
- <onentry>
- <send event="childToParent" target="#_parent" delayexpr="'.5s'"/>
+ <content>
+ <!-- exit before the delayed send can execute -->
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <state id="sub0">
+ <onentry>
+ <send event="childToParent" target="#_parent" delayexpr="'.5s'"/>
</onentry>
- <transition target="subFinal"/>
+ <transition target="subFinal"/>
</state>
- <final id="subFinal"/>
- </scxml>
- </content>
- </invoke>
-
+ <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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test189.scxml b/test/w3c/xpath/test189.scxml
index 3b5d34e..b923ae9 100644
--- a/test/w3c/xpath/test189.scxml
+++ b/test/w3c/xpath/test189.scxml
@@ -1,22 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that #_internal as a target of <send> puts the event on the internal queue. If it does,
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that #_internal as a target of <send> puts the event on the internal queue. If it does,
event1 will be processed before event2, because event1 is added to the internal queue while event2 is
-added to the external queue (event though event2 is generated first) --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
-
-
-<state id="s0">
- <onentry>
- <!-- goes to the external queue -->
- <send event="event2"/>
- <!-- to the internal queue -->
- <send event="event1" target="#_internal"/>
+added to the external queue (event though event2 is generated first) -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+ <state id="s0">
+ <onentry>
+ <!-- goes to the external queue -->
+ <send event="event2"/>
+ <!-- to the internal queue -->
+ <send event="event1" target="#_internal"/>
</onentry>
-
- <!-- once we've entered the state, we should check for internal events first -->
- <transition event="event1" target="pass"/>
- <transition event="event2" 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
+ <!-- once we've entered the state, we should check for internal events first -->
+ <transition event="event1" target="pass"/>
+ <transition event="event2" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test190.scxml b/test/w3c/xpath/test190.scxml
index 7458f66..cb1607b 100644
--- a/test/w3c/xpath/test190.scxml
+++ b/test/w3c/xpath/test190.scxml
@@ -1,35 +1,40 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that #_scxml_sessionid as a target of <send> puts the event on the external queue. If it does,
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that #_scxml_sessionid as a target of <send> puts the event on the external queue. If it does,
event1 will be processed before event2, because event1 is added to the internal queue while event2 is
added to the external queue (event though event2 is generated first). we have to make sure that event2
-is actually delivered. The delayed <send> makes sure another event is generated (so 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="xpath">
-<datamodel>
- <data id="Var1" expr="'#_scxml_'"/>
- <data id="Var2" expr="$_sessionid"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <assign location="$Var1" expr="concat($Var1, $Var2)"/>
- <!-- goes to the external queue -->
- <send event="event2" targetexpr="$Var1"/>
- <!-- to the internal queue -->
- <raise event="event1"/>
- <!-- this should get added to the external queue after event2 -->
- <send event="timeout"/>
+is actually delivered. The delayed <send> makes sure another event is generated (so 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="xpath">
+ <datamodel>
+ <data id="Var1" expr="'#_scxml_'"/>
+ <data id="Var2" expr="$_sessionid"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <assign location="$Var1" expr="concat($Var1, $Var2)"/>
+ <!-- goes to the external queue -->
+ <send event="event2" targetexpr="$Var1"/>
+ <!-- to the internal queue -->
+ <raise event="event1"/>
+ <!-- this should get added to the external queue after event2 -->
+ <send event="timeout"/>
</onentry>
-
- <!-- once we've entered the state, we should check for internal events first -->
- <transition event="event1" target="s1"/>
- <transition event="*" target="fail"/>
- </state>
-
-<!-- now check that we get event2 and not a timeout -->
-<state id="s1">
- <transition event="event2" target="pass"/>
- <transition event="*" target="fail"/>
+ <!-- once we've entered the state, we should check for internal events first -->
+ <transition event="event1" target="s1"/>
+ <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
+ <!-- now check that we get event2 and not a timeout -->
+ <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>
diff --git a/test/w3c/xpath/test191.scxml b/test/w3c/xpath/test191.scxml
index 1910eaf..d6844b7 100644
--- a/test/w3c/xpath/test191.scxml
+++ b/test/w3c/xpath/test191.scxml
@@ -1,31 +1,37 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that #_parent works as a target of <send> . a subscript is invoked and sends the event
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that #_parent works as a target of <send> . a subscript is invoked and sends the event
childToParent to its parent session (ths session) using #_parent as the target. If we get this event, we
-pass, otherwise we fail. The timer insures that some event is generated and that the test does not 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="xpath">
-
-
-<state id="s0">
+pass, otherwise we fail. The timer insures that some event is generated and that the test does not 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="xpath">
+ <state id="s0">
<onentry>
<send event="timeout" delay="5s"/>
- </onentry>
+ </onentry>
<invoke type="scxml">
- <content>
- <!-- send an event to the parent session using #_parent as the target -->
+ <content>
+ <!-- send an event to the parent session using #_parent as the target -->
<scxml initial="sub0" version="1.0" datamodel="xpath">
<state id="sub0">
<onentry>
- <send event="childToParent" target="#_parent"/>
- </onentry>
- <transition target="subFinal"/>
- </state>
- <final id="subFinal"/>
- </scxml>
- </content>
+ <send event="childToParent" target="#_parent"/>
+ </onentry>
+ <transition target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
</invoke>
<transition event="childToParent" 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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test192.scxml b/test/w3c/xpath/test192.scxml
index 81d185d..ea4567c 100644
--- a/test/w3c/xpath/test192.scxml
+++ b/test/w3c/xpath/test192.scxml
@@ -1,55 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that #_invokeid works as a target of <send> . A child script is invoked and sends us
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that #_invokeid works as a target of <send> . A child script is invoked and sends us
childToParent once its running. Then we send it the event parentToChild using its invokeid as the target.
If it receives this event, it sends sends the event eventReceived to its parent session (ths session).
If we get this event, we pass, otherwise the child script eventually times out sends invoke.done and we fail.
-We also set a timeout in this process to make sure 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" datamodel="xpath" version="1.0">
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="5s"/>
- </onentry>
-
- <invoke type="scxml" id="invokedChild">
- <content>
- <!-- let the parent session know we're running by sending childToParent, then wait for parentToChild.
+We also set a timeout in this process to make sure 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" datamodel="xpath" version="1.0">
+ <state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="5s"/>
+ </onentry>
+ <invoke type="scxml" id="invokedChild">
+ <content>
+ <!-- let the parent session know we're running by sending childToParent, then wait for parentToChild.
If we get it, send eventReceived. If we don't we eventually time out -->
- <scxml initial="sub0" version="1.0" datamodel="xpath">
-
- <state id="sub0">
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <state id="sub0">
<onentry>
- <send event="childToParent" target="#_parent"/>
- <send event="timeout" delay="3s"/>
- </onentry>
-
- <transition event="parentToChild" target="subFinal">
- <send target="#_parent" event="eventReceived"/>
- </transition>
-
- <transition event="timeout" target="subFinal"/>
- </state>
-
- <final id="subFinal"/>
-
- </scxml>
+ <send event="childToParent" target="#_parent"/>
+ <send event="timeout" delay="3s"/>
+ </onentry>
+ <transition event="parentToChild" target="subFinal">
+ <send target="#_parent" event="eventReceived"/>
+ </transition>
+ <transition event="timeout" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
</content>
- </invoke>
-
- <transition event="timeout" target="fail"/>
- <transition event="done.invoke" target="fail"/>
-
-<state id="s01">
- <transition event="childToParent" target="s02">
- <send target="#_invokedChild" event="parentToChild"/>
- </transition>
-</state>
-
-<state id="s02">
- <transition event="eventReceived" target="pass"/>
+ </invoke>
+ <transition event="timeout" target="fail"/>
+ <transition event="done.invoke" target="fail"/>
+ <state id="s01">
+ <transition event="childToParent" target="s02">
+ <send target="#_invokedChild" event="parentToChild"/>
+ </transition>
+ </state>
+ <state id="s02">
+ <transition event="eventReceived" target="pass"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test193.scxml b/test/w3c/xpath/test193.scxml
index 54926cf..eaef6fc 100644
--- a/test/w3c/xpath/test193.scxml
+++ b/test/w3c/xpath/test193.scxml
@@ -1,26 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that omitting target and targetexpr of <send> when using the
-SCXML event i/o processor puts the event on the external queue. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="internal"/>
- <!-- this should put event1 in the external queue -->
- <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
- <send event="timeout" delay="1s"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- we test that omitting target and targetexpr of <send> when using the
+SCXML event i/o processor puts the event on the external queue. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="internal"/>
+ <!-- this should put event1 in the external queue -->
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ <send event="timeout" delay="1s"/>
</onentry>
-
- <transition event="event1" target="fail"/>
- <transition event="internal" target="s1"/>
- </state>
-
- <state id="s1">
- <transition event="event1" target="pass"/>
- <transition event="timeout" target="fail"/>
-
- </state>
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <transition event="event1" target="fail"/>
+ <transition event="internal" target="s1"/>
+ </state>
+ <state id="s1">
+ <transition event="event1" target="pass"/>
+ <transition event="timeout" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test194.scxml b/test/w3c/xpath/test194.scxml
index 523400b..fe5a3ef 100644
--- a/test/w3c/xpath/test194.scxml
+++ b/test/w3c/xpath/test194.scxml
@@ -1,22 +1,26 @@
-<?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="xpath">
-
-
-<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"/>
+<?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="xpath">
+ <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
+ <!-- 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>
diff --git a/test/w3c/xpath/test198.scxml b/test/w3c/xpath/test198.scxml
index 23ca478..5e2f1da 100644
--- a/test/w3c/xpath/test198.scxml
+++ b/test/w3c/xpath/test198.scxml
@@ -1,19 +1,23 @@
-<?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="xpath">
-
-<state id="s0">
- <onentry>
- <send event="event1"/>
- <send event="timeout"/>
+<?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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="event1"/>
+ <send event="timeout"/>
</onentry>
-
-
- <transition event="event1" cond="$_event/origintype/text() = '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
+ <transition event="event1" cond="$_event/origintype/text() = '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>
diff --git a/test/w3c/xpath/test199.scxml b/test/w3c/xpath/test199.scxml
index 9c8f734..b37334d 100644
--- a/test/w3c/xpath/test199.scxml
+++ b/test/w3c/xpath/test199.scxml
@@ -1,18 +1,22 @@
-<?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="xpath">
-
-<state id="s0">
- <onentry>
- <send type="27" event="event1"/>
- <send event="timeout"/>
+<?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="xpath">
+ <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
+ <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>
diff --git a/test/w3c/xpath/test200.scxml b/test/w3c/xpath/test200.scxml
index 182ada4..1a09a57 100644
--- a/test/w3c/xpath/test200.scxml
+++ b/test/w3c/xpath/test200.scxml
@@ -1,18 +1,22 @@
-<?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="xpath" version="1.0">
-
-<state id="s0">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event1"/>
- <send event="timeout"/>
+<?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="xpath" 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
+ <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>
diff --git a/test/w3c/xpath/test201.scxml b/test/w3c/xpath/test201.scxml
index 8f4e285..d025c93 100644
--- a/test/w3c/xpath/test201.scxml
+++ b/test/w3c/xpath/test201.scxml
@@ -1,19 +1,23 @@
-<?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="xpath">
-
-<state id="s0">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" event="event1"/>
- <send event="timeout"/>
+<?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="xpath">
+ <state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" 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
+ <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>
diff --git a/test/w3c/xpath/test205.scxml b/test/w3c/xpath/test205.scxml
index d6a02e2..73722a7 100644
--- a/test/w3c/xpath/test205.scxml
+++ b/test/w3c/xpath/test205.scxml
@@ -1,30 +1,34 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <send event="event1">
- <param name="aParam" expr="1"/>
- </send>
- <send event="timeout"/>
+<?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="xpath">
+ <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/data[@id='aParam']/text()"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
-<state id="s1">
- <transition cond="$Var1/text() =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
+ <transition event="event1" target="s1">
+ <assign location="$Var1" expr="$_event/data/data[@id='aParam']/text()"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s1">
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test207.scxml b/test/w3c/xpath/test207.scxml
index b99e511..c33760b 100644
--- a/test/w3c/xpath/test207.scxml
+++ b/test/w3c/xpath/test207.scxml
@@ -1,56 +1,55 @@
-<?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
+<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delayexpr="'2s'"/>
+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="xpath">
+ <state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delayexpr="'2s'"/>
</onentry>
- <invoke type="scxml">
- <content>
- <!-- when invoked, we raise a delayed event1 with sendid 'foo' and notify our parent. Then we wait.
+ <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="xpath">
- <state id="sub0">
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <state id="sub0">
<onentry>
- <send event="event1" id="foo" delayexpr="'1s'"/>
+ <send event="event1" id="foo" delayexpr="'1s'"/>
<send event="event2" delayexpr="'1.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>
+ </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"/>
+ <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
+ </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>
diff --git a/test/w3c/xpath/test208.scxml b/test/w3c/xpath/test208.scxml
index 4aa9ebe..7ca578b 100644
--- a/test/w3c/xpath/test208.scxml
+++ b/test/w3c/xpath/test208.scxml
@@ -1,21 +1,24 @@
-<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send id="foo" event="event1" delayexpr="'1s'"/>
- <send event="event2" delayexpr="'1.5s'"/>
- <cancel sendid="foo"/>
+<?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="xpath">
+ <state id="s0">
+ <onentry>
+ <send id="foo" event="event1" delayexpr="'1s'"/>
+ <send event="event2" delayexpr="'1.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
+ <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>
diff --git a/test/w3c/xpath/test210.scxml b/test/w3c/xpath/test210.scxml
index 17dfc95..50161c8 100644
--- a/test/w3c/xpath/test210.scxml
+++ b/test/w3c/xpath/test210.scxml
@@ -1,24 +1,28 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1" expr="'bar'"/>
+<?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="xpath">
+ <datamodel>
+ <data id="Var1" expr="'bar'"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send id="foo" event="event1" delayexpr="'1s'"/>
- <send event="event2" delayexpr="'1.5s'"/>
- <assign location="$Var1" expr="'foo'"/>
- <cancel sendidexpr="$Var1"/>
+ <state id="s0">
+ <onentry>
+ <send id="foo" event="event1" delayexpr="'1s'"/>
+ <send event="event2" delayexpr="'1.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
+ <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>
diff --git a/test/w3c/xpath/test215.scxml b/test/w3c/xpath/test215.scxml
index 4aebe84..0863ae9 100644
--- a/test/w3c/xpath/test215.scxml
+++ b/test/w3c/xpath/test215.scxml
@@ -1,29 +1,35 @@
-<?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
+<?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="xpath" 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/'"/>
+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="xpath" 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>
+ <invoke typeexpr="$Var1">
+ <content>
<!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. -->
<scxml initial="subFinal" datamodel="xpath" version="1.0">
- <final id="subFinal"/>
+ <final id="subFinal"/>
</scxml>
- </content>
+ </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
+ <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>
diff --git a/test/w3c/xpath/test216.scxml b/test/w3c/xpath/test216.scxml
index 901ad6f..950be98 100644
--- a/test/w3c/xpath/test216.scxml
+++ b/test/w3c/xpath/test216.scxml
@@ -1,22 +1,28 @@
-<?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
+<?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="xpath">
-
-<datamodel>
- <data id="Var1" expr="'foo'"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="5s"/>
- <assign location="$Var1" expr="'file:test216sub1.scxml'"/>
+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="xpath">
+ <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
+ <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>
diff --git a/test/w3c/xpath/test216sub1.scxml b/test/w3c/xpath/test216sub1.scxml
index f5c49a1..dc240cb 100644
--- a/test/w3c/xpath/test216sub1.scxml
+++ b/test/w3c/xpath/test216sub1.scxml
@@ -1,5 +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="xpath">
-
-<final id="final"/>
-
-</scxml> \ No newline at end of file
+<?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="xpath">
+ <final id="final"/>
+</scxml>
diff --git a/test/w3c/xpath/test220.scxml b/test/w3c/xpath/test220.scxml
index 15f66ba..1c048f9 100644
--- a/test/w3c/xpath/test220.scxml
+++ b/test/w3c/xpath/test220.scxml
@@ -1,21 +1,29 @@
-<?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="xpath">
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="5s"/>
+<?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="xpath">
+ <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="xpath">
- <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
+ <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="xpath">
+ <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>
diff --git a/test/w3c/xpath/test223.scxml b/test/w3c/xpath/test223.scxml
index 08f2ee4..7112015 100644
--- a/test/w3c/xpath/test223.scxml
+++ b/test/w3c/xpath/test223.scxml
@@ -1,29 +1,35 @@
-<?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="xpath">
- <datamodel>
- <data id="Var1"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="1s"/>
+<?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="xpath">
+ <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="xpath">
- <final id="subFinal"/>
+ <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="xpath">
+ <final id="subFinal"/>
</scxml>
- </content>
+ </content>
</invoke>
- <transition event="*" target="s1"/>
-</state>
-
-<state id="s1">
- <transition cond="$Var1/* or $Var1/text()" target="pass"/>
- <transition target="fail"/>
+ <transition event="*" target="s1"/>
</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
+ <state id="s1">
+ <transition cond="$Var1/* or $Var1/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test224.scxml b/test/w3c/xpath/test224.scxml
index 8c74c4e..9998ffd 100644
--- a/test/w3c/xpath/test224.scxml
+++ b/test/w3c/xpath/test224.scxml
@@ -1,31 +1,36 @@
-<?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="xpath">
- <datamodel>
- <data id="Var1"/>
- <data id="Var2" expr="'s0.'"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="1s"/>
+<?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="xpath">
+ <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="xpath">
- <final id="subFinal"/>
- </scxml>
- </content>
+ <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="xpath">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
</invoke>
-
- <transition event="*" target="s1"/>
-</state>
-
-<state id="s1">
- <transition cond="&#xA;contains($Var1, $Var2)" target="pass"/>
- <transition target="fail"/>
+ <transition event="*" target="s1"/>
</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
+ <state id="s1">
+ <transition cond="&#10;contains($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>
diff --git a/test/w3c/xpath/test225.scxml b/test/w3c/xpath/test225.scxml
index a43cdab..4a3e842 100644
--- a/test/w3c/xpath/test225.scxml
+++ b/test/w3c/xpath/test225.scxml
@@ -1,38 +1,42 @@
-<?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="xpath">
- <datamodel>
- <data id="Var1"/>
- <data id="Var2"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="1s"/>
+<?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="xpath">
+ <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">
+ <invoke type="http://www.w3.org/TR/scxml/" idlocation="$Var1">
<content>
- <scxml initial="subFinal1" version="1.0" datamodel="xpath">
- <final id="subFinal1"/>
+ <scxml initial="subFinal1" version="1.0" datamodel="xpath">
+ <final id="subFinal1"/>
</scxml>
- </content>
- </invoke>
- <invoke type="http://www.w3.org/TR/scxml/" idlocation="$Var2">
+ </content>
+ </invoke>
+ <invoke type="http://www.w3.org/TR/scxml/" idlocation="$Var2">
<content>
- <scxml initial="subFinal2" version="1.0" datamodel="xpath">
- <final id="subFinal2"/>
+ <scxml initial="subFinal2" version="1.0" datamodel="xpath">
+ <final id="subFinal2"/>
</scxml>
- </content>
- </invoke>
-
- <transition event="*" target="s1"/>
-</state>
-
-<state id="s1">
- <transition cond="$Var1/text()=$Var2/text()" target="fail"/>
- <transition target="pass"/>
+ </content>
+ </invoke>
+ <transition event="*" target="s1"/>
</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
+ <state id="s1">
+ <transition cond="$Var1/text()=$Var2/text()" target="fail"/>
+ <transition target="pass"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test226.scxml b/test/w3c/xpath/test226.scxml
index 4b717b2..b0914fc 100644
--- a/test/w3c/xpath/test226.scxml
+++ b/test/w3c/xpath/test226.scxml
@@ -1,23 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- this is basically just a test that invoke works correctly and that you can pass data
+<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
+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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
</onentry>
-
-
- <invoke type="http://www.w3.org/TR/scxml/" src="file:test226sub1.scxml">
+ <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
+ </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>
diff --git a/test/w3c/xpath/test226sub1.scxml b/test/w3c/xpath/test226sub1.scxml
index 9ac7b9a..e7776e7 100644
--- a/test/w3c/xpath/test226sub1.scxml
+++ b/test/w3c/xpath/test226sub1.scxml
@@ -1,16 +1,14 @@
-<?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="xpath" version="1.0">
-
-<datamodel>
- <data id="Var1"/>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1"/>
</datamodel>
-
-<state id="s0">
- <transition cond="$Var1/* or $Var1/text()" target="final">
- <send target="#_parent" event="varBound"/>
+ <state id="s0">
+ <transition cond="$Var1/* or $Var1/text()" target="final">
+ <send target="#_parent" event="varBound"/>
</transition>
- <transition target="final"/>
+ <transition target="final"/>
</state>
-
-<final id="final"/>
-
-</scxml> \ No newline at end of file
+ <final id="final"/>
+</scxml>
diff --git a/test/w3c/xpath/test228.scxml b/test/w3c/xpath/test228.scxml
index 9afa343..01ed242 100644
--- a/test/w3c/xpath/test228.scxml
+++ b/test/w3c/xpath/test228.scxml
@@ -1,33 +1,37 @@
-<?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="xpath">
- <datamodel>
- <data id="Var1"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
+<?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="xpath">
+ <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="xpath">
- <final id="subFinal"/>
- </scxml>
- </content>
+ <invoke type="http://www.w3.org/TR/scxml/" id="foo">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="xpath">
+ <final id="subFinal"/>
+ </scxml>
+ </content>
</invoke>
-
- <transition event="done.invoke" target="s1">
- <assign location="$Var1" expr="$_event/invokeid/text()"/>
+ <transition event="done.invoke" target="s1">
+ <assign location="$Var1" expr="$_event/invokeid/text()"/>
</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
+ <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>
diff --git a/test/w3c/xpath/test229.scxml b/test/w3c/xpath/test229.scxml
index 747f77c..c2c847c 100644
--- a/test/w3c/xpath/test229.scxml
+++ b/test/w3c/xpath/test229.scxml
@@ -1,42 +1,46 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that autofoward works. If the child process receives back a copy of the
+<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
+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="xpath">
+ <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.
+ <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="xpath">
- <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 initial="sub0" version="1.0" datamodel="xpath">
+ <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>
+ </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
+ <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>
diff --git a/test/w3c/xpath/test230.scxml b/test/w3c/xpath/test230.scxml
index 51f8529..49c1aae 100644
--- a/test/w3c/xpath/test230.scxml
+++ b/test/w3c/xpath/test230.scxml
@@ -1,62 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- a manual test that an autofowarded event has the same fields and values as the original event.
+<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="3s"/>
+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="xpath">
+ <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
+ <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="xpath">
- <state id="sub0">
+ <state id="sub0">
<onentry>
- <send target="#_parent" event="childToParent"/>
+ <send target="#_parent" event="childToParent"/>
<send event="timeout" delay="2s"/>
- </onentry>
- <transition event="childToParent" target="subFinal">
- <log label="name is " expr="$_event/name/text()"/>
- <log label="type is " expr="$_event/type/text()"/>
- <log label="sendid is " expr="$_event/sendid/text()"/>
- <log label="origin is " expr="$_event/origin/text()"/>
- <log label="origintype is " expr="$_event/origintype/text()"/>
- <log label="invokeid is " expr="$_event/invokeid/text()"/>
- <log label="data is " expr="$_event/data/text()"/>
- </transition>
- <transition event="*" target="subFinal"/>
+ </onentry>
+ <transition event="childToParent" target="subFinal">
+ <log label="name is " expr="$_event/name/text()"/>
+ <log label="type is " expr="$_event/type/text()"/>
+ <log label="sendid is " expr="$_event/sendid/text()"/>
+ <log label="origin is " expr="$_event/origin/text()"/>
+ <log label="origintype is " expr="$_event/origintype/text()"/>
+ <log label="invokeid is " expr="$_event/invokeid/text()"/>
+ <log label="data is " expr="$_event/data/text()"/>
+ </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/text()"/>
- <log label="type is " expr="$_event/type/text()"/>
- <log label="sendid is " expr="$_event/sendid/text()"/>
- <log label="origin is " expr="$_event/origin/text()"/>
- <log label="origintype is " expr="$_event/origintype/text()"/>
- <log label="invokeid is " expr="$_event/invokeid/text()"/>
- <log label="data is " expr="$_event/data/text()"/>
- </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
+ <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/text()"/>
+ <log label="type is " expr="$_event/type/text()"/>
+ <log label="sendid is " expr="$_event/sendid/text()"/>
+ <log label="origin is " expr="$_event/origin/text()"/>
+ <log label="origintype is " expr="$_event/origintype/text()"/>
+ <log label="invokeid is " expr="$_event/invokeid/text()"/>
+ <log label="data is " expr="$_event/data/text()"/>
+ </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>
diff --git a/test/w3c/xpath/test232.scxml b/test/w3c/xpath/test232.scxml
index f40627b..c413e7b 100644
--- a/test/w3c/xpath/test232.scxml
+++ b/test/w3c/xpath/test232.scxml
@@ -1,40 +1,41 @@
-<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="3s"/>
+<?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="xpath">
+ <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="xpath">
- <final id="subFinal">
- <onentry>
- <send target="#_parent" event="childToParent1"/>
- <send target="#_parent" event="childToParent2"/>
- </onentry>
- </final>
- </scxml>
- </content>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="xpath">
+ <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
+ <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>
diff --git a/test/w3c/xpath/test233.scxml b/test/w3c/xpath/test233.scxml
index e7b4116..254d28e 100644
--- a/test/w3c/xpath/test233.scxml
+++ b/test/w3c/xpath/test233.scxml
@@ -1,35 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that finalize markup runs before the event is processed. The invoked process will
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="1"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="1"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
+ <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="xpath">
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="xpath">
<final id="subFinal">
<onentry>
- <send target="#_parent" event="childToParent">
- <param name="aParam" expr="2"/>
- </send>
- </onentry>
+ <send target="#_parent" event="childToParent">
+ <param name="aParam" expr="2"/>
+ </send>
+ </onentry>
</final>
- </scxml>
- </content>
- <finalize>
- <assign location="$Var1" expr="$_event/data/data[@id='aParam']/text()"/>
+ </scxml>
+ </content>
+ <finalize>
+ <assign location="$Var1" expr="$_event/data/data[@id='aParam']/text()"/>
</finalize>
- </invoke>
-
- <transition event="childToParent" cond="$Var1/text() =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
+ </invoke>
+ <transition event="childToParent" cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test234.scxml b/test/w3c/xpath/test234.scxml
index bf06eba..9f00f7a 100644
--- a/test/w3c/xpath/test234.scxml
+++ b/test/w3c/xpath/test234.scxml
@@ -1,66 +1,69 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that only finalize markup in the invoking state runs. the first invoked process will
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="1"/>
- <data id="Var2" expr="1"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="1"/>
+ <data id="Var2" expr="1"/>
</datamodel>
-<parallel id="p0">
+ <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="xpath">
- <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/data[@id='aParam']/text()"/>
+ <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="xpath">
+ <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/data[@id='aParam']/text()"/>
</finalize>
- </invoke>
-
+ </invoke>
<transition event="childToParent" cond="$Var1/text() =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="xpath">
- <state id="sub0">
- <onentry>
- <send event="timeout" delay="2s"/>
- </onentry>
- <transition event="timeout" target="subFinal2"/>
- </state>
- <final id="subFinal2"/>
- </scxml>
+ <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="xpath">
+ <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/data[@id='aParam']/text()"/>
- </finalize>
+ <finalize>
+ <assign location="$Var2" expr="$_event/data/data[@id='aParam']/text()"/>
+ </finalize>
</invoke>
+ </state>
+ </parallel>
+ <state id="s1">
+ <transition cond="$Var2/text() =1" target="pass"/>
+ <transition target="fail"/>
</state>
-
-</parallel>
-
-
-<state id="s1">
- <transition cond="$Var2/text() =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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test235.scxml b/test/w3c/xpath/test235.scxml
index 1b06a4c..4d2a8a9 100644
--- a/test/w3c/xpath/test235.scxml
+++ b/test/w3c/xpath/test235.scxml
@@ -1,23 +1,29 @@
-<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="2s"/>
+<?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="xpath">
+ <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="xpath">
- <final id="subFinal"/>
+ <invoke type="http://www.w3.org/TR/scxml/" id="foo">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="xpath">
+ <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
+ </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>
diff --git a/test/w3c/xpath/test236.scxml b/test/w3c/xpath/test236.scxml
index 0964f71..2d66643 100644
--- a/test/w3c/xpath/test236.scxml
+++ b/test/w3c/xpath/test236.scxml
@@ -1,39 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that done.invoke.id event is the last event we receive. the invoked process sends childToParent
+<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delayexpr="'2s'"/>
+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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delayexpr="'2s'"/>
</onentry>
- <invoke type="http://www.w3.org/TR/scxml/">
- <content>
- <scxml initial="subFinal" version="1.0" datamodel="xpath">
- <final id="subFinal">
- <onexit>
- <send target="#_parent" event="childToParent"/>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="subFinal" version="1.0" datamodel="xpath">
+ <final id="subFinal">
+ <onexit>
+ <send target="#_parent" event="childToParent"/>
</onexit>
- </final>
- </scxml>
+ </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"/>
+ </invoke>
+ <transition event="childToParent" target="s1"/>
+ <transition event="done.invoke" 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
+ <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>
diff --git a/test/w3c/xpath/test237.scxml b/test/w3c/xpath/test237.scxml
index a81e36a..153d49d 100644
--- a/test/w3c/xpath/test237.scxml
+++ b/test/w3c/xpath/test237.scxml
@@ -1,41 +1,45 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that cancelling works. invoked child sleeps for two seconds, then terminates. We
+<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout1" delayexpr="'1s'"/>
+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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="timeout1" delayexpr="'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="xpath">
- <state id="sub0">
+ <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="xpath">
+ <state id="sub0">
<onentry>
<send event="timeout" delayexpr="'2s'"/>
- </onentry>
- <transition event="timeout" target="subFinal"/>
- </state>
- <final id="subFinal"/>
- </scxml>
- </content>
- </invoke>
-
- <transition event="timeout1" target="s1"/>
-
-</state>
-
-<state id="s1">
+ </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" delayexpr="'1.5s'"/>
+ <send event="timeout2" delayexpr="'1.5s'"/>
</onentry>
- <!-- here we should NOT get done.invoke -->
- <transition event="done.invoke" target="fail"/>
- <transition event="*" target="pass"/>
+ <!-- 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test239.scxml b/test/w3c/xpath/test239.scxml
index b7fcfc2..6abb941 100644
--- a/test/w3c/xpath/test239.scxml
+++ b/test/w3c/xpath/test239.scxml
@@ -1,32 +1,35 @@
-<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="2s"/>
+<?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="xpath">
+ <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">
+ <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="xpath">
- <final id="final"/>
- </scxml>
- </content>
- </invoke>
-
- <transition event="done.invoke" target="pass"/>
+ <content>
+ <scxml version="1.0" initial="final" datamodel="xpath">
+ <final id="final"/>
+ </scxml>
+ </content>
+ </invoke>
+ <transition event="done.invoke" target="pass"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test239sub1.scxml b/test/w3c/xpath/test239sub1.scxml
index 510f4a0..b528057 100644
--- a/test/w3c/xpath/test239sub1.scxml
+++ b/test/w3c/xpath/test239sub1.scxml
@@ -1,5 +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="xpath">
-
- <final id="final"/>
-
-</scxml> \ No newline at end of file
+<?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="xpath">
+ <final id="final"/>
+</scxml>
diff --git a/test/w3c/xpath/test240.scxml b/test/w3c/xpath/test240.scxml
index ddf92c6..7cc7a08 100644
--- a/test/w3c/xpath/test240.scxml
+++ b/test/w3c/xpath/test240.scxml
@@ -1,67 +1,71 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that datamodel values can be specified both by 'namelist' and by <param>.
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="1"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="1"/>
</datamodel>
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="2s"/>
+ <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="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
- <state id="sub01">
- <transition cond="$Var1/data/text() =1" target="subFinal1">
- <send target="#_parent" event="success"/>
- </transition>
- <transition target="subFinal1">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
- <final id="subFinal1"/>
+ <state id="s01">
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="$Var1">
+ <content>
+ <scxml initial="sub01" version="1.0" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="sub01">
+ <transition cond="$Var1/data/text() =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>
+ <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="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="sub02">
- <transition cond="$Var1/text() =1" target="subFinal2">
- <send target="#_parent" event="success"/>
- </transition>
- <transition target="subFinal1">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
- <final id="subFinal2"/>
+ <param name="Var1" expr="1"/>
+ <content>
+ <scxml initial="sub02" version="1.0" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="sub02">
+ <transition cond="$Var1/text() =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"/>
+ </invoke>
+ <transition event="success" target="pass"/>
+ <transition event="failure" target="fail"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test241.scxml b/test/w3c/xpath/test241.scxml
index 377aa4d..3935121 100644
--- a/test/w3c/xpath/test241.scxml
+++ b/test/w3c/xpath/test241.scxml
@@ -1,98 +1,96 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- The child process will return success ifits Var1 is set to 1, failure otherwise. For this test
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="1"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="1"/>
</datamodel>
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="2s"/>
+ <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="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="sub01">
+ <state id="s01">
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="$Var1">
+ <content>
+ <scxml initial="sub01" version="1.0" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="sub01">
<transition cond="$Var1/text() =1" target="subFinal1">
- <send target="#_parent" event="success"/>
- </transition>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition target="subFinal1">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
-
+ <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">
+ </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="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="sub02">
+ <param name="Var1" expr="1"/>
+ <content>
+ <scxml initial="sub02" version="1.0" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="sub02">
<transition cond="$Var1/text() =1" target="subFinal2">
- <send target="#_parent" event="success"/>
- </transition>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition target="subFinal2">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
-
+ <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">
+ </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="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="sub03">
+ <param name="Var1" expr="1"/>
+ <content>
+ <scxml initial="sub03" version="1.0" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="sub03">
<transition cond="$Var1/text() =1" target="subFinal3">
- <send target="#_parent" event="success"/>
- </transition>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition target="subFinal3">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
-
+ <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"/>
+ </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>
-
-</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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test242.scxml b/test/w3c/xpath/test242.scxml
index a6f1798..1b1fbb6 100644
--- a/test/w3c/xpath/test242.scxml
+++ b/test/w3c/xpath/test242.scxml
@@ -1,53 +1,56 @@
-<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout1" delay="1s"/>
+<?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="xpath">
+ <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">
+ <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="xpath">
+ <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="xpath">
+ <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>
- <send event="timeout2" delay="1s"/>
+ <log label="Outcome" expr="'pass'"/>
</onentry>
- <invoke type="http://www.w3.org/TR/scxml/">
- <!-- identical to test242sub1.scxml. -->
- <content>
- <scxml version="1.0" initial="subFinal1" datamodel="xpath">
- <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">
+ </final>
+ <final id="fail">
<onentry>
- <send event="timeout3" delay="1s"/>
+ <log label="Outcome" expr="'fail'"/>
</onentry>
- <invoke type="http://www.w3.org/TR/scxml/">
- <!-- identical to test242sub1.scxml. -->
- <content>
- <scxml version="1.0" initial="subFinal2" datamodel="xpath">
- <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
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test242sub1.scxml b/test/w3c/xpath/test242sub1.scxml
index 510f4a0..b528057 100644
--- a/test/w3c/xpath/test242sub1.scxml
+++ b/test/w3c/xpath/test242sub1.scxml
@@ -1,5 +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="xpath">
-
- <final id="final"/>
-
-</scxml> \ No newline at end of file
+<?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="xpath">
+ <final id="final"/>
+</scxml>
diff --git a/test/w3c/xpath/test243.scxml b/test/w3c/xpath/test243.scxml
index dceb40e..c7ae26b 100644
--- a/test/w3c/xpath/test243.scxml
+++ b/test/w3c/xpath/test243.scxml
@@ -1,36 +1,41 @@
-<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="2s"/>
+<?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="xpath">
+ <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="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="sub0">
- <transition cond="$Var1/text() =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
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <param name="Var1" expr="1"/>
+ <content>
+ <scxml version="1.0" initial="sub0" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="sub0">
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test244.scxml b/test/w3c/xpath/test244.scxml
index 307e556..2e4efa5 100644
--- a/test/w3c/xpath/test244.scxml
+++ b/test/w3c/xpath/test244.scxml
@@ -1,39 +1,45 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that datamodel values can be specified by namelist.
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="1"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="1"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="2s"/>
+ <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="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="sub0">
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="$Var1">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="sub0">
<transition cond="$Var1/text() =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
+ <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>
diff --git a/test/w3c/xpath/test245.scxml b/test/w3c/xpath/test245.scxml
index b9cbddb..332cd74 100644
--- a/test/w3c/xpath/test245.scxml
+++ b/test/w3c/xpath/test245.scxml
@@ -1,34 +1,40 @@
-<?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="xpath">
-<datamodel>
- <data id="Var2" expr="3"/>
+<?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="xpath">
+ <datamodel>
+ <data id="Var2" expr="3"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="2s"/>
+ <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="xpath">
- <state id="sub0">
- <transition cond="$Var2/* or $Var2/text()" target="subFinal">
- <send target="#_parent" event="failure"/>
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="$Var2">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <state id="sub0">
+ <transition cond="$Var2/* or $Var2/text()" 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
+ </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>
diff --git a/test/w3c/xpath/test247.scxml b/test/w3c/xpath/test247.scxml
index 16a6a5f..bee0cf5 100644
--- a/test/w3c/xpath/test247.scxml
+++ b/test/w3c/xpath/test247.scxml
@@ -1,22 +1,28 @@
-<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="2s"/>
+<?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="xpath">
+ <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="xpath">
- <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
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml version="1.0" initial="subFinal" datamodel="xpath">
+ <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>
diff --git a/test/w3c/xpath/test250.scxml b/test/w3c/xpath/test250.scxml
index 3884425..58e83c4 100644
--- a/test/w3c/xpath/test250.scxml
+++ b/test/w3c/xpath/test250.scxml
@@ -1,42 +1,39 @@
-<?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
+<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="foo"/>
+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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="foo"/>
</onentry>
-
- <invoke type="http://www.w3.org/TR/scxml/">
- <content>
- <scxml initial="sub0" version="1.0" datamodel="xpath">
- <state id="sub0" initial="sub01">
- <onentry>
- <send event="timeout" delay="2s"/>
- </onentry>
- <transition event="timeout" target="subFinal"/>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <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 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>
+ <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
+ </invoke>
+ <!-- this transition will cause the invocation to be cancelled -->
+ <transition event="foo" target="final"/>
+ </state>
+ <final id="final"/>
+</scxml>
diff --git a/test/w3c/xpath/test252.scxml b/test/w3c/xpath/test252.scxml
index 1f92127..aea9ace 100644
--- a/test/w3c/xpath/test252.scxml
+++ b/test/w3c/xpath/test252.scxml
@@ -1,47 +1,48 @@
-<?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
+<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="2s"/>
+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="xpath">
+ <state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delayexpr="'1s'"/>
</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="xpath">
- <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"/>
+ </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/">
+ <content>
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <state id="sub0">
+ <onentry>
+ <send event="timeout" delayexpr="'.5s'"/>
+ </onentry>
+ <transition event="timeout" target="subFinal"/>
+ <onexit>
+ <send target="#_parent" event="childToParent"/>
+ </onexit>
+ </state>
+ <final id="subFinal"/>
</scxml>
- </content>
+ </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
+ <!-- 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>
diff --git a/test/w3c/xpath/test253.scxml b/test/w3c/xpath/test253.scxml
index f894ea9..7a03f27 100644
--- a/test/w3c/xpath/test253.scxml
+++ b/test/w3c/xpath/test253.scxml
@@ -1,79 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the scxml event processor is used in both directions. If child process uses the
+<?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="xpath">
-<datamodel>
- <data id="Var1"/>
+'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="xpath">
+ <datamodel>
+ <data id="Var1"/>
</datamodel>
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="2s"/>
+ <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
+ <!-- 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="xpath">
- <datamodel>
- <data id="Var2"/>
- </datamodel>
- <state id="sub0">
- <onentry>
- <send target="#_parent" event="childRunning"/>
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <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/text()"/>
- </transition>
- </state>
+ <transition event="parentToChild" target="sub1">
+ <assign location="$Var2" expr="$_event/origintype/text()"/>
+ </transition>
+ </state>
<state id="sub1">
<transition cond="$Var2='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" target="subFinal">
- <send target="#_parent" event="success"/>
- </transition>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition cond="$Var2='scxml'" target="subFinal">
- <send target="#_parent" event="success"/>
- </transition>
+ <send target="#_parent" event="success"/>
+ </transition>
<transition target="subFinal">
- <send target="#_parent" event="failure"/>
- </transition>
- </state>
+ <send target="#_parent" event="failure"/>
+ </transition>
+ </state>
<final id="subFinal"/>
- </scxml>
- </content>
- </invoke>
-
+ </scxml>
+ </content>
+ </invoke>
<state id="s01">
- <transition event="childRunning" target="s02">
- <assign location="$Var1" expr="$_event/origintype/text()"/>
- </transition>
- </state>
-
+ <transition event="childRunning" target="s02">
+ <assign location="$Var1" expr="$_event/origintype/text()"/>
+ </transition>
+ </state>
<state id="s02">
-
- <transition cond="$Var1='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" target="s03">
+ <transition cond="$Var1='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" target="s03">
<send target="#_foo" event="parentToChild"/>
- </transition>
- <transition cond="$Var1='scxml'" target="s03">
+ </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
+ </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>
diff --git a/test/w3c/xpath/test276.scxml b/test/w3c/xpath/test276.scxml
index 026e0fc..8dfe67f 100644
--- a/test/w3c/xpath/test276.scxml
+++ b/test/w3c/xpath/test276.scxml
@@ -1,17 +1,22 @@
-<?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="xpath">
-
- <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
+<?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="xpath">
+ <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>
diff --git a/test/w3c/xpath/test276sub1.scxml b/test/w3c/xpath/test276sub1.scxml
index 5c6ab45..dd6743b 100644
--- a/test/w3c/xpath/test276sub1.scxml
+++ b/test/w3c/xpath/test276sub1.scxml
@@ -1,21 +1,16 @@
-<?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="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="s0">
-
-
- <transition cond="$Var1/text() =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
+<?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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="s0">
+ <transition cond="$Var1/text() =1" target="final">
+ <send target="#_parent" event="event1"/>
+ </transition>
+ <transition target="final">
+ <send target="#_parent" event="event0"/>
+ </transition>
+ </state>
+ <final id="final"/>
+</scxml>
diff --git a/test/w3c/xpath/test277.scxml b/test/w3c/xpath/test277.scxml
index 6dc520e..c894f86 100644
--- a/test/w3c/xpath/test277.scxml
+++ b/test/w3c/xpath/test277.scxml
@@ -1,28 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that platform creates undound variable if we assign an illegal value to it. Thus
- we can assign to it later in state s1. --><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" expr="!1"/>
- </datamodel>
-
- <state id="s0">
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that platform creates undound variable if we assign an illegal value to it. Thus
+ we can assign to it later in state s1. -->
+<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" expr="!1"/>
+ </datamodel>
+ <state id="s0">
<onentry>
- <raise event="foo"/>
+ <raise event="foo"/>
</onentry>
-
- <transition event="error.execution" cond="$Var1 and not($Var1/text()) and not($Var1/*)" target="s1"/>
- <transition event="*" target="fail"/>
- </state>
-
- <state id="s1">
- <onentry>
- <assign location="$Var1" expr="1"/>
- </onentry>
- <transition cond="$Var1/text() =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
+ <transition event="error.execution" cond="$Var1 and not($Var1/text()) and not($Var1/*)" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s1">
+ <onentry>
+ <assign location="$Var1" expr="1"/>
+ </onentry>
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test278.scxml b/test/w3c/xpath/test278.scxml
index 93461be..09ad31b 100644
--- a/test/w3c/xpath/test278.scxml
+++ b/test/w3c/xpath/test278.scxml
@@ -1,21 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
-
-<!-- test that a variable can be accessed from a state that is outside its lexical scope -->
-
- <state id="s0">
- <transition cond="$Var1/text() =1" target="pass"/>
-
- <transition target="fail"/>
-
- </state>
-
-<state id="s1">
- <datamodel>
- <data id="Var1" expr="1"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+ <!-- test that a variable can be accessed from a state that is outside its lexical scope -->
+ <state id="s0">
+ <transition cond="$Var1/text() =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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test279.scxml b/test/w3c/xpath/test279.scxml
index 314b927..112a2eb 100644
--- a/test/w3c/xpath/test279.scxml
+++ b/test/w3c/xpath/test279.scxml
@@ -1,21 +1,24 @@
-<?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="xpath">
-
-
- <state id="s0">
- <transition cond="$Var1/text() =1" target="pass"/>
-
- <transition target="fail"/>
-
- </state>
-
-<state id="s1">
- <datamodel>
- <data id="Var1" expr="1"/>
+<?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="xpath">
+ <state id="s0">
+ <transition cond="$Var1/text() =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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test280.scxml b/test/w3c/xpath/test280.scxml
index 79bb2e5..b61ce9c 100644
--- a/test/w3c/xpath/test280.scxml
+++ b/test/w3c/xpath/test280.scxml
@@ -1,28 +1,33 @@
-<?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
+<?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="xpath" binding="late">
-
- <datamodel>
- <data id="Var1"/>
- </datamodel>
-
- <state id="s0">
- <transition cond="$Var2 and not($Var2/text()) and not($Var2/*)" target="s1"/>
- <transition target="fail"/>
- </state>
-
-<state id="s1">
+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="xpath" binding="late">
<datamodel>
- <data id="Var2" expr="1"/>
+ <data id="Var1"/>
+ </datamodel>
+ <state id="s0">
+ <transition cond="$Var2 and not($Var2/text()) and not($Var2/*)" target="s1"/>
+ <transition target="fail"/>
+ </state>
+ <state id="s1">
+ <datamodel>
+ <data id="Var2" expr="1"/>
</datamodel>
<onentry>
- <assign location="$Var1" expr="$Var2/text()"/>
+ <assign location="$Var1" expr="$Var2/text()"/>
</onentry>
<transition cond="$Var1/text()=$Var2/text()" 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test286.scxml b/test/w3c/xpath/test286.scxml
index 53aad73..4c227ae 100644
--- a/test/w3c/xpath/test286.scxml
+++ b/test/w3c/xpath/test286.scxml
@@ -1,18 +1,23 @@
-<?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="xpath" initial="s0">
-
-
- <state id="s0">
- <onentry>
- <assign location="foo.bar.baz " 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
+<?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="xpath" initial="s0">
+ <state id="s0">
+ <onentry>
+ <assign location="foo.bar.baz " 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>
diff --git a/test/w3c/xpath/test287.scxml b/test/w3c/xpath/test287.scxml
index 9d10690..bd5d289 100644
--- a/test/w3c/xpath/test287.scxml
+++ b/test/w3c/xpath/test287.scxml
@@ -1,19 +1,24 @@
-<?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="xpath" version="1.0" initial="s0">
-
-<datamodel>
+<?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="xpath" 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/text() =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
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <assign location="$Var1" expr="1"/>
+ </onentry>
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test288.scxml b/test/w3c/xpath/test288.scxml
new file mode 100644
index 0000000..fb3c688
--- /dev/null
+++ b/test/w3c/xpath/test288.scxml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- a simple test that a legal value may be assigned to a valid data model location
+using child content -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="xpath" version="1.0" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <assign location="$Var1">123</assign>
+ </onentry>
+ <transition cond="Var1 = 123" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test294.scxml b/test/w3c/xpath/test294.scxml
index 362f2a6..289049f 100644
--- a/test/w3c/xpath/test294.scxml
+++ b/test/w3c/xpath/test294.scxml
@@ -1,46 +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="xpath" initial="s0">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="s0" initial="s01">
-
- <transition event="done.state.s0" cond="$_event/data/data[@id = 'Var1']/text()=1" target="s1">
+<?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="xpath" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="s0" initial="s01">
+ <transition event="done.state.s0" cond="$_event/data/data[@id = 'Var1']/text()=1" target="s1">
</transition>
-
- <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 name="Var1" expr="1"/>
+ <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">
+ </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 event="done.state.s1" target="fail">
</transition>
-
- <state id="s11">
- <transition target="s12"/>
- </state>
- <final id="s12">
- <donedata>
- <content>foo</content>
+ <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
+ </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>
diff --git a/test/w3c/xpath/test298.scxml b/test/w3c/xpath/test298.scxml
index 8525192..1bc91e0 100644
--- a/test/w3c/xpath/test298.scxml
+++ b/test/w3c/xpath/test298.scxml
@@ -1,27 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- reference a non-existent data model location in param in donedata and see that the right error is raised --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
- <state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="1s"/>
- </onentry>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- reference a non-existent data model location in param in donedata and see that the right error is raised -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
<transition event="error.execution" target="pass"/>
- <transition event="*" target="fail"/>
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <param name="Var3" location="foo.bar.baz "/>
+ <transition event="*" target="fail"/>
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param name="Var3" location="foo.bar.baz "/>
</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
+ </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>
diff --git a/test/w3c/xpath/test301.scxml b/test/w3c/xpath/test301.scxml
index 59125c8..0b2bd50 100644
--- a/test/w3c/xpath/test301.scxml
+++ b/test/w3c/xpath/test301.scxml
@@ -1,13 +1,19 @@
-<?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" 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
+<?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" 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>
diff --git a/test/w3c/xpath/test302.scxml b/test/w3c/xpath/test302.scxml
index 4ecb0b7..a9e1c22 100644
--- a/test/w3c/xpath/test302.scxml
+++ b/test/w3c/xpath/test302.scxml
@@ -1,15 +1,21 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that a script is evaluated at load time. <conf:script> shoudl assign the value 1 to
+<?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" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
- <script/>
-
- <state id="s0">
- <transition cond="$Var1/text() =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
+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" version="1.0" datamodel="xpath" initial="s0">
+ <script/>
+ <state id="s0">
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test303.scxml b/test/w3c/xpath/test303.scxml
index 490151a..7d028e9 100644
--- a/test/w3c/xpath/test303.scxml
+++ b/test/w3c/xpath/test303.scxml
@@ -1,20 +1,26 @@
-<?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" version="1.0" datamodel="xpath" initial="s0">
-<datamodel>
-<data id="Var1" expr="0"/>
-</datamodel>
-
- <state id="s0">
- <onentry>
- <assign location="$Var1" expr="2"/>
- <script/>
- </onentry>
- <transition cond="$Var1/text() =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
+<?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" version="1.0" datamodel="xpath" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <assign location="$Var1" expr="2"/>
+ <script/>
+ </onentry>
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test304.scxml b/test/w3c/xpath/test304.scxml
index 072b188..4ec3ff4 100644
--- a/test/w3c/xpath/test304.scxml
+++ b/test/w3c/xpath/test304.scxml
@@ -1,13 +1,19 @@
-<?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="xpath" version="1.0" initial="s0">
- <script/>
-
- <state id="s0">
- <transition cond="$Var1/text() =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
+<?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="xpath" version="1.0" initial="s0">
+ <script/>
+ <state id="s0">
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test307.scxml b/test/w3c/xpath/test307.scxml
index 369b6c8..29fde66 100644
--- a/test/w3c/xpath/test307.scxml
+++ b/test/w3c/xpath/test307.scxml
@@ -1,42 +1,35 @@
-<?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
+<?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: " expr="$Var1/text()"/>
- <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
+ <state id="s0">
+ <onentry>
+ <log label="entering s0 value of Var 1 is: " expr="$Var1/text()"/>
+ <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>
diff --git a/test/w3c/xpath/test309.scxml b/test/w3c/xpath/test309.scxml
index b2ad07d..1b3c96b 100644
--- a/test/w3c/xpath/test309.scxml
+++ b/test/w3c/xpath/test309.scxml
@@ -1,12 +1,18 @@
-<?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="xpath" initial="s0">
-
-<state id="s0">
- <transition cond="==!*" target="fail"/>
- <transition target="pass"/>
+<?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="xpath" initial="s0">
+ <state id="s0">
+ <transition cond="==!*" 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test310.scxml b/test/w3c/xpath/test310.scxml
index 59e5bf0..0f9c3b4 100644
--- a/test/w3c/xpath/test310.scxml
+++ b/test/w3c/xpath/test310.scxml
@@ -1,18 +1,21 @@
-<?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="xpath" 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
+<?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="xpath" 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>
diff --git a/test/w3c/xpath/test311.scxml b/test/w3c/xpath/test311.scxml
index 1353b3e..9fe21bb 100644
--- a/test/w3c/xpath/test311.scxml
+++ b/test/w3c/xpath/test311.scxml
@@ -1,17 +1,22 @@
-<?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="xpath" initial="s0">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="1s"/>
- <assign location="foo.bar.baz " 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
+<?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="xpath" initial="s0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ <assign location="foo.bar.baz " 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>
diff --git a/test/w3c/xpath/test312.scxml b/test/w3c/xpath/test312.scxml
index 45ed889..5c1f790 100644
--- a/test/w3c/xpath/test312.scxml
+++ b/test/w3c/xpath/test312.scxml
@@ -1,20 +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" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
-
-<datamodel>
- <data id="Var1" expr="1"/>
- </datamodel>
-
-<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
+<?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="xpath" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+ <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>
diff --git a/test/w3c/xpath/test313.scxml b/test/w3c/xpath/test313.scxml
index 0816115..34d943a 100644
--- a/test/w3c/xpath/test313.scxml
+++ b/test/w3c/xpath/test313.scxml
@@ -1,21 +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" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
-
-<datamodel>
- <data id="Var1" expr="1"/>
- </datamodel>
-
-<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
+<?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="xpath" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="1"/>
+ </datamodel>
+ <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>
diff --git a/test/w3c/xpath/test314.scxml b/test/w3c/xpath/test314.scxml
index 2d16107..14c0504 100644
--- a/test/w3c/xpath/test314.scxml
+++ b/test/w3c/xpath/test314.scxml
@@ -1,34 +1,35 @@
-<?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="xpath" initial="s0">
-<datamodel>
- <data id="Var1" expr="1"/>
- </datamodel>
-
-
-<state id="s0" initial="s01">
- <transition event="error.execution" target="fail"/>
-
- <state id="s01">
+<?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="xpath" 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="!1"/>
- <raise event="foo"/>
- </onentry>
- <transition event="error.execution" target="pass"/>
- <transition event=".*" target="fail"/>
+ <state id="s02">
+ <transition target="s03"/>
+ </state>
+ <state id="s03">
+ <onentry>
+ <assign location="$Var1" expr="!1"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.execution" target="pass"/>
+ <transition event=".*" target="fail"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test318.scxml b/test/w3c/xpath/test318.scxml
index 2ee56d8..b1b8d61 100644
--- a/test/w3c/xpath/test318.scxml
+++ b/test/w3c/xpath/test318.scxml
@@ -1,27 +1,32 @@
-<?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="xpath" 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/text()"/>
+<?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="xpath" name="machineName">
+ <datamodel>
+ <data id="Var1"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
</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
+ <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/text()"/>
+ </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>
diff --git a/test/w3c/xpath/test319.scxml b/test/w3c/xpath/test319.scxml
index f168e1a..12bbd80 100644
--- a/test/w3c/xpath/test319.scxml
+++ b/test/w3c/xpath/test319.scxml
@@ -1,20 +1,25 @@
-<?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="xpath" version="1.0" name="machineName">
-
- <state id="s0">
- <onentry>
- <if cond="$_event/text()">
- <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
+<?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="xpath" version="1.0" name="machineName">
+ <state id="s0">
+ <onentry>
+ <if cond="$_event/text()">
+ <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>
diff --git a/test/w3c/xpath/test321.scxml b/test/w3c/xpath/test321.scxml
index 8905752..962ca36 100644
--- a/test/w3c/xpath/test321.scxml
+++ b/test/w3c/xpath/test321.scxml
@@ -1,15 +1,21 @@
-<?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="xpath" version="1.0" name="machineName">
-<datamodel>
- <data id="Var1" expr="$_sessionid"/>
+<?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="xpath" version="1.0" name="machineName">
+ <datamodel>
+ <data id="Var1" expr="$_sessionid"/>
</datamodel>
-
- <state id="s0">
-<transition cond="$Var1/* or $Var1/text()" 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
+ <state id="s0">
+ <transition cond="$Var1/* or $Var1/text()" 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>
diff --git a/test/w3c/xpath/test322.scxml b/test/w3c/xpath/test322.scxml
index 437ff93..bccb27b 100644
--- a/test/w3c/xpath/test322.scxml
+++ b/test/w3c/xpath/test322.scxml
@@ -1,33 +1,34 @@
-<?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="xpath" version="1.0" name="machineName">
-<datamodel>
- <data id="Var1" expr="$_sessionid"/>
- <data id="Var2"/>
+<?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="xpath" 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"/>
+ <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"/>
- </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
+ <transition event="error.execution" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s2">
+ <transition cond="$Var1=$_sessionid" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test323.scxml b/test/w3c/xpath/test323.scxml
index 76a519f..716b566 100644
--- a/test/w3c/xpath/test323.scxml
+++ b/test/w3c/xpath/test323.scxml
@@ -1,15 +1,21 @@
-<?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="xpath" name="machineName">
-<datamodel>
- <data id="Var1" expr="$_name"/>
+<?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="xpath" name="machineName">
+ <datamodel>
+ <data id="Var1" expr="$_name"/>
</datamodel>
-
- <state id="s0">
-<transition cond="$Var1/* or $Var1/text()" 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
+ <state id="s0">
+ <transition cond="$Var1/* or $Var1/text()" 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>
diff --git a/test/w3c/xpath/test324.scxml b/test/w3c/xpath/test324.scxml
index c3493e3..eff2f68 100644
--- a/test/w3c/xpath/test324.scxml
+++ b/test/w3c/xpath/test324.scxml
@@ -1,21 +1,25 @@
-<?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="xpath" name="machineName">
-
-
- <state id="s0">
- <transition cond="$_name/text() = 'machineName'" target="s1"/>
+<?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="xpath" name="machineName">
+ <state id="s0">
+ <transition cond="$_name/text() = 'machineName'" target="s1"/>
<transition target="fail"/>
- </state>
-
- <state id="s1">
- <onentry>
- <assign location="$_name" expr="'otherName'"/>
+ </state>
+ <state id="s1">
+ <onentry>
+ <assign location="$_name" expr="'otherName'"/>
</onentry>
- <transition cond="$_name/text() = '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
+ <transition cond="$_name/text() = '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>
diff --git a/test/w3c/xpath/test325.scxml b/test/w3c/xpath/test325.scxml
index b85b47a..82f71c2 100644
--- a/test/w3c/xpath/test325.scxml
+++ b/test/w3c/xpath/test325.scxml
@@ -1,18 +1,23 @@
-<?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
+<?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="xpath" version="1.0" name="machineName">
-<datamodel>
- <data id="Var1" expr="$_ioprocessors"/>
+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="xpath" version="1.0" name="machineName">
+ <datamodel>
+ <data id="Var1" expr="$_ioprocessors"/>
</datamodel>
-
-
- <state id="s0">
- <transition cond="$Var1/* or $Var1/text()" 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
+ <state id="s0">
+ <transition cond="$Var1/* or $Var1/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test326.scxml b/test/w3c/xpath/test326.scxml
index f6f69bc..4e08dcb 100644
--- a/test/w3c/xpath/test326.scxml
+++ b/test/w3c/xpath/test326.scxml
@@ -1,35 +1,37 @@
-<?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="xpath" version="1.0" name="machineName">
-<datamodel>
- <data id="Var1" expr="$_ioprocessors"/>
- <data id="Var2"/>
+<?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="xpath" version="1.0" name="machineName">
+ <datamodel>
+ <data id="Var1" expr="$_ioprocessors"/>
+ <data id="Var2"/>
</datamodel>
-
- <state id="s0">
- <transition cond="$Var1/* or $Var1/text()" target="s1"/>
- <transition cond="true()" target="fail"/>
- </state>
-
-
- <state id="s1">
- <onentry>
- <assign location="$_ioprocessors" expr="'otherName'"/>
- <raise event="foo"/>
+ <state id="s0">
+ <transition cond="$Var1/* or $Var1/text()" 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
+ <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>
diff --git a/test/w3c/xpath/test329.scxml b/test/w3c/xpath/test329.scxml
index ad62f10..27ec11d 100644
--- a/test/w3c/xpath/test329.scxml
+++ b/test/w3c/xpath/test329.scxml
@@ -1,53 +1,54 @@
-<?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="xpath" 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"/>
+<?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="xpath" 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 cond="$Var2=$_event" target="s2"/>
- <transition target="fail"/>
- </state>
-
-<state id="s2">
- <onentry>
- <assign location="$Var3" expr="$_name"/>
- <assign location="$_name" expr="27"/>
+ <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="$Var3=$_name" target="s3"/>
- <transition target="fail"/>
- </state>
-
-
-<state id="s3">
- <onentry>
- <assign location="$Var4" expr="$_ioprocessors"/>
- <assign location="$_ioprocessors" expr="27"/>
+ <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="$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
+ <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>
diff --git a/test/w3c/xpath/test330.scxml b/test/w3c/xpath/test330.scxml
index c95befd..133400c 100644
--- a/test/w3c/xpath/test330.scxml
+++ b/test/w3c/xpath/test330.scxml
@@ -1,23 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- check that the required fields are present in both internal and external events --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" name="machineName">
-
- <state id="s0">
- <onentry>
- <raise event="foo"/>
- </onentry>
- <transition event="foo" cond="$_event/name and $_event/type and $_event/sendid and $_event/origin and $_event/origintype and $_event/invokeid and $_event/data" target="s1"/>
- <transition event="*" target="fail"/>
- </state>
-
- <state id="s1">
- <onentry>
- <send event="foo"/>
- </onentry>
- <transition event="foo" cond="$_event/name and $_event/type and $_event/sendid and $_event/origin and $_event/origintype and $_event/invokeid and $_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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- check that the required fields are present in both internal and external events -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" name="machineName">
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" cond="$_event/name and $_event/type and $_event/sendid and $_event/origin and $_event/origintype and $_event/invokeid and $_event/data" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s1">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" cond="$_event/name and $_event/type and $_event/sendid and $_event/origin and $_event/origintype and $_event/invokeid and $_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>
diff --git a/test/w3c/xpath/test331.scxml b/test/w3c/xpath/test331.scxml
index e887869..da63a49 100644
--- a/test/w3c/xpath/test331.scxml
+++ b/test/w3c/xpath/test331.scxml
@@ -1,60 +1,59 @@
-<?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="xpath" 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/text()"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
-<state id="s1">
- <transition cond="$Var1='internal'" target="s2"/>
- <transition target="fail"/>
+<?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="xpath" 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/text()"/>
+ </transition>
+ <transition event="*" target="fail"/>
</state>
-
-<state id="s2">
- <onentry>
- <!-- this will generate an error, which is a platform event -->
- <assign location="foo.bar.baz " expr="1"/>
- </onentry>
- <transition event="error" target="s3">
- <assign location="$Var1" expr="$_event/type/text()"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
-<state id="s3">
- <transition cond="$Var1='platform'" target="s4"/>
- <transition target="fail"/>
+ <state id="s1">
+ <transition cond="$Var1='internal'" target="s2"/>
+ <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/text()"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
-<state id="s5">
- <transition cond="$Var1='external'" target="pass"/>
- <transition target="fail"/>
+ <state id="s2">
+ <onentry>
+ <!-- this will generate an error, which is a platform event -->
+ <assign location="foo.bar.baz " expr="1"/>
+ </onentry>
+ <transition event="error" target="s3">
+ <assign location="$Var1" expr="$_event/type/text()"/>
+ </transition>
+ <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
+ <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/text()"/>
+ </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>
diff --git a/test/w3c/xpath/test332.scxml b/test/w3c/xpath/test332.scxml
index 248f953..3a3cbcf 100644
--- a/test/w3c/xpath/test332.scxml
+++ b/test/w3c/xpath/test332.scxml
@@ -1,29 +1,34 @@
-<?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="xpath" name="machineName">
- <datamodel>
- <data id="Var1"/>
+<?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="xpath" 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/text()"/>
- </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/text()=$Var2/text()" target="pass"/>
- <transition target="fail"/>
+ </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/text()"/>
+ </transition>
+ <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
+ <state id="s1">
+ <!-- make sure that the sendid in the error event matches the one generated when send executed -->
+ <transition cond="$Var1/text()=$Var2/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test333.scxml b/test/w3c/xpath/test333.scxml
index aff67bc..82fe462 100644
--- a/test/w3c/xpath/test333.scxml
+++ b/test/w3c/xpath/test333.scxml
@@ -1,16 +1,21 @@
-<?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="xpath" name="machineName">
-
- <state id="s0">
- <onentry>
- <send event="foo"/>
- </onentry>
- <transition event="foo" cond="not(string($_event/sendid))" 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
+<?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="xpath" name="machineName">
+ <state id="s0">
+ <onentry>
+ <send event="foo"/>
+ </onentry>
+ <transition event="foo" cond="not(string($_event/sendid))" 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>
diff --git a/test/w3c/xpath/test335.scxml b/test/w3c/xpath/test335.scxml
index 004a688..5b3de82 100644
--- a/test/w3c/xpath/test335.scxml
+++ b/test/w3c/xpath/test335.scxml
@@ -1,16 +1,21 @@
-<?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="xpath" name="machineName">
-
- <state id="s0">
- <onentry>
- <raise event="foo"/>
- </onentry>
- <transition event="foo" cond="not(string($_event/origin))" 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
+<?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="xpath" name="machineName">
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" cond="not(string($_event/origin))" 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>
diff --git a/test/w3c/xpath/test336.scxml b/test/w3c/xpath/test336.scxml
index 0ec410a..86074ee 100644
--- a/test/w3c/xpath/test336.scxml
+++ b/test/w3c/xpath/test336.scxml
@@ -1,25 +1,31 @@
-<?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="xpath" version="1.0" name="machineName">
-
- <state id="s0">
- <onentry>
- <send event="foo"/>
- </onentry>
- <transition event="foo" target="s1">
- <send event="bar" targetexpr="$_event/origin/text()" typeexpr="$_event/origintype/text()"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
-<state id="s1">
- <onentry>
- <send event="baz"/>
+<?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="xpath" version="1.0" name="machineName">
+ <state id="s0">
+ <onentry>
+ <send event="foo"/>
</onentry>
- <transition event="bar" target="pass"/>
- <transition event="*" target="fail"/>
+ <transition event="foo" target="s1">
+ <send event="bar" targetexpr="$_event/origin/text()" typeexpr="$_event/origintype/text()"/>
+ </transition>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test337.scxml b/test/w3c/xpath/test337.scxml
index 5bb900e..798b11b 100644
--- a/test/w3c/xpath/test337.scxml
+++ b/test/w3c/xpath/test337.scxml
@@ -1,16 +1,21 @@
-<?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="xpath" version="1.0" name="machineName">
-
- <state id="s0">
- <onentry>
- <raise event="foo"/>
- </onentry>
- <transition event="foo" cond="not(string($_event/origintype))" 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
+<?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="xpath" version="1.0" name="machineName">
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" cond="not(string($_event/origintype))" 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>
diff --git a/test/w3c/xpath/test338.scxml b/test/w3c/xpath/test338.scxml
index d434749..4b973cd 100644
--- a/test/w3c/xpath/test338.scxml
+++ b/test/w3c/xpath/test338.scxml
@@ -1,39 +1,43 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1"/>
- <data id="Var2"/>
+<?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="xpath">
+ <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="xpath" name="machineName">
- <final id="sub0">
- <onentry>
- <send target="#_parent" event="event1"/>
- </onentry>
- </final>
- </scxml>
+ <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="xpath" 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/text()"/>
- </transition>
- <transition event="event0" target="fail"/>
- </state>
-
-<state id="s1">
- <transition cond="$Var1/text()=$Var2/text()" target="pass"/>
- <transition target="fail"/>
+ <transition event="event1" target="s1">
+ <assign location="$Var2" expr="$_event/invokeid/text()"/>
+ </transition>
+ <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
+ <state id="s1">
+ <transition cond="$Var1/text()=$Var2/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test339.scxml b/test/w3c/xpath/test339.scxml
index 225b64f..a6bf0c7 100644
--- a/test/w3c/xpath/test339.scxml
+++ b/test/w3c/xpath/test339.scxml
@@ -1,16 +1,21 @@
-<?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="xpath" name="machineName">
-
- <state id="s0">
- <onentry>
- <raise event="foo"/>
- </onentry>
- <transition event="foo" cond="not(string($_event/invokeid))" 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
+<?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="xpath" name="machineName">
+ <state id="s0">
+ <onentry>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="foo" cond="not(string($_event/invokeid))" 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>
diff --git a/test/w3c/xpath/test342.scxml b/test/w3c/xpath/test342.scxml
index 5dd9b3d..db3db1a 100644
--- a/test/w3c/xpath/test342.scxml
+++ b/test/w3c/xpath/test342.scxml
@@ -1,25 +1,31 @@
-<?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="xpath" 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">
+<?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="xpath" 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/text()"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
-<state id="s1">
- <transition cond="$Var1/text()=$Var2/text()" 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
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s1">
+ <transition cond="$Var1/text()=$Var2/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test343.scxml b/test/w3c/xpath/test343.scxml
index e3dbf53..904f47a 100644
--- a/test/w3c/xpath/test343.scxml
+++ b/test/w3c/xpath/test343.scxml
@@ -1,34 +1,35 @@
-<?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="xpath" 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">
+<?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="xpath" 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="foo.bar.baz " name="someParam"/>
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param location="foo.bar.baz " name="someParam"/>
</donedata>
- </final>
+ </final>
</state>
-
-
- <!-- if we get here, we received the error event. Now check that the done
+ <!-- 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="not($_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
+ <state id="s1">
+ <transition event="done.state.s0" cond="not($_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>
diff --git a/test/w3c/xpath/test344.scxml b/test/w3c/xpath/test344.scxml
index 15f744e..476383c 100644
--- a/test/w3c/xpath/test344.scxml
+++ b/test/w3c/xpath/test344.scxml
@@ -1,23 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that a cond expression that cannot be evaluated as a
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that a cond expression that cannot be evaluated as a
boolean cond expression evaluates to false and causes error.execution to be raised.
In some languages, any valid expression/object can be converted to a boolean, so conf:nonBoolean will
-have to be mapped onto something that produces a syntax error or something similarly invalid --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
-
-<state id="s0">
- <transition cond="==!*" target="fail"/>
- <transition target="s1"/>
+have to be mapped onto something that produces a syntax error or something similarly invalid -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" datamodel="xpath" initial="s0">
+ <state id="s0">
+ <transition cond="==!*" target="fail"/>
+ <transition target="s1"/>
</state>
-
-<state id="s1">
- <onentry>
- <raise event="foo"/>
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
</onentry>
- <transition event="error.execution" target="pass"/>
- <transition event="*" target="fail"/>
+ <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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test346.scxml b/test/w3c/xpath/test346.scxml
index 5be7844..8db5662 100644
--- a/test/w3c/xpath/test346.scxml
+++ b/test/w3c/xpath/test346.scxml
@@ -1,53 +1,54 @@
-<?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.
+<?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="xpath" name="machineName">
-
-
- <state id="s0">
- <onentry>
- <assign location="$_sessionid" expr="'otherName'"/>
- <raise event="event1"/>
+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="xpath" 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"/>
+ <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
+ <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"/>
+ <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"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test347.scxml b/test/w3c/xpath/test347.scxml
index 011f65f..ce1df79 100644
--- a/test/w3c/xpath/test347.scxml
+++ b/test/w3c/xpath/test347.scxml
@@ -1,40 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the scxml event I/O processor works by sending events back and forth between an invoked child
-and its parent process --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-
-<state id="s0" initial="s01">
- <invoke id="child" type="scxml">
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that the scxml event I/O processor works by sending events back and forth between an invoked child
+and its parent process -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0" initial="s01">
+ <invoke id="child" type="scxml">
<content>
- <scxml initial="sub0" version="1.0" datamodel="xpath" name="machineName">
- <state id="sub0">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_parent" event="childToParent"/>
- </onentry>
- <transition event="parentToChild" target="subFinal"/>
- </state>
- <final id="subFinal"/>
- </scxml>
- </content>
- </invoke>
- <onentry>
- <send delay="20s" event="timeout"/>
- </onentry>
- <transition event="timeout" target="fail"/>
-
- <state id="s01">
+ <scxml initial="sub0" version="1.0" datamodel="xpath" name="machineName">
+ <state id="sub0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_parent" event="childToParent"/>
+ </onentry>
+ <transition event="parentToChild" target="subFinal"/>
+ </state>
+ <final id="subFinal"/>
+ </scxml>
+ </content>
+ </invoke>
+ <onentry>
+ <send delay="20s" event="timeout"/>
+ </onentry>
+ <transition event="timeout" target="fail"/>
+ <state id="s01">
<transition event="childToParent" target="s02"/>
- </state>
-
- <state id="s02">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_child" event="parentToChild"/>
- </onentry>
- <transition event="done.invoke" target="pass"/>
- <transition event="error" 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
+ </state>
+ <state id="s02">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="#_child" event="parentToChild"/>
+ </onentry>
+ <transition event="done.invoke" target="pass"/>
+ <transition event="error" 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>
diff --git a/test/w3c/xpath/test348.scxml b/test/w3c/xpath/test348.scxml
index d55f797..dd09aa4 100644
--- a/test/w3c/xpath/test348.scxml
+++ b/test/w3c/xpath/test348.scxml
@@ -1,18 +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" datamodel="xpath" version="1.0">
-
- <!-- test that event param of send sets the name of the event -->
-
-<state id="s0">
-
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="pass"/>
- <transition event="*" target="fail"/>
-
-</state>
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+<?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" datamodel="xpath" version="1.0">
+ <!-- test that event param of send sets the name of the event -->
+ <state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test349.scxml b/test/w3c/xpath/test349.scxml
index b162edc..2b11ff3 100644
--- a/test/w3c/xpath/test349.scxml
+++ b/test/w3c/xpath/test349.scxml
@@ -1,29 +1,33 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that value in origin field can be used to send an event back to the sender --><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"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that value in origin field can be used to send an event back to the sender -->
+<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"/>
</datamodel>
-
-<state id="s0">
-
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="s2">
- <assign location="$Var1" expr="$_event/origin/text()"/>
+ <state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="s2">
+ <assign location="$Var1" expr="$_event/origin/text()"/>
</transition>
- <transition event="*" target="fail"/>
-
-</state>
-
-<state id="s2">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="$Var1" event="s0Event2"/>
- </onentry>
- <transition event="s0Event2" 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
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s2">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="$Var1" event="s0Event2"/>
+ </onentry>
+ <transition event="s0Event2" 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>
diff --git a/test/w3c/xpath/test350.scxml b/test/w3c/xpath/test350.scxml
index 848ed71..d29783d 100644
--- a/test/w3c/xpath/test350.scxml
+++ b/test/w3c/xpath/test350.scxml
@@ -1,24 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that target value is used to decide what session to deliver the event to. A session should be
-able to send an event to itself using its own session ID as the target --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="'#_scxml_'"/>
- <data id="Var2" expr="$_sessionid"/>
-</datamodel>
-
-<state id="s0">
-
- <onentry>
- <assign location="$Var1" expr="concat($Var1, $Var2)"/>
- <send delay="5s" event="timeout"/>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="$Var1" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="pass"/>
- <transition event="*" target="fail"/>
-
-</state>
-
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that target value is used to decide what session to deliver the event to. A session should be
+able to send an event to itself using its own session ID as the target -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="'#_scxml_'"/>
+ <data id="Var2" expr="$_sessionid"/>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <assign location="$Var1" expr="concat($Var1, $Var2)"/>
+ <send delay="5s" event="timeout"/>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" targetexpr="$Var1" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test351.scxml b/test/w3c/xpath/test351.scxml
index f75fab3..ece63f7 100644
--- a/test/w3c/xpath/test351.scxml
+++ b/test/w3c/xpath/test351.scxml
@@ -1,48 +1,47 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that sendid is set in event if present in send, blank otherwise --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-<datamodel>
- <data id="Var1"/>
- <data id="Var2"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that sendid is set in event if present in send, blank otherwise -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1"/>
+ <data id="Var2"/>
</datamodel>
-
-
-<state id="s0">
-
- <onentry>
- <send delay="5s" event="timeout"/>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" id="send1" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="s1">
- <assign location="$Var1" expr="$_event/sendid/text()"/>
+ <state id="s0">
+ <onentry>
+ <send delay="5s" event="timeout"/>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" id="send1" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="s1">
+ <assign location="$Var1" expr="$_event/sendid/text()"/>
</transition>
- <transition event="*" target="fail">
+ <transition event="*" target="fail">
</transition>
-
-</state>
-
-<state id="s1">
- <transition cond="$Var1='send1'" target="s2"/>
- <transition target="fail"/>
- </state>
-
-<state id="s2">
-
- <onentry>
- <send delay="5s" event="timeout"/>
+ </state>
+ <state id="s1">
+ <transition cond="$Var1='send1'" target="s2"/>
+ <transition target="fail"/>
+ </state>
+ <state id="s2">
+ <onentry>
+ <send delay="5s" event="timeout"/>
<send event="s0Event2"/>
- </onentry>
- <transition event="s0Event2" target="s3">
- <assign location="$Var2" expr="$_event/sendid/text()"/>
+ </onentry>
+ <transition event="s0Event2" target="s3">
+ <assign location="$Var2" expr="$_event/sendid/text()"/>
</transition>
- <transition event="*" target="fail"/>
-</state>
-
-<state id="s3">
- <transition cond="not($Var2/text() or $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
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s3">
+ <transition cond="not($Var2/text() or $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>
diff --git a/test/w3c/xpath/test352.scxml b/test/w3c/xpath/test352.scxml
index b8ea732..83de449 100644
--- a/test/w3c/xpath/test352.scxml
+++ b/test/w3c/xpath/test352.scxml
@@ -1,29 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test the origintype is 'http://www.w3.org/TR/scxml/#SCXMLEventProcessor' --><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"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test the origintype is 'http://www.w3.org/TR/scxml/#SCXMLEventProcessor' -->
+<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"/>
</datamodel>
-
-
-<state id="s0">
- <onentry>
- <send delay="5s" event="timeout"/>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
- </onentry>
- <transition event="s0Event" target="s1">
- <assign location="$Var1" expr="$_event/origintype/text()"/>
+ <state id="s0">
+ <onentry>
+ <send delay="5s" event="timeout"/>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="s0Event"/>
+ </onentry>
+ <transition event="s0Event" target="s1">
+ <assign location="$Var1" expr="$_event/origintype/text()"/>
</transition>
- <transition event="*" target="fail">
+ <transition event="*" target="fail">
</transition>
-
-</state>
-
-<state id="s1">
- <transition cond="$Var1='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" 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
+ </state>
+ <state id="s1">
+ <transition cond="$Var1='http://www.w3.org/TR/scxml/#SCXMLEventProcessor'" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test354.scxml b/test/w3c/xpath/test354.scxml
index e75d382..1726250 100644
--- a/test/w3c/xpath/test354.scxml
+++ b/test/w3c/xpath/test354.scxml
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that event.data can be populated using both namelist, param and <content>
-and that correct values are used --><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" expr="1"/>
- <data id="Var2"/>
- <data id="Var3"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that event.data can be populated using both namelist, param and <content>
+and that correct values are used -->
+<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" expr="1"/>
+ <data id="Var2"/>
+ <data id="Var3"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send delay="5s" event="timeout"/>
- <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" namelist="$Var1">
- <param name="param1" expr="2"/>
- </send>
- </onentry>
- <transition event="event1" target="s1">
- <assign location="$Var2" expr="$_event/data/data[@id=Var'1']/data/text()"/>
- <assign location="$Var3" expr="$_event/data/data[@id='param1']/text()"/>
+ <state id="s0">
+ <onentry>
+ <send delay="5s" event="timeout"/>
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" namelist="$Var1">
+ <param name="param1" expr="2"/>
+ </send>
+ </onentry>
+ <transition event="event1" target="s1">
+ <assign location="$Var2" expr="$_event/data/data[@id=Var'1']/data/text()"/>
+ <assign location="$Var3" expr="$_event/data/data[@id='param1']/text()"/>
</transition>
- <transition event="*" target="fail">
+ <transition event="*" target="fail">
</transition>
-
-</state>
-
-<state id="s1">
-
- <transition cond="$Var2/text() =1" target="s2"/>
- <transition target="fail"/>
</state>
-
-<state id="s2">
+ <state id="s1">
+ <transition cond="$Var2/text() =1" target="s2"/>
+ <transition target="fail"/>
+ </state>
+ <state id="s2">
<transition cond="$Var3/text() =2" target="s3"/>
- <transition target="fail"/>
+ <transition target="fail"/>
</state>
-
-<state id="s3">
- <onentry>
- <send delay="5s" event="timeout"/>
- <send event="event2">
- <content>123</content>
+ <state id="s3">
+ <onentry>
+ <send delay="5s" event="timeout"/>
+ <send event="event2">
+ <content>123</content>
</send>
- </onentry>
- <transition event="event2" 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
+ </onentry>
+ <transition event="event2" 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>
diff --git a/test/w3c/xpath/test355.scxml b/test/w3c/xpath/test355.scxml
index af1dda6..33852d7 100644
--- a/test/w3c/xpath/test355.scxml
+++ b/test/w3c/xpath/test355.scxml
@@ -1,14 +1,20 @@
-<?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="xpath" 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
+<?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="xpath" 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>
diff --git a/test/w3c/xpath/test364.scxml b/test/w3c/xpath/test364.scxml
index 1130c72..e07b408 100644
--- a/test/w3c/xpath/test364.scxml
+++ b/test/w3c/xpath/test364.scxml
@@ -1,73 +1,79 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that default initial states are entered when a compound state is entered. First we test
+<?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="xpath" initial="s1" version="1.0">
-
-<state id="s1" initial="s11p112 s11p122">
- <onentry>
- <send event="timeout" delay="1s"/>
+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="xpath" 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"/>
+ <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>
+ <state id="s11p12" initial="s11p121">
+ <state id="s11p121"/>
+ <state id="s11p122">
+ <transition event="In-s11p112" target="s2"/>
+ </state>
+ </state>
</parallel>
+ </state>
</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 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>
+ </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>
-</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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test372.scxml b/test/w3c/xpath/test372.scxml
index 3ddecb6..b7a3680 100644
--- a/test/w3c/xpath/test372.scxml
+++ b/test/w3c/xpath/test372.scxml
@@ -1,28 +1,33 @@
-<?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="xpath" version="1.0">
-
-<datamodel>
- <data id="Var1" expr="1"/>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="1"/>
</datamodel>
-
-<state id="s0" initial="s0final">
- <onentry>
- <send event="timeout" delay="1s"/>
+ <state id="s0" initial="s0final">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+ <transition event="done.state.s0" cond="$Var1/text() =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>
- <transition event="done.state.s0" cond="$Var1/text() =2" target="pass"/>
- <transition event="*" target="fail"/>
-
- <final id="s0final">
+ </final>
+ <final id="fail">
<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
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test375.scxml b/test/w3c/xpath/test375.scxml
index b093149..84a3326 100644
--- a/test/w3c/xpath/test375.scxml
+++ b/test/w3c/xpath/test375.scxml
@@ -1,26 +1,28 @@
-<?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="xpath" version="1.0">
-
-
-
-<state id="s0">
- <onentry>
- <raise event="event1"/>
+<?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="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <raise event="event1"/>
</onentry>
- <onentry>
- <raise event="event2"/>
+ <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"/>
+ <transition event="event1" target="s1"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test376.scxml b/test/w3c/xpath/test376.scxml
index 3f6edc5..3ed7d7a 100644
--- a/test/w3c/xpath/test376.scxml
+++ b/test/w3c/xpath/test376.scxml
@@ -1,22 +1,28 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="1"/>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <send target="baz" event="event1"/>
+<?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="xpath" 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>
+ <assign location="$Var1" expr="$Var1 + 1"/>
</onentry>
-
- <transition cond="$Var1/text() =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
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test377.scxml b/test/w3c/xpath/test377.scxml
index 1d2140f..f0dfe83 100644
--- a/test/w3c/xpath/test377.scxml
+++ b/test/w3c/xpath/test377.scxml
@@ -1,31 +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="xpath" version="1.0">
-
-
-
-<state id="s0">
- <onexit>
- <raise event="event1"/>
+<?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="xpath" version="1.0">
+ <state id="s0">
+ <onexit>
+ <raise event="event1"/>
</onexit>
- <onexit>
- <raise event="event2"/>
+ <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
+ <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>
diff --git a/test/w3c/xpath/test378.scxml b/test/w3c/xpath/test378.scxml
index 08fd658..ed4fd3d 100644
--- a/test/w3c/xpath/test378.scxml
+++ b/test/w3c/xpath/test378.scxml
@@ -1,25 +1,31 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1" expr="1"/>
- </datamodel>
-
-<state id="s0">
- <onexit>
- <send target="baz" event="event1"/>
+<?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="xpath">
+ <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>
+ <assign location="$Var1" expr="$Var1 + 1"/>
</onexit>
-
-<transition target="s1"/>
-</state>
-
-<state id="s1">
- <transition cond="$Var1/text() =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
+ <transition target="s1"/>
+ </state>
+ <state id="s1">
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test387.scxml b/test/w3c/xpath/test387.scxml
index 7b59d23..4957a11 100644
--- a/test/w3c/xpath/test387.scxml
+++ b/test/w3c/xpath/test387.scxml
@@ -1,97 +1,93 @@
-<?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
+<?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="xpath">
-
-
-<state id="s0" initial="s01">
-
- <transition event="enteringS011" target="s4"/>
- <transition event="*" target="fail"/>
-
- <history type="shallow" id="s0HistShallow">
- <transition target="s01"/>
+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="xpath">
+ <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 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"/>
+ <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>
- <state id="s02" initial="s021">
- <state id="s021">
- <onentry>
- <raise event="enteringS021"/>
- </onentry>
- </state>
- <state id="s022">
- <onentry>
- <raise event="enteringS022"/>
+ <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>
-
-<state id="s1" initial="s11">
-
- <transition event="enteringS122" target="pass"/>
- <transition event="*" target="fail"/>
-
- <history type="shallow" id="s1HistShallow">
- <transition target="s11"/>
+ <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 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"/>
+ <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>
- <state id="s12" initial="s121">
- <state id="s121">
- <onentry>
- <raise event="enteringS121"/>
- </onentry>
- </state>
- <state id="s122">
- <onentry>
- <raise event="enteringS122"/>
+ <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>
-
-
-<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
+ <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>
diff --git a/test/w3c/xpath/test388.scxml b/test/w3c/xpath/test388.scxml
index 87e8c53..36278d5 100644
--- a/test/w3c/xpath/test388.scxml
+++ b/test/w3c/xpath/test388.scxml
@@ -1,76 +1,74 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that history states works correctly. The counter Var1 counts how many times
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="0"/>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
</datamodel>
-
-<state id="s0" initial="s01">
- <onentry>
- <assign location="$Var1" expr="$Var1 + 1"/>
+ <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/text() =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/text() =2" target="s2"/>
+ <!-- the first time through, go to s1, setting a timer just in case something hangs -->
+ <transition event="entering.s012" cond="$Var1/text() =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/text() =2" target="s2"/>
<transition event="entering" cond="$Var1/text() =2" target="fail"/>
-
- <!-- the third time we should get entering-s011. If so, pass, otherwise fail -->
- <transition event="entering.s011" cond="$Var1/text() =3" target="pass"/>
- <transition event="entering" cond="$Var1/text() =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"/>
+ <!-- the third time we should get entering-s011. If so, pass, otherwise fail -->
+ <transition event="entering.s011" cond="$Var1/text() =3" target="pass"/>
+ <transition event="entering" cond="$Var1/text() =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 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"/>
+ <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>
- <state id="s02" initial="s021">
- <state id="s021">
- <onentry>
- <raise event="entering.s021"/>
- </onentry>
- </state>
- <state id="s022">
- <onentry>
- <raise event="entering.s022"/>
+ <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>
-
-
-<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
+ <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>
diff --git a/test/w3c/xpath/test396.scxml b/test/w3c/xpath/test396.scxml
index aa94936..e878e72 100644
--- a/test/w3c/xpath/test396.scxml
+++ b/test/w3c/xpath/test396.scxml
@@ -1,16 +1,21 @@
-<?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="xpath" version="1.0">
-
-<state id="s0">
- <onentry>
- <raise event="foo"/>
+<?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="xpath" 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
+ <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>
diff --git a/test/w3c/xpath/test399.scxml b/test/w3c/xpath/test399.scxml
index 922527f..2b5b7ed 100644
--- a/test/w3c/xpath/test399.scxml
+++ b/test/w3c/xpath/test399.scxml
@@ -1,66 +1,65 @@
-<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="2s"/>
+<?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="xpath">
+ <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"/>
+ <!-- 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>
-
- <state id="s03">
- <onentry>
- <raise event="foo.zoo"/>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
</onentry>
- <!-- test that a prefix descriptor matches -->
- <transition event="foo bar" target="s04"/>
- </state>
-
-<state id="s04">
- <onentry>
- <raise event="foos"/>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
</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
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test401.scxml b/test/w3c/xpath/test401.scxml
index 586a049..89a1164 100644
--- a/test/w3c/xpath/test401.scxml
+++ b/test/w3c/xpath/test401.scxml
@@ -1,21 +1,25 @@
-<?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
+<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="foo"/>
- <!-- assigning to a non-existent location should raise an error -->
- <assign location="foo.bar.baz " expr="2"/>
+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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="foo"/>
+ <!-- assigning to a non-existent location should raise an error -->
+ <assign location="foo.bar.baz " 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
+ <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>
diff --git a/test/w3c/xpath/test402.scxml b/test/w3c/xpath/test402.scxml
index 798f992..29d1dd1 100644
--- a/test/w3c/xpath/test402.scxml
+++ b/test/w3c/xpath/test402.scxml
@@ -1,40 +1,42 @@
-<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <!-- catch the failure case -->
- <send event="timeout" delay="1s"/>
+<?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="xpath">
+ <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="foo.bar.baz " 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"/>
+ <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="foo.bar.baz " 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>
-
-<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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test403a.scxml b/test/w3c/xpath/test403a.scxml
index 98b885e..50f4984 100644
--- a/test/w3c/xpath/test403a.scxml
+++ b/test/w3c/xpath/test403a.scxml
@@ -1,43 +1,46 @@
-<?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
+<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <!-- catch the failure case -->
- <send event="timeout" delay="1s"/>
+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="xpath">
+ <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 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="0&gt;1" target="fail"/>
+ <raise event="event2"/>
+ </onentry>
+ <transition event="event1" target="fail"/>
+ <transition event="event2" cond="0&gt;1" target="fail"/>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test403b.scxml b/test/w3c/xpath/test403b.scxml
index 657e6c6..438bb05 100644
--- a/test/w3c/xpath/test403b.scxml
+++ b/test/w3c/xpath/test403b.scxml
@@ -1,40 +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="xpath">
+<?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="xpath">
<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
+ <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>
+ <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/text() =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
+ <state id="p0s1">
+ <transition event="event2" cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test403c.scxml b/test/w3c/xpath/test403c.scxml
index 4c7f154..10e4a3f 100644
--- a/test/w3c/xpath/test403c.scxml
+++ b/test/w3c/xpath/test403c.scxml
@@ -1,54 +1,53 @@
-<?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="xpath">
+<?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="xpath">
<datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
-<state id="s0" initial="p0">
- <onentry>
- <raise event="event1"/>
- <send event="timeout" delay="1s"/>
+ <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
+ <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/text() =2" target="pass"/>
- <transition target="fail"/>
+ <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>
-
-<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
+ <state id="s1">
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test404.scxml b/test/w3c/xpath/test404.scxml
index f27c0ae..47adff8 100644
--- a/test/w3c/xpath/test404.scxml
+++ b/test/w3c/xpath/test404.scxml
@@ -1,60 +1,56 @@
-<?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
+<?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="xpath">
-
-
-<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>
+ 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="xpath">
+ <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>
- </parallel>
-
- <state id="s02">
- <transition event="event1" target="s03"/>
- <transition event="*" target="fail"/>
+ <state id="s03">
+ <transition event="event2" target="s04"/>
+ <transition event="*" target="fail"/>
</state>
-
- <state id="s03">
- <transition event="event2" target="s04"/>
- <transition event="*" target="fail"/>
+ <state id="s04">
+ <transition event="event3" target="s05"/>
+ <transition event="*" target="fail"/>
</state>
-
- <state id="s04">
- <transition event="event3" target="s05"/>
- <transition event="*" target="fail"/>
+ <state id="s05">
+ <transition event="event4" target="pass"/>
+ <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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test405.scxml b/test/w3c/xpath/test405.scxml
index 16e30ca..938a3bf 100644
--- a/test/w3c/xpath/test405.scxml
+++ b/test/w3c/xpath/test405.scxml
@@ -1,67 +1,66 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the executable content in the transitions is executed in document order after
+<?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="xpath">
-
-<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 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="xpath">
+ <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 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 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
+ </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>
diff --git a/test/w3c/xpath/test406.scxml b/test/w3c/xpath/test406.scxml
index 3466313..1d8e2e6 100644
--- a/test/w3c/xpath/test406.scxml
+++ b/test/w3c/xpath/test406.scxml
@@ -1,64 +1,60 @@
-<?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)
+<?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="xpath">
-
-<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"/>
+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="xpath">
+ <state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
</onentry>
- </parallel>
-
-
- <state id="s03">
- <transition event="event2" target="s04"/>
- <transition event="*" target="fail"/>
+ <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 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 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
+ </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>
diff --git a/test/w3c/xpath/test407.scxml b/test/w3c/xpath/test407.scxml
index c96630c..a3fa1eb 100644
--- a/test/w3c/xpath/test407.scxml
+++ b/test/w3c/xpath/test407.scxml
@@ -1,20 +1,27 @@
-<?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="xpath">
-<datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
-<state id="s0">
- <onexit>
- <assign location="$Var1" expr="$Var1 + 1"/>
+<?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="xpath">
+ <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/text() =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
+ <transition target="s1"/>
+ </state>
+ <state id="s1">
+ <transition cond="$Var1/text() =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>
diff --git a/test/w3c/xpath/test409.scxml b/test/w3c/xpath/test409.scxml
index e321d46..56a0355 100644
--- a/test/w3c/xpath/test409.scxml
+++ b/test/w3c/xpath/test409.scxml
@@ -1,32 +1,36 @@
-<?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
+<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delayexpr="'1s'"/>
+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="xpath">
+ <state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delayexpr="'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"/>
+ <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
+ </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>
diff --git a/test/w3c/xpath/test411.scxml b/test/w3c/xpath/test411.scxml
index 60a8460..35cd8c1 100644
--- a/test/w3c/xpath/test411.scxml
+++ b/test/w3c/xpath/test411.scxml
@@ -1,32 +1,36 @@
-<?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
+<?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="xpath">
-
-
-<state id="s0" initial="s01">
- <onentry>
- <send event="timeout" delay="1s"/>
- <if cond="In('s01')">
- <raise event="event1"/>
+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="xpath">
+ <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">
+ <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>
- <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
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test412.scxml b/test/w3c/xpath/test412.scxml
index 1895c9f..d27a20b 100644
--- a/test/w3c/xpath/test412.scxml
+++ b/test/w3c/xpath/test412.scxml
@@ -1,52 +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="xpath">
-
-
-<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">
+<?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="xpath">
+ <state id="s0" initial="s01">
<onentry>
- <raise event="event1"/>
- </onentry>
- <initial>
- <transition target="s011">
- <raise event="event2"/>
- </transition>
+ <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 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>
-
-</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
+ <!-- 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>
diff --git a/test/w3c/xpath/test413.scxml b/test/w3c/xpath/test413.scxml
index 819dfb5..9934478 100644
--- a/test/w3c/xpath/test413.scxml
+++ b/test/w3c/xpath/test413.scxml
@@ -1,45 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the state machine is put into the configuration specified by the initial element, without regard
+<?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="xpath">
-
- <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
+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="xpath">
+ <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 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>
-
- </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>
+ </parallel>
</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
+ <!-- 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>
diff --git a/test/w3c/xpath/test415.scxml b/test/w3c/xpath/test415.scxml
index 2da0bef..a942188 100644
--- a/test/w3c/xpath/test415.scxml
+++ b/test/w3c/xpath/test415.scxml
@@ -1,12 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- Test that the state machine halts when it enters a top-level final state. Since
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Test that the state machine halts when it enters a top-level final state. Since
the initial state is a final state, this machine should halt immediately without
processing "event1" which is raised in the final state's on-entry handler. This
is a manual test since there is no platform-independent way to test that event1
- is not processed --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="final" version="1.0" datamodel="xpath">
+ is not processed -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="final" version="1.0" datamodel="xpath">
<final id="final">
<onentry>
<raise event="event1"/>
- </onentry>
- </final>
-
-</scxml> \ No newline at end of file
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test416.scxml b/test/w3c/xpath/test416.scxml
index dfa60fe..03d104f 100644
--- a/test/w3c/xpath/test416.scxml
+++ b/test/w3c/xpath/test416.scxml
@@ -1,22 +1,27 @@
-<?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="xpath">
-
- <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
+<?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="xpath">
+ <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>
diff --git a/test/w3c/xpath/test417.scxml b/test/w3c/xpath/test417.scxml
index d8e5715..b8db7b8 100644
--- a/test/w3c/xpath/test417.scxml
+++ b/test/w3c/xpath/test417.scxml
@@ -1,34 +1,36 @@
-<?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="xpath">
-
- <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">
+<?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="xpath">
+ <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"/>
+ <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
+ </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>
diff --git a/test/w3c/xpath/test419.scxml b/test/w3c/xpath/test419.scxml
index fade57d..c1e6e4b 100644
--- a/test/w3c/xpath/test419.scxml
+++ b/test/w3c/xpath/test419.scxml
@@ -1,17 +1,22 @@
-<?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="xpath">
-
- <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
+<?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="xpath">
+ <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>
diff --git a/test/w3c/xpath/test421.scxml b/test/w3c/xpath/test421.scxml
index a73a11a..7bb9690 100644
--- a/test/w3c/xpath/test421.scxml
+++ b/test/w3c/xpath/test421.scxml
@@ -1,28 +1,31 @@
-<?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="xpath">
-
- <state id="s1" initial="s11">
- <onentry>
+<?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="xpath">
+ <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"/>
+ <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>
-
-
-<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
+ <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>
diff --git a/test/w3c/xpath/test422.scxml b/test/w3c/xpath/test422.scxml
index 4ef15ce..9255d3b 100644
--- a/test/w3c/xpath/test422.scxml
+++ b/test/w3c/xpath/test422.scxml
@@ -1,75 +1,81 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- Test that at the end of a macrostep, the processor executes all invokes in states
+<?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="xpath">
-<datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
- <state id="s1" initial="s11">
- <onentry>
- <send event="timeout" delayexpr="'2s'"/>
- </onentry>
- <transition event="invokeS1 invokeS12">
- <assign location="$Var1" expr="$Var1 + 1"/>
- </transition>
- <transition event="invokeS11" target="fail"/>
-
- <transition event="timeout" cond="$Var1/text() =2" target="pass"/>
- <transition event="timeout" target="fail"/>
- <invoke>
- <content>
+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="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <state id="s1" initial="s11">
+ <onentry>
+ <send event="timeout" delayexpr="'2s'"/>
+ </onentry>
+ <transition event="invokeS1 invokeS12">
+ <assign location="$Var1" expr="$Var1 + 1"/>
+ </transition>
+ <transition event="invokeS11" target="fail"/>
+ <transition event="timeout" cond="$Var1/text() =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="xpath">
- <state id="sub0">
- <onentry>
- <send target="#_parent" event="invokeS1"/>
- </onentry>
- <transition target="subFinal0"/>
- </state>
- <final id="subFinal0"/>
+ <scxml initial="sub0" version="1.0" datamodel="xpath">
+ <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. -->
+ </invoke>
+ <state id="s11">
+ <invoke>
+ <content>
+ <!-- when invoked, send 'foo' to parent, then terminate. -->
<scxml initial="sub1" version="1.0" datamodel="xpath">
<state id="sub1">
- <onentry>
+ <onentry>
<send target="#_parent" event="invokeS11"/>
- </onentry>
- <transition target="subFinal1"/>
- </state>
- <final id="subFinal1"/>
- </scxml>
- </content>
+ </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. -->
+ <transition target="s12"/>
+ </state>
+ <state id="s12">
+ <invoke>
+ <content>
+ <!-- when invoked, send 'foo' to parent, then terminate. -->
<scxml initial="sub2" version="1.0" datamodel="xpath">
<state id="sub2">
- <onentry>
+ <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
+ </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>
diff --git a/test/w3c/xpath/test423.scxml b/test/w3c/xpath/test423.scxml
index f3bf8c8..4f601c8 100644
--- a/test/w3c/xpath/test423.scxml
+++ b/test/w3c/xpath/test423.scxml
@@ -1,25 +1,29 @@
-<?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="xpath">
-
-
- <state id="s0">
- <onentry>
- <send event="externalEvent1"/>
- <send event="externalEvent2" delayexpr="'1s'"/>
- <raise event="internalEvent"/>
+<?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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="externalEvent1"/>
+ <send event="externalEvent2" delayexpr="'1s'"/>
+ <raise event="internalEvent"/>
</onentry>
<!-- in this state we should process only internalEvent -->
- <transition event="internalEvent" target="s1"/>
+ <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
+ </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>
diff --git a/test/w3c/xpath/test436.scxml b/test/w3c/xpath/test436.scxml
index d8b2ca2..072370e 100644
--- a/test/w3c/xpath/test436.scxml
+++ b/test/w3c/xpath/test436.scxml
@@ -1,21 +1,23 @@
-<?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
+<?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>
diff --git a/test/w3c/xpath/test463.scxml b/test/w3c/xpath/test463.scxml
index 4f32b84..3c49a1b 100644
--- a/test/w3c/xpath/test463.scxml
+++ b/test/w3c/xpath/test463.scxml
@@ -1,17 +1,22 @@
-<?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"/>
+<?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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test464.scxml b/test/w3c/xpath/test464.scxml
index bd640f2..0b1881d 100644
--- a/test/w3c/xpath/test464.scxml
+++ b/test/w3c/xpath/test464.scxml
@@ -1,16 +1,21 @@
-<?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"/>
+<?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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test465.scxml b/test/w3c/xpath/test465.scxml
index a91bb06..205203f 100644
--- a/test/w3c/xpath/test465.scxml
+++ b/test/w3c/xpath/test465.scxml
@@ -1,22 +1,27 @@
-<?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"/>
+<?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 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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test466.scxml b/test/w3c/xpath/test466.scxml
index 1431fab..27791c9 100644
--- a/test/w3c/xpath/test466.scxml
+++ b/test/w3c/xpath/test466.scxml
@@ -1,14 +1,21 @@
-<?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"/>
+<?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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test467.scxml b/test/w3c/xpath/test467.scxml
index 130b7bc..67a18ab 100644
--- a/test/w3c/xpath/test467.scxml
+++ b/test/w3c/xpath/test467.scxml
@@ -1,12 +1,18 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test468.scxml b/test/w3c/xpath/test468.scxml
index 3b6902d..dfa077f 100644
--- a/test/w3c/xpath/test468.scxml
+++ b/test/w3c/xpath/test468.scxml
@@ -1,5 +1,7 @@
-<?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">
+<?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="">
@@ -8,16 +10,21 @@
</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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test469.scxml b/test/w3c/xpath/test469.scxml
index 02fe476..0550738 100644
--- a/test/w3c/xpath/test469.scxml
+++ b/test/w3c/xpath/test469.scxml
@@ -1,25 +1,31 @@
-<?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">
+<?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"/>
+ <data id="copyOfEventData"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="event1">
- <param name="param1" expr="1"/>
+ <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>
+ </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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test470.scxml b/test/w3c/xpath/test470.scxml
index 3c26bb1..ab2f2d1 100644
--- a/test/w3c/xpath/test470.scxml
+++ b/test/w3c/xpath/test470.scxml
@@ -1,24 +1,30 @@
-<?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">
+<?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 xmlns="">
+ <bar>2</bar>
</foo>
- </data>
- <data id="var2"/>
+ </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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test473.scxml b/test/w3c/xpath/test473.scxml
index 4a57129..5253ac7 100644
--- a/test/w3c/xpath/test473.scxml
+++ b/test/w3c/xpath/test473.scxml
@@ -1,37 +1,44 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test474.scxml b/test/w3c/xpath/test474.scxml
index decad75..c12ae46 100644
--- a/test/w3c/xpath/test474.scxml
+++ b/test/w3c/xpath/test474.scxml
@@ -1,36 +1,43 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test475.scxml b/test/w3c/xpath/test475.scxml
index 0f9cdfe..21d1e5a 100644
--- a/test/w3c/xpath/test475.scxml
+++ b/test/w3c/xpath/test475.scxml
@@ -1,36 +1,43 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test476.scxml b/test/w3c/xpath/test476.scxml
index d3fe8e8..bf5123f 100644
--- a/test/w3c/xpath/test476.scxml
+++ b/test/w3c/xpath/test476.scxml
@@ -1,36 +1,43 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test477.scxml b/test/w3c/xpath/test477.scxml
index 1726866..f0a8c70 100644
--- a/test/w3c/xpath/test477.scxml
+++ b/test/w3c/xpath/test477.scxml
@@ -1,36 +1,43 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test478.scxml b/test/w3c/xpath/test478.scxml
index 9821608..102e512 100644
--- a/test/w3c/xpath/test478.scxml
+++ b/test/w3c/xpath/test478.scxml
@@ -1,36 +1,42 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test479.scxml b/test/w3c/xpath/test479.scxml
index 3d5b1ac..6d47c00 100644
--- a/test/w3c/xpath/test479.scxml
+++ b/test/w3c/xpath/test479.scxml
@@ -1,36 +1,42 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test480.scxml b/test/w3c/xpath/test480.scxml
index 0fde260..6baa9f4 100644
--- a/test/w3c/xpath/test480.scxml
+++ b/test/w3c/xpath/test480.scxml
@@ -1,32 +1,38 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test481.scxml b/test/w3c/xpath/test481.scxml
index a0505f6..d48086f 100644
--- a/test/w3c/xpath/test481.scxml
+++ b/test/w3c/xpath/test481.scxml
@@ -1,37 +1,43 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test482.scxml b/test/w3c/xpath/test482.scxml
index 00eb3fe..94fc666 100644
--- a/test/w3c/xpath/test482.scxml
+++ b/test/w3c/xpath/test482.scxml
@@ -1,16 +1,22 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test483.scxml b/test/w3c/xpath/test483.scxml
index 0a1b236..90fc0d6 100644
--- a/test/w3c/xpath/test483.scxml
+++ b/test/w3c/xpath/test483.scxml
@@ -1,27 +1,33 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that foreach works correctly, iterating over node set in document order.
- This tests assertions 483-485 --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
- <datamodel>
- <data id="var1">
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that foreach works correctly, iterating over node set in document order.
+ This tests assertions 483-485 -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
+ <datamodel>
+ <data id="var1">
<nodes xmlns="">
- <node/>
- <node/>
- <node/>
+ <node/>
+ <node/>
+ <node/>
</nodes>
- </data>
- </datamodel>
-
-<state id="s0">
- <onentry>
- <foreach array="$var1/nodes/node" item="item" index="pos">
- <assign location="$item" type="addattribute" attr="position" expr="$pos"/>
- </foreach>
- </onentry>
-
- <transition cond="$var1/nodes/node[1]/@position = 1 and $var1/nodes/node[2]/@position = 2 and $var1/nodes/node[3]/@position = 3" target="pass"/>
- <transition target="fail"/>
+ </data>
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <foreach array="$var1/nodes/node" item="item" index="pos">
+ <assign location="$item" type="addattribute" attr="position" expr="$pos"/>
+ </foreach>
+ </onentry>
+ <transition cond="$var1/nodes/node[1]/@position = 1 and $var1/nodes/node[2]/@position = 2 and $var1/nodes/node[3]/@position = 3" target="pass"/>
+ <transition target="fail"/>
</state>
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test487.scxml b/test/w3c/xpath/test487.scxml
index cec2f64..b7df719 100644
--- a/test/w3c/xpath/test487.scxml
+++ b/test/w3c/xpath/test487.scxml
@@ -1,18 +1,25 @@
-<?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="xpath" version="1.0">
-<datamodel>
- <data id="Var1"/>
+<?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="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <assign location="$Var1" expr="!1"/>
- <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
+ <state id="s0">
+ <onentry>
+ <assign location="$Var1" expr="!1"/>
+ <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>
diff --git a/test/w3c/xpath/test488.scxml b/test/w3c/xpath/test488.scxml
index 9da2e92..e2d55dd 100644
--- a/test/w3c/xpath/test488.scxml
+++ b/test/w3c/xpath/test488.scxml
@@ -1,34 +1,35 @@
-<?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="xpath" 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">
+<?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="xpath" 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="!1" name="someParam"/>
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <param expr="!1" name="someParam"/>
</donedata>
- </final>
+ </final>
</state>
-
-
- <!-- if we get here, we received the error event. Now check that the done
+ <!-- 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="not($_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
+ <state id="s1">
+ <transition event="done.state.s0" cond="not($_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>
diff --git a/test/w3c/xpath/test495.scxml b/test/w3c/xpath/test495.scxml
index c244266..f8e86a8 100644
--- a/test/w3c/xpath/test495.scxml
+++ b/test/w3c/xpath/test495.scxml
@@ -1,23 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the scxml event i/o processor puts events in the correct queues.--><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">
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that the scxml event i/o processor puts events in the correct queues.-->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+ <state id="s0">
<onentry>
- <!-- default target is external queue -->
- <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
- <send event="event2" target="#_internal" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
- </onentry>
- <!-- we should get the internal event first -->
- <transition event="event1" target="fail"/>
- <transition event="event2" target="s1"/>
- </state>
-
-<state id="s1">
- <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
+ <!-- default target is external queue -->
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ <send event="event2" target="#_internal" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ </onentry>
+ <!-- we should get the internal event first -->
+ <transition event="event1" target="fail"/>
+ <transition event="event2" target="s1"/>
+ </state>
+ <state id="s1">
+ <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>
diff --git a/test/w3c/xpath/test496.scxml b/test/w3c/xpath/test496.scxml
index a30064f..a304450 100644
--- a/test/w3c/xpath/test496.scxml
+++ b/test/w3c/xpath/test496.scxml
@@ -1,18 +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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event" target="#_scxml_foo"/>
- <raise event="foo"/>
- </onentry>
- <transition event="error.communication" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
-
-
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+ <state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event" target="#_scxml_foo"/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.communication" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test500.scxml b/test/w3c/xpath/test500.scxml
index 51252eb..894c532 100644
--- a/test/w3c/xpath/test500.scxml
+++ b/test/w3c/xpath/test500.scxml
@@ -1,15 +1,21 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that location field is found inside entry for 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" version="1.0" datamodel="xpath">
-<datamodel>
- <data id="Var1" expr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#SCXMLProcessor&#34;]/location/text()"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that location field is found inside entry for 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" version="1.0" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#SCXMLProcessor&quot;]/location/text()"/>
</datamodel>
-
-<state id="s0">
- <transition cond="$Var1/* or $Var1/text()" 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
+ <state id="s0">
+ <transition cond="$Var1/* or $Var1/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test501.scxml b/test/w3c/xpath/test501.scxml
index 740f81b..bc81c56 100644
--- a/test/w3c/xpath/test501.scxml
+++ b/test/w3c/xpath/test501.scxml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that the location entry for the SCXML Event I/O processor can be used as the target for 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="xpath">
-<datamodel>
- <data id="Var1" expr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#SCXMLProcessor&#34;]/location/text()"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that the location entry for the SCXML Event I/O processor can be used as the target for 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="xpath">
+ <datamodel>
+ <data id="Var1" expr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#SCXMLProcessor&quot;]/location/text()"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send targetexpr="$Var1" event="foo"/>
- <send event="timeout" delay="2s"/>
+ <state id="s0">
+ <onentry>
+ <send targetexpr="$Var1" event="foo"/>
+ <send event="timeout" delay="2s"/>
</onentry>
- <transition event="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
+ <transition event="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>
diff --git a/test/w3c/xpath/test503.scxml b/test/w3c/xpath/test503.scxml
index addd166..aa2017d 100644
--- a/test/w3c/xpath/test503.scxml
+++ b/test/w3c/xpath/test503.scxml
@@ -1,37 +1,43 @@
-<?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="xpath">
-<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 -->
+<?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="xpath">
+ <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"/>
+ <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/text() =1" target="s3"/>
- <transition event="bar" target="fail"/>
+ <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/text() =1" target="s3"/>
+ <transition event="bar" target="fail"/>
</state>
-
<state id="s3">
- <!-- make sure that s2 was exited only once -->
+ <!-- make sure that s2 was exited only once -->
<transition cond="$Var1/text() =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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test504.scxml b/test/w3c/xpath/test504.scxml
index 08b7a2e..df9ef43 100644
--- a/test/w3c/xpath/test504.scxml
+++ b/test/w3c/xpath/test504.scxml
@@ -1,75 +1,79 @@
-<?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="xpath">
-<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 -->
+<?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="xpath">
+ <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"/>
+ <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/text() =1" target="s3"/>
- <transition event="bar" target="fail"/>
-
- <state id="ps1">
- <onexit>
- <assign location="$Var2" expr="$Var2 + 1"/>
- </onexit>
+ <transition target="p"/>
</state>
- <state id="ps2">
- <onexit>
- <assign location="$Var3" expr="$Var3 + 1"/>
- </onexit>
+ <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/text() =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>
-</parallel>
-</state>
-
-<state id="s3">
- <!-- make sure that p was exited twice -->
+ <state id="s3">
+ <!-- make sure that p was exited twice -->
<transition cond="$Var1/text() =2" target="s4"/>
<transition target="fail"/>
- </state>
-
-<state id="s4">
- <!-- make sure that ps1 was exited twice -->
+ </state>
+ <state id="s4">
+ <!-- make sure that ps1 was exited twice -->
<transition cond="$Var2/text() =2" target="s5"/>
<transition target="fail"/>
- </state>
-
-<state id="s5">
- <!-- make sure that ps2 was exited twice -->
+ </state>
+ <state id="s5">
+ <!-- make sure that ps2 was exited twice -->
<transition cond="$Var3/text() =2" target="s6"/>
<transition target="fail"/>
- </state>
-
-<state id="s6">
- <!-- make sure that s1 was exited once -->
- <transition cond="$Var5/text() =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
+ </state>
+ <state id="s6">
+ <!-- make sure that s1 was exited once -->
+ <transition cond="$Var5/text() =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>
diff --git a/test/w3c/xpath/test505.scxml b/test/w3c/xpath/test505.scxml
index 94575a1..8fdedab 100644
--- a/test/w3c/xpath/test505.scxml
+++ b/test/w3c/xpath/test505.scxml
@@ -1,47 +1,52 @@
-<?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="xpath">
-<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 -->
+<?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="xpath">
+ <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"/>
+ <state id="s1">
+ <onentry>
+ <raise event="foo"/>
+ <raise event="bar"/>
</onentry>
- <onexit>
- <assign location="$Var1" expr="$Var1 + 1"/>
+ <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/text() =1" target="s2"/>
- <transition event="bar" target="fail"/>
-
- <state id="s11">
- <onexit>
- <assign location="$Var2" expr="$Var2 + 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/text() =1" target="s2"/>
+ <transition event="bar" target="fail"/>
+ <state id="s11">
+ <onexit>
+ <assign location="$Var2" expr="$Var2 + 1"/>
+ </onexit>
+ </state>
</state>
- </state>
-
-<state id="s2">
- <!-- make sure that s1 was exited once -->
+ <state id="s2">
+ <!-- make sure that s1 was exited once -->
<transition cond="$Var1/text() =1" target="s3"/>
<transition target="fail"/>
- </state>
-
-
-<state id="s3">
- <!-- make sure that s11 was exited twice -->
+ </state>
+ <state id="s3">
+ <!-- make sure that s11 was exited twice -->
<transition cond="$Var2/text() =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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test506.scxml b/test/w3c/xpath/test506.scxml
index 4d0fbfb..7beb27b 100644
--- a/test/w3c/xpath/test506.scxml
+++ b/test/w3c/xpath/test506.scxml
@@ -1,53 +1,56 @@
-<?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="xpath">
-<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 -->
+<?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="xpath">
+ <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"/>
+ <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"/>
+ <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/text() =1" target="s3"/>
- <transition event="bar" target="fail"/>
-
- <state id="s21">
- <onexit>
- <assign location="$Var2" expr="$Var2 + 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/text() =1" target="s3"/>
+ <transition event="bar" target="fail"/>
+ <state id="s21">
+ <onexit>
+ <assign location="$Var2" expr="$Var2 + 1"/>
+ </onexit>
+ </state>
</state>
-
-</state>
-
-<state id="s3">
- <!-- make sure that s2 was exited twice -->
+ <state id="s3">
+ <!-- make sure that s2 was exited twice -->
<transition cond="$Var1/text() =2" target="s4"/>
<transition target="fail"/>
- </state>
-
-<state id="s4">
- <!-- make sure that s21 was exited twice -->
+ </state>
+ <state id="s4">
+ <!-- make sure that s21 was exited twice -->
<transition cond="$Var2/text() =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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test509.scxml b/test/w3c/xpath/test509.scxml
index 70e903f..d34c944 100644
--- a/test/w3c/xpath/test509.scxml
+++ b/test/w3c/xpath/test509.scxml
@@ -1,17 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that Basic HTTP Event I/O processor uses POST method and that it can receive messages
-at the accessURI --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="30s"/>
- <send event="test" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- </onentry>
- <!-- if the event was send by http and we get it, we succeed -->
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that Basic HTTP Event I/O processor uses POST method and that it can receive messages
+at the accessURI -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ </onentry>
+ <!-- if the event was send by http and we get it, we succeed -->
<transition event="test" cond="contains($_event/raw, 'POST')" 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
+ <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>
diff --git a/test/w3c/xpath/test510.scxml b/test/w3c/xpath/test510.scxml
index 11adc1c..516bb60 100644
--- a/test/w3c/xpath/test510.scxml
+++ b/test/w3c/xpath/test510.scxml
@@ -1,24 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that Basic HTTP messages go into external queue. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="30s"/>
- <send event="test" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- <!-- this creates an internal event -->
- <raise event="internal"/>
-
- </onentry>
- <!-- we should get 'internal' first, then 'test' -->
- <transition event="internal" target="s1"/>
- <transition event="*" target="fail"/>
- </state>
-
- <state id="s1">
- <transition event="test" 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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that Basic HTTP messages go into external queue. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ <!-- this creates an internal event -->
+ <raise event="internal"/>
+ </onentry>
+ <!-- we should get 'internal' first, then 'test' -->
+ <transition event="internal" target="s1"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s1">
+ <transition event="test" 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>
diff --git a/test/w3c/xpath/test518.scxml b/test/w3c/xpath/test518.scxml
index c79aa5d..00577c9 100644
--- a/test/w3c/xpath/test518.scxml
+++ b/test/w3c/xpath/test518.scxml
@@ -1,20 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that namelist values get encoded as POST parameters. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="2"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that namelist values get encoded as POST parameters. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="2"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="30s"/>
- <send event="test" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" namelist="$Var1" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- </onentry>
-
- <transition event="test" cond="contains($_event/raw, 'Var1=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
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" namelist="$Var1" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ </onentry>
+ <transition event="test" cond="contains($_event/raw, 'Var1=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>
diff --git a/test/w3c/xpath/test519.scxml b/test/w3c/xpath/test519.scxml
index 684098e..2a81e44 100644
--- a/test/w3c/xpath/test519.scxml
+++ b/test/w3c/xpath/test519.scxml
@@ -1,19 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that <param> values get encoded as POST parameters. . --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="30s"/>
- <send event="test" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <param name="param1" expr="1"/>
- </send>
- </onentry>
-
- <!-- if other end sends us back this event, we succeed -->
- <transition event="test" cond="contains($_event/raw, '1=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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that <param> values get encoded as POST parameters. . -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <param name="param1" expr="1"/>
+ </send>
+ </onentry>
+ <!-- if other end sends us back this event, we succeed -->
+ <transition event="test" cond="contains($_event/raw, '1=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>
diff --git a/test/w3c/xpath/test520.scxml b/test/w3c/xpath/test520.scxml
index 3c0f941..03b8323 100644
--- a/test/w3c/xpath/test520.scxml
+++ b/test/w3c/xpath/test520.scxml
@@ -1,21 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that <content> gets sent as the body of the message. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="30s"/>
- <send targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <content>this is some content</content>
- </send>
- </onentry>
-
- <!-- if other end sends us back this event, we succeed. Test for two common
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that <content> gets sent as the body of the message. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <content>this is some content</content>
+ </send>
+ </onentry>
+ <!-- if other end sends us back this event, we succeed. Test for two common
ways of encoding -->
- <transition event="HTTP.POST" cond="contains($_event/raw, this+is+some+content)" target="pass"/>
- <transition event="HTTP.POST" cond="contains($_event/raw, this%20is%20some%20content)" 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
+ <transition event="HTTP.POST" cond="contains($_event/raw, this+is+some+content)" target="pass"/>
+ <transition event="HTTP.POST" cond="contains($_event/raw, this%20is%20some%20content)" 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>
diff --git a/test/w3c/xpath/test521.scxml b/test/w3c/xpath/test521.scxml
index 4b958ea..9dd4043 100644
--- a/test/w3c/xpath/test521.scxml
+++ b/test/w3c/xpath/test521.scxml
@@ -1,23 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- we test that the processor raises error.communication if it cannot dispatch the event.
+<?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="xpath" 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"/>
+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="xpath" 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
+ <!-- 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>
diff --git a/test/w3c/xpath/test522.scxml b/test/w3c/xpath/test522.scxml
index a13966d..0a92c55 100644
--- a/test/w3c/xpath/test522.scxml
+++ b/test/w3c/xpath/test522.scxml
@@ -1,22 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that location field the entry for Basic HTTP Event I/O processor can be used
-to send a message to the processor --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="30s"/>
- <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()"/>
-
- </onentry>
- <!-- the event we receive should be called 'test', but that's not actually
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that location field the entry for Basic HTTP Event I/O processor can be used
+to send a message to the processor -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()"/>
+ </onentry>
+ <!-- the event we receive should be called 'test', but that's not actually
required for this test. Only that the send deliver some event to us. So if
we get something other than timeout or error, we call it success -->
- <transition event="timeout" target="fail"/>
- <transition event="error" 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
+ <transition event="timeout" target="fail"/>
+ <transition event="error" 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>
diff --git a/test/w3c/xpath/test525.scxml b/test/w3c/xpath/test525.scxml
index a19e06e..da9248e 100644
--- a/test/w3c/xpath/test525.scxml
+++ b/test/w3c/xpath/test525.scxml
@@ -1,26 +1,34 @@
-<?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="xpath" version="1.0">
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that <foreach> does a shallow copy, so that modifying the array does not change
+the iteration behavior. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="xpath" version="1.0">
<datamodel>
<data id="Var1">
- <node xmlns="">1</node><node xmlns="">2</node><node xmlns="">3</node>
- </data>
- <data id="Var2" expr="0"/> <!-- counts the number of iterations -->
- </datamodel>
-
-<state id="s0">
- <onentry>
- <foreach item="Var3" array="$Var1/*">
- <assign type="lastchild" location="$Var1" expr="$Var1/*"/>
- <assign location="$Var2" expr="$Var2 + 1"/>
- </foreach>
- </onentry>
-
- <transition cond="$Var2/text() =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
+ <node xmlns="">1</node>
+ <node xmlns="">2</node>
+ <node xmlns="">3</node>
+ </data>
+ <data id="Var2" expr="0"/>
+ <!-- counts the number of iterations -->
+ </datamodel>
+ <state id="s0">
+ <onentry>
+ <foreach item="Var3" array="$Var1/*">
+ <assign type="lastchild" location="$Var1" expr="$Var1/*"/>
+ <assign location="$Var2" expr="$Var2 + 1"/>
+ </foreach>
+ </onentry>
+ <transition cond="$Var2/text() =3" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test527.scxml b/test/w3c/xpath/test527.scxml
index a5c69f8..5282186 100644
--- a/test/w3c/xpath/test527.scxml
+++ b/test/w3c/xpath/test527.scxml
@@ -1,25 +1,28 @@
-<?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="xpath" initial="s0">
-
-
- <state id="s0" initial="s01">
-
- <transition event="done.state.s0" cond="$_event/data = 'foo'" target="pass">
+<?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="xpath" 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 event="done.state.s0" target="fail">
</transition>
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <content expr="'foo'"/>
+ <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
+ </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>
diff --git a/test/w3c/xpath/test528.scxml b/test/w3c/xpath/test528.scxml
index eda36d2..f760ee5 100644
--- a/test/w3c/xpath/test528.scxml
+++ b/test/w3c/xpath/test528.scxml
@@ -1,32 +1,33 @@
-<?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="xpath" 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"/>
-
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <content expr="!1"/>
+<?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="xpath" 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"/>
+ <state id="s01">
+ <transition target="s02"/>
+ </state>
+ <final id="s02">
+ <donedata>
+ <content expr="!1"/>
</donedata>
- </final>
+ </final>
</state>
-
-
- <!-- if we get here, we received the error event. Now check that the done
+ <!-- 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="not($_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
+ <state id="s1">
+ <transition event="done.state.s0" cond="not($_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>
diff --git a/test/w3c/xpath/test529.scxml b/test/w3c/xpath/test529.scxml
index d67af4b..ce850d0 100644
--- a/test/w3c/xpath/test529.scxml
+++ b/test/w3c/xpath/test529.scxml
@@ -1,25 +1,28 @@
-<?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="xpath" initial="s0">
-
-
- <state id="s0" initial="s01">
-
- <transition event="done.state.s0" cond="$_event/data = 21" target="pass">
+<?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="xpath" 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 event="done.state.s0" target="fail">
</transition>
-
- <state id="s01">
- <transition target="s02"/>
- </state>
- <final id="s02">
- <donedata>
- <content>21</content>
+ <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
+ </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>
diff --git a/test/w3c/xpath/test530.scxml b/test/w3c/xpath/test530.scxml
index 083ff37..ab1f564 100644
--- a/test/w3c/xpath/test530.scxml
+++ b/test/w3c/xpath/test530.scxml
@@ -1,26 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that <content> child is evaluated when <invoke> is. Var1 is initialized
+<?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="xpath">
+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="xpath">
<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
+ </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>
diff --git a/test/w3c/xpath/test531.scxml b/test/w3c/xpath/test531.scxml
index aded4d9..ada32cd 100644
--- a/test/w3c/xpath/test531.scxml
+++ b/test/w3c/xpath/test531.scxml
@@ -1,20 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that the value of the <param> _scxmleventname gets used as the name
-of the raised event. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
- <send targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <param name="_scxmleventname" expr="'test'"/>
- </send>
- </onentry>
-
- <!-- if we get an event named 'test' we succeed. Otherwise fail -->
- <transition event="test" 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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that the value of the <param> _scxmleventname gets used as the name
+of the raised event. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ <send targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <param name="_scxmleventname" expr="'test'"/>
+ </send>
+ </onentry>
+ <!-- if we get an event named 'test' we succeed. Otherwise fail -->
+ <transition event="test" 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>
diff --git a/test/w3c/xpath/test532.scxml b/test/w3c/xpath/test532.scxml
index f883c66..ea35563 100644
--- a/test/w3c/xpath/test532.scxml
+++ b/test/w3c/xpath/test532.scxml
@@ -1,20 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that if _scxmleventname is not present, the name of the HTTP method is used
-as the name of the resulting event. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
- <send targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <!-- this content will be ignored, but it's here to make sure we have a message body -->
- <content>some content</content>
- </send>
- </onentry>
-
- <transition event="HTTP.POST" 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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that if _scxmleventname is not present, the name of the HTTP method is used
+as the name of the resulting event. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ <send targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <!-- this content will be ignored, but it's here to make sure we have a message body -->
+ <content>some content</content>
+ </send>
+ </onentry>
+ <transition event="HTTP.POST" 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>
diff --git a/test/w3c/xpath/test533.scxml b/test/w3c/xpath/test533.scxml
index 06f090b..a40f5c4 100644
--- a/test/w3c/xpath/test533.scxml
+++ b/test/w3c/xpath/test533.scxml
@@ -1,62 +1,67 @@
-<?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="xpath">
-<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 -->
+<?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="xpath">
+ <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"/>
+ <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/text() =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>
+ <transition target="p"/>
</state>
-</parallel>
-
-<state id="s2">
- <!-- make sure that p was exited twice -->
+ <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/text() =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/text() =2" target="s3"/>
<transition target="fail"/>
- </state>
-
-<state id="s3">
- <!-- make sure that ps1 was exited twice -->
+ </state>
+ <state id="s3">
+ <!-- make sure that ps1 was exited twice -->
<transition cond="$Var2/text() =2" target="s4"/>
<transition target="fail"/>
- </state>
-
-<state id="s4">
- <!-- make sure that ps2 was exited twice -->
+ </state>
+ <state id="s4">
+ <!-- make sure that ps2 was exited twice -->
<transition cond="$Var3/text() =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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test534.scxml b/test/w3c/xpath/test534.scxml
index 6dde647..b4efee9 100644
--- a/test/w3c/xpath/test534.scxml
+++ b/test/w3c/xpath/test534.scxml
@@ -1,18 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that <send> 'event' value gets sent as the param _scxmleventname . --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="30s"/>
- <send event="test" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- </send>
- </onentry>
-
- <!-- if other end sends us back this event, we succeed -->
- <transition event="test" 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
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that <send> 'event' value gets sent as the param _scxmleventname . -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="30s"/>
+ <send event="test" targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ </send>
+ </onentry>
+ <!-- if other end sends us back this event, we succeed -->
+ <transition event="test" 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>
diff --git a/test/w3c/xpath/test537.scxml b/test/w3c/xpath/test537.scxml
index 350d422..2cd3569 100644
--- a/test/w3c/xpath/test537.scxml
+++ b/test/w3c/xpath/test537.scxml
@@ -1,17 +1,22 @@
-<?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"/>
+<?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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test539.scxml b/test/w3c/xpath/test539.scxml
index 450bfd9..ea1babf 100644
--- a/test/w3c/xpath/test539.scxml
+++ b/test/w3c/xpath/test539.scxml
@@ -1,26 +1,32 @@
-<?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"/>
+<?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 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
+ <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>
diff --git a/test/w3c/xpath/test540.scxml b/test/w3c/xpath/test540.scxml
index 641509f..07a3c34 100644
--- a/test/w3c/xpath/test540.scxml
+++ b/test/w3c/xpath/test540.scxml
@@ -1,21 +1,28 @@
-<?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
+<?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"/>
+ <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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test542.scxml b/test/w3c/xpath/test542.scxml
index 1101471..f357b97 100644
--- a/test/w3c/xpath/test542.scxml
+++ b/test/w3c/xpath/test542.scxml
@@ -1,34 +1,40 @@
-<?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"/>
+<?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
+ <donedata>
+ <content>123
4 5
</content>
- </donedata>
- </final>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test543.scxml b/test/w3c/xpath/test543.scxml
index 2c5c6de..9dfc7b0 100644
--- a/test/w3c/xpath/test543.scxml
+++ b/test/w3c/xpath/test543.scxml
@@ -1,18 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that event fields are present as children of _event --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
-
-
-<state id="s0">
- <onentry>
- <!-- event isn't bound until an event is raised -->
- <raise event="someevent"/>
- </onentry>
- <!-- origintype sendid, invokeid and data will not be bound in this event. name, type, and origin
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that event fields are present as children of _event -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
+ <state id="s0">
+ <onentry>
+ <!-- event isn't bound until an event is raised -->
+ <raise event="someevent"/>
+ </onentry>
+ <!-- origintype sendid, invokeid and data will not be bound in this event. name, type, and origin
are guaranteed to be there. -->
- <transition event="*" cond="$_event/name and $_event/origin and $_event/type" target="pass"/>
- <transition event="*" target="fail"/>
+ <transition event="*" cond="$_event/name and $_event/origin and $_event/type" target="pass"/>
+ <transition event="*" target="fail"/>
</state>
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test544.scxml b/test/w3c/xpath/test544.scxml
index fd09502..6183c3e 100644
--- a/test/w3c/xpath/test544.scxml
+++ b/test/w3c/xpath/test544.scxml
@@ -1,17 +1,23 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test545.scxml b/test/w3c/xpath/test545.scxml
index 1e12770..c96f12c 100644
--- a/test/w3c/xpath/test545.scxml
+++ b/test/w3c/xpath/test545.scxml
@@ -1,17 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that xml content in send is place as XML under event/data --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
-
-<state id="s0">
- <onentry>
- <send event="someevent">
- <content><foo xmlns=""><bar>3</bar></foo></content>
- </send>
- </onentry>
-
- <transition event="*" cond="$_event/data/foo/bar = 3" target="pass"/>
- <transition event="*" target="fail"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that xml content in send is place as XML under event/data -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" name="scxmltest" initial="s0" version="1.0" datamodel="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="someevent">
+ <content>
+ <foo xmlns="">
+ <bar>3</bar>
+ </foo>
+ </content>
+ </send>
+ </onentry>
+ <transition event="*" cond="$_event/data/foo/bar = 3" target="pass"/>
+ <transition event="*" target="fail"/>
</state>
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test546.scxml b/test/w3c/xpath/test546.scxml
index 728843b..d9c4551 100644
--- a/test/w3c/xpath/test546.scxml
+++ b/test/w3c/xpath/test546.scxml
@@ -1,17 +1,23 @@
-<?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"/>
+<?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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test547.scxml b/test/w3c/xpath/test547.scxml
index 8c04c95..d38ec4b 100644
--- a/test/w3c/xpath/test547.scxml
+++ b/test/w3c/xpath/test547.scxml
@@ -1,33 +1,39 @@
-<?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">
+<?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>
+ <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 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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test550.scxml b/test/w3c/xpath/test550.scxml
index a08e67d..b1659cf 100644
--- a/test/w3c/xpath/test550.scxml
+++ b/test/w3c/xpath/test550.scxml
@@ -1,20 +1,23 @@
-<?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="xpath" binding="early">
-
- <state id="s0">
-
- <transition cond="$Var1/text() =2" target="pass"/>
- <transition target="fail"/>
- </state>
-
- <state id="s1">
- <datamodel>
- <data id="Var1" expr="2"/>
+<?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="xpath" binding="early">
+ <state id="s0">
+ <transition cond="$Var1/text() =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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test551.scxml b/test/w3c/xpath/test551.scxml
index 756d326..d905a73 100644
--- a/test/w3c/xpath/test551.scxml
+++ b/test/w3c/xpath/test551.scxml
@@ -1,23 +1,27 @@
-<?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="xpath">
-
-
- <state id="s0">
-
- <transition cond="$Var1/* or $Var1/text()" target="pass"/>
- <transition target="fail"/>
- </state>
-
-<state id="s1">
- <datamodel>
- <data id="Var1">
- <node xmlns="">1</node><node xmlns="">2</node><node xmlns="">3</node>
- </data>
+<?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="xpath">
+ <state id="s0">
+ <transition cond="$Var1/* or $Var1/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <state id="s1">
+ <datamodel>
+ <data id="Var1">
+ <node xmlns="">1</node>
+ <node xmlns="">2</node>
+ <node xmlns="">3</node>
+ </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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test552.scxml b/test/w3c/xpath/test552.scxml
index 6795e08..85e0204 100644
--- a/test/w3c/xpath/test552.scxml
+++ b/test/w3c/xpath/test552.scxml
@@ -1,18 +1,22 @@
-<?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="xpath">
+<?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="xpath">
<datamodel>
<data id="Var1" src="file:test552.txt"/>
- </datamodel>
-
- <state id="s0">
-
- <transition cond="$Var1/* or $Var1/text()" 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
+ </datamodel>
+ <state id="s0">
+ <transition cond="$Var1/* or $Var1/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test553.scxml b/test/w3c/xpath/test553.scxml
index 90cd97c..442d5d9 100644
--- a/test/w3c/xpath/test553.scxml
+++ b/test/w3c/xpath/test553.scxml
@@ -1,23 +1,27 @@
-<?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="xpath" version="1.0">
-
-
-<state id="s0">
- <onentry>
- <!-- timeout event -->
- <send event="timeout" delayexpr="'1s'"/>
- <!-- generate an invalid namelist -->
- <send event="event1" namelist="&#34;foo&#34;"/>
+<?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="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <!-- timeout event -->
+ <send event="timeout" delayexpr="'1s'"/>
+ <!-- generate an invalid namelist -->
+ <send event="event1" namelist="&quot;foo&quot;"/>
</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
+ <!-- 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>
diff --git a/test/w3c/xpath/test554.scxml b/test/w3c/xpath/test554.scxml
index 74e25b3..f7a7f9f 100644
--- a/test/w3c/xpath/test554.scxml
+++ b/test/w3c/xpath/test554.scxml
@@ -1,25 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that if the evaluation of <invoke>'s args causes an error, the
+<?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="xpath">
-
-
-<state id="s0">
- <onentry>
- <send event="timer" delayexpr="'1s'"/>
+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="xpath">
+ <state id="s0">
+ <onentry>
+ <send event="timer" delayexpr="'1s'"/>
</onentry>
-
- <!-- reference an invalid namelist -->
- <invoke type="http://www.w3.org/TR/scxml/" namelist="&#34;foo&#34;">
+ <!-- reference an invalid namelist -->
+ <invoke type="http://www.w3.org/TR/scxml/" namelist="&quot;foo&quot;">
<content>
- <scxml initial="subFinal" version="1.0" datamodel="xpath">
- <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
+ <scxml initial="subFinal" version="1.0" datamodel="xpath">
+ <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>
diff --git a/test/w3c/xpath/test555.scxml b/test/w3c/xpath/test555.scxml
index 79dea75..a76819b 100644
--- a/test/w3c/xpath/test555.scxml
+++ b/test/w3c/xpath/test555.scxml
@@ -1,27 +1,32 @@
-<?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>
-
+<?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
+ <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"/>
+ <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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test567.scxml b/test/w3c/xpath/test567.scxml
index 0aa4680..ae96404 100644
--- a/test/w3c/xpath/test567.scxml
+++ b/test/w3c/xpath/test567.scxml
@@ -1,30 +1,37 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that any content in the message other than _scxmleventname is used to populate
-_event.data. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-<datamodel>
- <data id="Var1" expr="2"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that any content in the message other than _scxmleventname is used to populate
+_event.data. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <datamodel>
+ <data id="Var1" expr="2"/>
</datamodel>
-
-<state id="s0">
- <onentry>
- <send event="timeout" delay="3s"/>
- <!-- in this case, 'test' will be placed in _scxmleventname. The <param> should
+ <state id="s0">
+ <onentry>
+ <send event="timeout" delay="3s"/>
+ <!-- in this case, 'test' will be placed in _scxmleventname. The <param> should
be used to populate _event.data -->
- <send event="test" targetexpr="$_ioprocessors/processor[@name=&#34;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&#34;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
- <param name="param1" expr="2"/>
- </send>
- </onentry>
-
- <!-- if we get this event, we succeed -->
- <transition event="test" target="s1">
- <assign location="$Var1" expr="$_event/data/data[@id='param1']/text()"/>
- </transition>
- <transition event="*" target="fail"/>
- </state>
-
+ <send event="test" targetexpr="$_ioprocessors/processor[@name=&quot;http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor&quot;]/location/text()" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor">
+ <param name="param1" expr="2"/>
+ </send>
+ </onentry>
+ <!-- if we get this event, we succeed -->
+ <transition event="test" target="s1">
+ <assign location="$Var1" expr="$_event/data/data[@id='param1']/text()"/>
+ </transition>
+ <transition event="*" target="fail"/>
+ </state>
<state id="s1">
<transition cond="$Var1/text() =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
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test568.scxml b/test/w3c/xpath/test568.scxml
index e8b888f..57d10e0 100644
--- a/test/w3c/xpath/test568.scxml
+++ b/test/w3c/xpath/test568.scxml
@@ -1,15 +1,20 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that location field is found inside entry for SCXML Event I/O processor in the XPath
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that location field is found inside entry for SCXML Event I/O processor in the XPath
data model. The tests for the relevant event i/o processors will test that it can be used to
-send events. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
-
-
-<state id="s0">
- <transition cond="$_ioprocessors/[@name='http://www.w3.org/TR/scxml/#SCXMLEventProcessor']/location/text()" target="pass"/>
- <transition target="fail"/>
-
- </state>
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+send events. -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+ <state id="s0">
+ <transition cond="$_ioprocessors/[@name='http://www.w3.org/TR/scxml/#SCXMLEventProcessor']/location/text()" target="pass"/>
+ <transition target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test570.scxml b/test/w3c/xpath/test570.scxml
index 8caa2cd..c0abbaa 100644
--- a/test/w3c/xpath/test570.scxml
+++ b/test/w3c/xpath/test570.scxml
@@ -1,45 +1,48 @@
-<?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="xpath" version="1.0">
+<?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="xpath" 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"/>
+ </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/text() =1" target="pass"/>
- <transition event="*" target="fail"/>
+ <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/text() =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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test576.scxml b/test/w3c/xpath/test576.scxml
index c5302f5..a308b51 100644
--- a/test/w3c/xpath/test576.scxml
+++ b/test/w3c/xpath/test576.scxml
@@ -1,37 +1,43 @@
-<?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="xpath" version="1.0">
-
-
-<state id="s0">
- <transition target="fail"/>
-</state>
-
-<state id="s1">
- <onentry>
- <send event="timeout" delay="1s"/>
+<?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="xpath" 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"/>
+ <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>
+ </state>
</parallel>
+ </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
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test577.scxml b/test/w3c/xpath/test577.scxml
index 7652834..45fa360 100644
--- a/test/w3c/xpath/test577.scxml
+++ b/test/w3c/xpath/test577.scxml
@@ -1,21 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that that <send> without target in basichttp event i/o processor
-causes error.communication to get added to internal queue . --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
-
-
-<state id="s0">
- <onentry>
- <!-- sent by scxml event i/o processor, added to external queue -->
- <send event="event1"/>
- <!-- should put error.communication on internal queue -->
- <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
-
- </onentry>
-
-
- <transition event="error.communication" target="pass"/>
- <transition event="*" target="fail"/>
- </state>
-
- <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-</scxml> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that that <send> without target in basichttp event i/o processor
+causes error.communication to get added to internal queue . -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0">
+ <state id="s0">
+ <onentry>
+ <!-- sent by scxml event i/o processor, added to external queue -->
+ <send event="event1"/>
+ <!-- should put error.communication on internal queue -->
+ <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+ </onentry>
+ <transition event="error.communication" target="pass"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test579.scxml b/test/w3c/xpath/test579.scxml
index 28cdf28..f896472 100644
--- a/test/w3c/xpath/test579.scxml
+++ b/test/w3c/xpath/test579.scxml
@@ -1,61 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that default history content is executed correctly. The Process MUST execute any executable content in the transition after the parent state's onentry handlers, and, in the case where the history pseudo-state is the target of an <initial> transition,
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that default history content is executed correctly. The Process MUST execute any executable content in the transition after the parent state's onentry handlers, and, in the case where the history pseudo-state is the target of an <initial> transition,
the executable content inside the <initial> transition. However the Processor MUST
execute this content only if there is no stored history. Once the history state's
-parent state has been visited and exited, the default history content must not be executed --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="xpath">
-
-
-<state id="s0">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
- <initial>
- <transition target="sh1">
- <raise event="event2"/>
- </transition>
- </initial>
- <onentry>
- <send delayexpr="'1s'" event="timeout"/>
- <raise event="event1"/>
+parent state has been visited and exited, the default history content must not be executed -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" datamodel="xpath">
+ <state id="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <initial>
+ <transition target="sh1">
+ <raise event="event2"/>
+ </transition>
+ </initial>
+ <onentry>
+ <send delayexpr="'1s'" event="timeout"/>
+ <raise event="event1"/>
</onentry>
- <onexit>
- <assign location="$Var1" expr="$Var1 + 1"/>
- </onexit>
- <history id="sh1">
- <transition target="s01">
- <raise event="event3"/>
- </transition>
- </history>
-
- <state id="s01">
- <transition event="event1" target="s02"/>
- <transition event="*" target="fail"/>
- </state>
-
- <state id="s02">
- <transition event="event2" target="s03"/>
- <transition event="*" target="fail"/>
- </state>
- <state id="s03">
-
- <transition cond="$Var1/text() ==0" event="event3" target="s0"/>
- <transition cond="$Var1/text() ==1" event="event1" target="s2"/>
- <transition event="*" target="fail"/>
- </state>
-</state>
-
-<state id="s2">
- <transition event="event2" target="s3"/>
- <transition event="*" target="fail"/>
-
- </state>
-
-<state id="s3">
- <transition event="event3" target="fail"/>
- <transition event="timeout" target="pass"/>
- </state>
-
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <onexit>
+ <assign location="$Var1" expr="$Var1 + 1"/>
+ </onexit>
+ <history id="sh1">
+ <transition target="s01">
+ <raise event="event3"/>
+ </transition>
+ </history>
+ <state id="s01">
+ <transition event="event1" target="s02"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s02">
+ <transition event="event2" target="s03"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s03">
+ <transition cond="$Var1/text() ==0" event="event3" target="s0"/>
+ <transition cond="$Var1/text() ==1" event="event1" target="s2"/>
+ <transition event="*" target="fail"/>
+ </state>
+ </state>
+ <state id="s2">
+ <transition event="event2" target="s3"/>
+ <transition event="*" target="fail"/>
+ </state>
+ <state id="s3">
+ <transition event="event3" target="fail"/>
+ <transition event="timeout" target="pass"/>
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
diff --git a/test/w3c/xpath/test580.scxml b/test/w3c/xpath/test580.scxml
index 272bbce..0005cb6 100644
--- a/test/w3c/xpath/test580.scxml
+++ b/test/w3c/xpath/test580.scxml
@@ -1,48 +1,45 @@
-<?xml version="1.0" encoding="UTF-8"?><!-- test that a history state never ends up part of the configuration --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="p1" datamodel="xpath">
- <datamodel>
- <data id="Var1" expr="0"/>
- </datamodel>
-
-<parallel id="p1">
- <onentry>
- <send delay="2s" event="timeout"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- test that a history state never ends up part of the configuration -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="p1" datamodel="xpath">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
+ <parallel id="p1">
+ <onentry>
+ <send delay="2s" event="timeout"/>
</onentry>
-
-
- <state id="s0">
- <transition cond="In('sh1')" target="fail"/>
- <transition event="timeout" target="fail"/>
- </state>
-
-
-<state id="s1">
- <initial>
- <transition target="sh1"/>
- </initial>
-
-
- <history id="sh1">
- <transition target="s11"/>
- </history>
-
- <state id="s11">
- <transition cond="In('sh1')" target="fail"/>
- <transition target="s12"/>
- </state>
-
- <state id="s12"/>
- <transition cond="In('sh1')" target="fail"/>
- <transition cond="$Var1/text() ==0" target="sh1"/>
- <transition cond="$Var1/text() ==1" target="pass"/>
- <onexit>
- <assign location="$Var1" expr="$Var1 + 1"/>
- </onexit>
- </state>
-
-
- </parallel>
-
-<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
-<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
-
-</scxml> \ No newline at end of file
+ <state id="s0">
+ <transition cond="In('sh1')" target="fail"/>
+ <transition event="timeout" target="fail"/>
+ </state>
+ <state id="s1">
+ <initial>
+ <transition target="sh1"/>
+ </initial>
+ <history id="sh1">
+ <transition target="s11"/>
+ </history>
+ <state id="s11">
+ <transition cond="In('sh1')" target="fail"/>
+ <transition target="s12"/>
+ </state>
+ <state id="s12"/>
+ <transition cond="In('sh1')" target="fail"/>
+ <transition cond="$Var1/text() ==0" target="sh1"/>
+ <transition cond="$Var1/text() ==1" target="pass"/>
+ <onexit>
+ <assign location="$Var1" expr="$Var1 + 1"/>
+ </onexit>
+ </state>
+ </parallel>
+ <final id="pass">
+ <onentry>
+ <log label="Outcome" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="Outcome" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>