summaryrefslogtreecommitdiffstats
path: root/test/uscxml/test-markup-passing.scxml
blob: 32866b11bfa1b3683f9d5906561c5658de79eeab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<scxml binding="late" datamodel="ecmascript"
	xmlns="http://www.w3.org/2005/07/scxml" 
	xmlns:foo="http://uscxml.tk.informatik.tu-darmstadt.de/foo.xsd">
	<!-- 
		embedded markup contains a single child 
	-->
	<state id="markup-embedded-single">
		<datamodel>
			<data id="markup">
				<root>
					<child>1</child>
					<foo:child>2</foo:child>
				</root>
			</data>
		</datamodel>
		<onentry>
			<log label="markup-embedded-single" expr="markup.nodeName" />
		</onentry>
		<transition cond="markup.nodeName === 'root'" target="markup-embedded-many" />
	</state>

	<!-- 
		embedded markup contains multiple childs
	-->
	<state id="markup-embedded-many">
		<datamodel>
			<data id="markup">
				<root>
					<child>1</child>
					<foo:child>2</foo:child>
				</root>
				<root>
					<child>1</child>
					<foo:child>2</foo:child>
				</root>
			</data>
		</datamodel>
		<onentry>
			<log label="markup-embedded-many" expr="markup.nodeName" />
		</onentry>
		<transition cond="markup.nodeName === 'data'" target="markup-file" />
	</state>
	
	<state id="markup-file">
		<datamodel>
			<data id="markup" src="test-markup.xml" />
		</datamodel>
		<onentry>
			<log label="markup-file" expr="markup.nodeName" />
		</onentry>
		<transition cond="markup.nodeName === 'root'" target="exit" />
	</state>
	<final id="exit" />
</scxml>