tmf : Fix the xml condition multiple problem
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core.tests / test_xml_files / test_valid / test_conditions.xml
CommitLineData
900cbf89
JCK
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- ***************************************************************************
3* Copyright (c) 2015 Ericsson
4*
5* All rights reserved. This program and the accompanying materials are
6* made available under the terms of the Eclipse Public License v1.0 which
7* accompanies this distribution, and is available at
8* http://www.eclipse.org/legal/epl-v10.html
9*
10* Contributors:
11* Jean-Christian Kouame - Initial API and implementation
12*************************************************************************** -->
13<tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14 xsi:noNamespaceSchemaLocation="xmlDefinition.xsd">
15
16 <stateProvider id="test.xml.conditions" version="1">
17 <eventHandler eventName="test">
18 <stateChange>
19 <if>
20 <condition>
21 <field name="testField" />
22 <stateValue type="long" value="10" />
23 </condition>
24 </if>
25 <then>
26 <stateAttribute type="eventName" />
27 <stateValue type="long" value="1" />
28 </then>
29 <else>
30 <stateAttribute type="eventName" />
31 <stateValue type="long" value="0" />
32 </else>
33 </stateChange>
34 </eventHandler>
35 <eventHandler eventName="test1">
36 <stateChange>
37 <if>
38 <condition>
39 <field name="testField" />
40 <stateValue type="long" value="200" />
41 </condition>
42 </if>
43 <then>
44 <stateAttribute type="eventName" />
45 <stateValue type="long" value="1" />
46 </then>
47 <else>
48 <stateAttribute type="eventName" />
49 <stateValue type="long" value="0" />
50 </else>
51 </stateChange>
52 </eventHandler>
53 <eventHandler eventName="*">
54 <stateChange>
55 <if>
56 <condition>
57 <stateValue type="query">
58 <stateAttribute type="constant" value="test" />
59 </stateValue>
60 <stateValue type="query">
61 <stateAttribute type="constant" value="test1" />
62 </stateValue>
63 </condition>
64 </if>
65 <then>
66 <stateAttribute type="constant" value="checkpoint" />
67 <stateValue type="long" value="1" />
68 </then>
69 <else>
70 <stateAttribute type="constant" value="checkpoint" />
71 <stateValue type="long" value="0" />
72 </else>
73 </stateChange>
74 </eventHandler>
1010de5e
JCK
75 <eventHandler eventName="*">
76 <stateChange>
77 <if>
78 <and>
79 <condition>
80 <stateAttribute type="constant" value="test" />
81 <stateValue type="long" value="0" />
82 </condition>
83 <condition>
84 <stateAttribute type="constant" value="test1" />
85 <stateValue type="long" value="0" />
86 </condition>
87 <condition>
88 <stateAttribute type="constant" value="checkpoint" />
89 <stateValue type="long" value="1" />
90 </condition>
91 </and>
92 </if>
93 <then>
94 <stateAttribute type="constant" value="or_three_operands" />
95 <stateValue type="long" value="0" />
96 </then>
97 <else>
98 <stateAttribute type="constant" value="or_three_operands" />
99 <stateValue type="long" value="1" />
100 </else>
101 </stateChange>
102 </eventHandler>
900cbf89
JCK
103 </stateProvider>
104</tmfxml>
This page took 0.029185 seconds and 5 git commands to generate.