cpee 1.3.133 → 1.3.134
Sign up to get free protection for your applications and to get access to all the features.
- data/cockpit/lib/wfadaptor.js +1 -1
- data/cockpit/testsets/Concurrent.xml +1 -1
- data/cockpit/testsets/Coopis Testset.xml +3 -3
- data/cockpit/testsets/ICSOC Testset.xml +6 -6
- data/cockpit/testsets/Linear.xml +3 -3
- data/cockpit/testsets/Mangler 1.xml +5 -5
- data/cockpit/testsets/Mangler 2.xml +5 -5
- data/cockpit/testsets/SOPROMO Test Sonification.xml +3 -3
- data/cockpit/testsets/Syncing P34 1.xml +3 -3
- data/cockpit/testsets/Syncing P34 2.xml +3 -3
- data/cockpit/testsets/Syncing P34 3.xml +3 -3
- data/cockpit/testsets/Syncing P34.xml +3 -3
- data/cockpit/testsets/TEST - Bad Loop.xml +11 -11
- data/cpee.gemspec +1 -1
- data/server/handlerwrappers/default.rb +12 -4
- data/server/instances/10/notifications/357012173866e5c3e592444c274e5eda/consumer-secret +1 -0
- data/server/instances/10/notifications/357012173866e5c3e592444c274e5eda/producer-secret +1 -0
- data/server/instances/10/notifications/357012173866e5c3e592444c274e5eda/subscription.xml +28 -0
- data/server/instances/10/properties.xml +145 -0
- data/server/instances/7/properties.xml +149 -0
- data/server/instances/8/properties.xml +145 -0
- data/server/instances/9/properties.xml +145 -0
- data/server/resources/transformation_dslx.xsl +120 -91
- metadata +8 -2
- data/server/server.pid +0 -1
@@ -0,0 +1,145 @@
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
+
<info>asd</info>
|
3
|
+
<state>stopped</state>
|
4
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
5
|
+
<positions/>
|
6
|
+
<dataelements>
|
7
|
+
<persons>0</persons>
|
8
|
+
<card>Visa_12345</card>
|
9
|
+
<airline>FlyNiki</airline>
|
10
|
+
<hotels>["Ibis","Mariott","Rathaus"]</hotels>
|
11
|
+
<from>Vienna</from>
|
12
|
+
<to>Prague</to>
|
13
|
+
<costs>724.0</costs>
|
14
|
+
</dataelements>
|
15
|
+
<endpoints>
|
16
|
+
<bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
|
17
|
+
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
18
|
+
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
19
|
+
</endpoints>
|
20
|
+
<dsl>call :a1, :bookAir, { :method => :post, :parameters => {:from => data.from, :to => data.to, :persons => data.persons} }, <<-end
|
21
|
+
data.airline = result.value('id')
|
22
|
+
data.costs += result.value('costs').to_f
|
23
|
+
status.update 1, 'Hotel'
|
24
|
+
end
|
25
|
+
parallel do
|
26
|
+
loop pre_test{data.persons > 0} do
|
27
|
+
parallel_branch data.persons do |p|
|
28
|
+
call :a2, :bookHotel, { :method => :post, :parameters => {:to => data.to} }, <<-end
|
29
|
+
data.hotels << result.value('id')
|
30
|
+
data.costs += result.value('costs').to_f
|
31
|
+
end
|
32
|
+
end
|
33
|
+
manipulate :a3, <<-end
|
34
|
+
data.persons -= 1
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
choose :inclusive do
|
39
|
+
alternative "data.costs > 700" do
|
40
|
+
call :a4, :approve, { :method => :post, :parameters => {:costs => data.costs} }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
</dsl>
|
44
|
+
<dslx>
|
45
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
46
|
+
<call id="a1" endpoint="bookAir">
|
47
|
+
<parameters>
|
48
|
+
<method>:post</method>
|
49
|
+
<parameters>
|
50
|
+
<from>data.from</from>
|
51
|
+
<to>data.to</to>
|
52
|
+
<persons>data.persons</persons>
|
53
|
+
</parameters>
|
54
|
+
</parameters>
|
55
|
+
<manipulate output="result"> data.airline = result.value('id')
|
56
|
+
data.costs += result.value('costs').to_f
|
57
|
+
status.update 1, 'Hotel'</manipulate>
|
58
|
+
</call>
|
59
|
+
<parallel>
|
60
|
+
<loop pre_test="data.persons > 0">
|
61
|
+
<parallel_branch pass="data.persons" local="p">
|
62
|
+
<call id="a2" endpoint="bookHotel">
|
63
|
+
<parameters>
|
64
|
+
<method>:post</method>
|
65
|
+
<parameters>
|
66
|
+
<to>data.to</to>
|
67
|
+
</parameters>
|
68
|
+
</parameters>
|
69
|
+
<manipulate output="result"> data.hotels << result.value('id')
|
70
|
+
data.costs += result.value('costs').to_f</manipulate>
|
71
|
+
</call>
|
72
|
+
</parallel_branch>
|
73
|
+
<manipulate id="a3"> data.persons -= 1</manipulate>
|
74
|
+
</loop>
|
75
|
+
</parallel>
|
76
|
+
<choose>
|
77
|
+
<alternative condition="data.costs > 700">
|
78
|
+
<call id="a4" endpoint="approve">
|
79
|
+
<parameters>
|
80
|
+
<method>:post</method>
|
81
|
+
<parameters>
|
82
|
+
<costs>data.costs</costs>
|
83
|
+
</parameters>
|
84
|
+
</parameters>
|
85
|
+
</call>
|
86
|
+
</alternative>
|
87
|
+
</choose>
|
88
|
+
</description>
|
89
|
+
</dslx>
|
90
|
+
<status>
|
91
|
+
<id>0</id>
|
92
|
+
<message>undefined</message>
|
93
|
+
</status>
|
94
|
+
<description>
|
95
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
96
|
+
<call id="a1" endpoint="bookAir">
|
97
|
+
<parameters>
|
98
|
+
<method>:post</method>
|
99
|
+
<parameters>
|
100
|
+
<from>data.from</from>
|
101
|
+
<to>data.to</to>
|
102
|
+
<persons>data.persons</persons>
|
103
|
+
</parameters>
|
104
|
+
</parameters>
|
105
|
+
<manipulate output="result"> data.airline = result.value('id')
|
106
|
+
data.costs += result.value('costs').to_f
|
107
|
+
status.update 1, 'Hotel'</manipulate>
|
108
|
+
</call>
|
109
|
+
<parallel>
|
110
|
+
<loop pre_test="data.persons > 0">
|
111
|
+
<parallel_branch pass="data.persons" local="p">
|
112
|
+
<call id="a2" endpoint="bookHotel">
|
113
|
+
<parameters>
|
114
|
+
<method>:post</method>
|
115
|
+
<parameters>
|
116
|
+
<to>data.to</to>
|
117
|
+
</parameters>
|
118
|
+
</parameters>
|
119
|
+
<manipulate output="result"> data.hotels << result.value('id')
|
120
|
+
data.costs += result.value('costs').to_f</manipulate>
|
121
|
+
</call>
|
122
|
+
</parallel_branch>
|
123
|
+
<manipulate id="a3"> data.persons -= 1</manipulate>
|
124
|
+
</loop>
|
125
|
+
</parallel>
|
126
|
+
<choose>
|
127
|
+
<alternative condition="data.costs > 700">
|
128
|
+
<call id="a4" endpoint="approve">
|
129
|
+
<parameters>
|
130
|
+
<method>:post</method>
|
131
|
+
<parameters>
|
132
|
+
<costs>data.costs</costs>
|
133
|
+
</parameters>
|
134
|
+
</parameters>
|
135
|
+
</call>
|
136
|
+
</alternative>
|
137
|
+
</choose>
|
138
|
+
</description>
|
139
|
+
</description>
|
140
|
+
<transformation>
|
141
|
+
<description type="copy"/>
|
142
|
+
<dataelements type="rest"/>
|
143
|
+
<endpoints type="rest"/>
|
144
|
+
</transformation>
|
145
|
+
</properties>
|
@@ -1,28 +1,25 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
|
-
<xsl:stylesheet version="1.0"
|
3
|
-
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
4
|
-
xmlns:d="http://cpee.org/ns/description/1.0"
|
5
|
-
xmlns:str="http://exslt.org/strings">
|
6
|
-
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://cpee.org/ns/description/1.0" xmlns:str="http://exslt.org/strings" version="1.0">
|
7
3
|
<xsl:output method="text"/>
|
8
4
|
<xsl:strip-space elements="*"/>
|
9
5
|
<xsl:variable name="myspacemultiplier">2</xsl:variable>
|
10
|
-
|
11
6
|
<xsl:template match="/">
|
12
7
|
<xsl:apply-templates select="//d:description"/>
|
13
8
|
</xsl:template>
|
14
|
-
|
15
9
|
<xsl:template match="//d:description">
|
16
10
|
<xsl:apply-templates>
|
17
|
-
<xsl:with-param name="myspace"
|
18
|
-
|
11
|
+
<xsl:with-param name="myspace">
|
12
|
+
<xsl:value-of select="-1*$myspacemultiplier"/>
|
13
|
+
</xsl:with-param>
|
14
|
+
</xsl:apply-templates>
|
19
15
|
</xsl:template>
|
20
|
-
|
21
16
|
<xsl:template match="*">
|
22
17
|
<xsl:param name="myspace"/>
|
23
18
|
<xsl:call-template name="print-space">
|
24
19
|
<xsl:with-param name="i">1</xsl:with-param>
|
25
|
-
<xsl:with-param name="count"
|
20
|
+
<xsl:with-param name="count">
|
21
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
22
|
+
</xsl:with-param>
|
26
23
|
</xsl:call-template>
|
27
24
|
<xsl:if test="name()='call' or name()='manipulate'">
|
28
25
|
<xsl:value-of select="name()"/>
|
@@ -32,10 +29,10 @@
|
|
32
29
|
<xsl:if test="name()='call'">
|
33
30
|
<xsl:text>, </xsl:text>
|
34
31
|
<xsl:choose>
|
35
|
-
<xsl:when test="count(str:tokenize(@endpoint,' '))
|
32
|
+
<xsl:when test="count(str:tokenize(@endpoint,' ')) > 1">
|
36
33
|
<xsl:text>[</xsl:text>
|
37
34
|
<xsl:for-each select="str:tokenize(@endpoint,' ')">
|
38
|
-
<xsl:if test="position()
|
35
|
+
<xsl:if test="position() >1">, </xsl:if>
|
39
36
|
<xsl:text>:</xsl:text>
|
40
37
|
<xsl:value-of select="."/>
|
41
38
|
</xsl:for-each>
|
@@ -45,18 +42,22 @@
|
|
45
42
|
<xsl:text>:</xsl:text>
|
46
43
|
<xsl:value-of select="@endpoint"/>
|
47
44
|
</xsl:otherwise>
|
48
|
-
</xsl:choose>
|
45
|
+
</xsl:choose>
|
49
46
|
<xsl:text>, { </xsl:text>
|
50
47
|
<xsl:apply-templates select="d:parameters"/>
|
51
48
|
<xsl:text> }</xsl:text>
|
52
49
|
<xsl:apply-templates select="d:manipulate" mode="part-of-call">
|
53
|
-
<xsl:with-param name="myspace"
|
50
|
+
<xsl:with-param name="myspace">
|
51
|
+
<xsl:value-of select="$myspace"/>
|
52
|
+
</xsl:with-param>
|
54
53
|
</xsl:apply-templates>
|
55
54
|
<xsl:call-template name="print-newline"/>
|
56
55
|
</xsl:if>
|
57
56
|
<xsl:if test="name()='manipulate'">
|
58
57
|
<xsl:call-template name="print-content">
|
59
|
-
<xsl:with-param name="myspace"
|
58
|
+
<xsl:with-param name="myspace">
|
59
|
+
<xsl:value-of select="$myspace"/>
|
60
|
+
</xsl:with-param>
|
60
61
|
</xsl:call-template>
|
61
62
|
<xsl:call-template name="print-newline"/>
|
62
63
|
</xsl:if>
|
@@ -67,17 +68,21 @@
|
|
67
68
|
<xsl:if test="name()='parallel'">
|
68
69
|
<xsl:text>parallel</xsl:text>
|
69
70
|
<xsl:if test="@wait">
|
70
|
-
<xsl:text> :wait
|
71
|
+
<xsl:text> :wait => </xsl:text>
|
71
72
|
<xsl:value-of select="@wait"/>
|
72
73
|
</xsl:if>
|
73
74
|
<xsl:text> do</xsl:text>
|
74
75
|
<xsl:call-template name="print-newline"/>
|
75
76
|
<xsl:apply-templates>
|
76
|
-
<xsl:with-param name="myspace"
|
77
|
+
<xsl:with-param name="myspace">
|
78
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
79
|
+
</xsl:with-param>
|
77
80
|
</xsl:apply-templates>
|
78
81
|
<xsl:call-template name="print-space">
|
79
82
|
<xsl:with-param name="i">1</xsl:with-param>
|
80
|
-
<xsl:with-param name="count"
|
83
|
+
<xsl:with-param name="count">
|
84
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
85
|
+
</xsl:with-param>
|
81
86
|
</xsl:call-template>
|
82
87
|
<xsl:text>end</xsl:text>
|
83
88
|
<xsl:call-template name="print-newline"/>
|
@@ -90,7 +95,7 @@
|
|
90
95
|
<xsl:text>pre_test{</xsl:text>
|
91
96
|
<xsl:value-of select="@pre_test"/>
|
92
97
|
<xsl:text>} </xsl:text>
|
93
|
-
</xsl:when>
|
98
|
+
</xsl:when>
|
94
99
|
<xsl:otherwise>
|
95
100
|
<xsl:text>pre_test("</xsl:text>
|
96
101
|
<xsl:value-of select="@pre_test"/>
|
@@ -104,7 +109,7 @@
|
|
104
109
|
<xsl:text>post_test{</xsl:text>
|
105
110
|
<xsl:value-of select="@post_test"/>
|
106
111
|
<xsl:text>} </xsl:text>
|
107
|
-
</xsl:when>
|
112
|
+
</xsl:when>
|
108
113
|
<xsl:otherwise>
|
109
114
|
<xsl:text>post_test("</xsl:text>
|
110
115
|
<xsl:value-of select="@post_test"/>
|
@@ -115,40 +120,50 @@
|
|
115
120
|
<xsl:text>do</xsl:text>
|
116
121
|
<xsl:call-template name="print-newline"/>
|
117
122
|
<xsl:apply-templates>
|
118
|
-
<xsl:with-param name="myspace"
|
123
|
+
<xsl:with-param name="myspace">
|
124
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
125
|
+
</xsl:with-param>
|
119
126
|
</xsl:apply-templates>
|
120
127
|
<xsl:call-template name="print-space">
|
121
128
|
<xsl:with-param name="i">1</xsl:with-param>
|
122
|
-
<xsl:with-param name="count"
|
129
|
+
<xsl:with-param name="count">
|
130
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
131
|
+
</xsl:with-param>
|
123
132
|
</xsl:call-template>
|
124
133
|
<xsl:text>end</xsl:text>
|
125
134
|
<xsl:call-template name="print-newline"/>
|
126
135
|
</xsl:if>
|
127
136
|
<xsl:if test="name()='choose'">
|
128
137
|
<xsl:text>choose </xsl:text>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
138
|
+
<xsl:choose>
|
139
|
+
<xsl:when test="@mode='exclusive'">
|
140
|
+
<xsl:text>:exclusive</xsl:text>
|
141
|
+
</xsl:when>
|
142
|
+
<xsl:otherwise>
|
143
|
+
<xsl:text>:inclusive</xsl:text>
|
144
|
+
</xsl:otherwise>
|
145
|
+
</xsl:choose>
|
137
146
|
<xsl:text> do</xsl:text>
|
138
147
|
<xsl:call-template name="print-newline"/>
|
139
148
|
<xsl:apply-templates>
|
140
|
-
<xsl:with-param name="myspace"
|
149
|
+
<xsl:with-param name="myspace">
|
150
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
151
|
+
</xsl:with-param>
|
141
152
|
</xsl:apply-templates>
|
142
153
|
<xsl:call-template name="print-space">
|
143
154
|
<xsl:with-param name="i">1</xsl:with-param>
|
144
|
-
<xsl:with-param name="count"
|
155
|
+
<xsl:with-param name="count">
|
156
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
157
|
+
</xsl:with-param>
|
145
158
|
</xsl:call-template>
|
146
159
|
<xsl:text>end</xsl:text>
|
147
160
|
<xsl:call-template name="print-newline"/>
|
148
161
|
</xsl:if>
|
149
162
|
<xsl:if test="name()='group'">
|
150
163
|
<xsl:apply-templates>
|
151
|
-
<xsl:with-param name="myspace"
|
164
|
+
<xsl:with-param name="myspace">
|
165
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
166
|
+
</xsl:with-param>
|
152
167
|
</xsl:apply-templates>
|
153
168
|
<xsl:call-template name="print-newline"/>
|
154
169
|
</xsl:if>
|
@@ -158,22 +173,27 @@
|
|
158
173
|
<xsl:text> do</xsl:text>
|
159
174
|
<xsl:call-template name="print-newline"/>
|
160
175
|
<xsl:apply-templates>
|
161
|
-
<xsl:with-param name="myspace"
|
176
|
+
<xsl:with-param name="myspace">
|
177
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
178
|
+
</xsl:with-param>
|
162
179
|
</xsl:apply-templates>
|
163
180
|
<xsl:call-template name="print-space">
|
164
181
|
<xsl:with-param name="i">1</xsl:with-param>
|
165
|
-
<xsl:with-param name="count"
|
182
|
+
<xsl:with-param name="count">
|
183
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
184
|
+
</xsl:with-param>
|
166
185
|
</xsl:call-template>
|
167
186
|
<xsl:text>end</xsl:text>
|
168
187
|
<xsl:call-template name="print-newline"/>
|
169
188
|
</xsl:if>
|
170
189
|
</xsl:template>
|
171
|
-
|
172
190
|
<xsl:template match="d:alternative">
|
173
191
|
<xsl:param name="myspace"/>
|
174
192
|
<xsl:call-template name="print-space">
|
175
193
|
<xsl:with-param name="i">1</xsl:with-param>
|
176
|
-
<xsl:with-param name="count"
|
194
|
+
<xsl:with-param name="count">
|
195
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
196
|
+
</xsl:with-param>
|
177
197
|
</xsl:call-template>
|
178
198
|
<xsl:text>alternative </xsl:text>
|
179
199
|
<xsl:choose>
|
@@ -181,7 +201,7 @@
|
|
181
201
|
<xsl:text>"</xsl:text>
|
182
202
|
<xsl:value-of select="@condition"/>
|
183
203
|
<xsl:text>"</xsl:text>
|
184
|
-
</xsl:when>
|
204
|
+
</xsl:when>
|
185
205
|
<xsl:otherwise>
|
186
206
|
<xsl:text>"</xsl:text>
|
187
207
|
<xsl:value-of select="@condition"/>
|
@@ -191,40 +211,50 @@
|
|
191
211
|
<xsl:text> do</xsl:text>
|
192
212
|
<xsl:call-template name="print-newline"/>
|
193
213
|
<xsl:apply-templates>
|
194
|
-
<xsl:with-param name="myspace"
|
214
|
+
<xsl:with-param name="myspace">
|
215
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
216
|
+
</xsl:with-param>
|
195
217
|
</xsl:apply-templates>
|
196
218
|
<xsl:call-template name="print-space">
|
197
219
|
<xsl:with-param name="i">1</xsl:with-param>
|
198
|
-
<xsl:with-param name="count"
|
220
|
+
<xsl:with-param name="count">
|
221
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
222
|
+
</xsl:with-param>
|
199
223
|
</xsl:call-template>
|
200
224
|
<xsl:text>end</xsl:text>
|
201
225
|
<xsl:call-template name="print-newline"/>
|
202
226
|
</xsl:template>
|
203
|
-
|
204
227
|
<xsl:template match="d:otherwise">
|
205
228
|
<xsl:param name="myspace"/>
|
206
229
|
<xsl:call-template name="print-space">
|
207
230
|
<xsl:with-param name="i">1</xsl:with-param>
|
208
|
-
<xsl:with-param name="count"
|
231
|
+
<xsl:with-param name="count">
|
232
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
233
|
+
</xsl:with-param>
|
209
234
|
</xsl:call-template>
|
210
235
|
<xsl:text>otherwise do</xsl:text>
|
211
236
|
<xsl:call-template name="print-newline"/>
|
212
237
|
<xsl:apply-templates>
|
213
|
-
<xsl:with-param name="myspace"
|
238
|
+
<xsl:with-param name="myspace">
|
239
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
240
|
+
</xsl:with-param>
|
214
241
|
</xsl:apply-templates>
|
215
242
|
<xsl:call-template name="print-space">
|
216
243
|
<xsl:with-param name="i">1</xsl:with-param>
|
217
|
-
<xsl:with-param name="count"
|
244
|
+
<xsl:with-param name="count">
|
245
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
246
|
+
</xsl:with-param>
|
218
247
|
</xsl:call-template>
|
219
248
|
<xsl:text>end</xsl:text>
|
220
249
|
<xsl:call-template name="print-newline"/>
|
221
250
|
</xsl:template>
|
222
|
-
|
223
251
|
<xsl:template match="d:parallel_branch">
|
224
252
|
<xsl:param name="myspace"/>
|
225
253
|
<xsl:call-template name="print-space">
|
226
254
|
<xsl:with-param name="i">1</xsl:with-param>
|
227
|
-
<xsl:with-param name="count"
|
255
|
+
<xsl:with-param name="count">
|
256
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
257
|
+
</xsl:with-param>
|
228
258
|
</xsl:call-template>
|
229
259
|
<xsl:text>parallel_branch</xsl:text>
|
230
260
|
<xsl:if test="@pass">
|
@@ -239,77 +269,76 @@
|
|
239
269
|
</xsl:if>
|
240
270
|
<xsl:call-template name="print-newline"/>
|
241
271
|
<xsl:apply-templates>
|
242
|
-
<xsl:with-param name="myspace"
|
272
|
+
<xsl:with-param name="myspace">
|
273
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
274
|
+
</xsl:with-param>
|
243
275
|
</xsl:apply-templates>
|
244
276
|
<xsl:call-template name="print-space">
|
245
277
|
<xsl:with-param name="i">1</xsl:with-param>
|
246
|
-
<xsl:with-param name="count"
|
278
|
+
<xsl:with-param name="count">
|
279
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
280
|
+
</xsl:with-param>
|
247
281
|
</xsl:call-template>
|
248
282
|
<xsl:text>end</xsl:text>
|
249
283
|
<xsl:call-template name="print-newline"/>
|
250
284
|
</xsl:template>
|
251
|
-
|
252
285
|
<xsl:template match="d:parameters">
|
253
286
|
<xsl:apply-templates select="d:*" mode="parameter"/>
|
254
287
|
</xsl:template>
|
255
|
-
|
256
288
|
<xsl:template match="d:*" mode="parameter">
|
257
|
-
<xsl:
|
258
|
-
|
259
|
-
<xsl:text>:</xsl:text>
|
260
|
-
</xsl:when>
|
261
|
-
<xsl:otherwise>
|
262
|
-
<xsl:text>, :</xsl:text>
|
263
|
-
</xsl:otherwise>
|
264
|
-
</xsl:choose>
|
289
|
+
<xsl:if test="position() >1">, </xsl:if>
|
290
|
+
<xsl:text>:</xsl:text>
|
265
291
|
<xsl:value-of select="name()"/>
|
266
|
-
<xsl:text>
|
267
|
-
|
268
|
-
|
292
|
+
<xsl:text> => </xsl:text>
|
293
|
+
|
294
|
+
<xsl:choose>
|
295
|
+
<xsl:when test="count(*) > 0">
|
269
296
|
<xsl:text>{</xsl:text>
|
270
|
-
<xsl:apply-templates select="d:*" mode="
|
297
|
+
<xsl:apply-templates select="d:*" mode="parameter"/>
|
271
298
|
<xsl:text>}</xsl:text>
|
272
299
|
</xsl:when>
|
273
|
-
<xsl:
|
300
|
+
<xsl:when test="count(@*) > 0">
|
301
|
+
<xsl:text>Struct.new(:value,</xsl:text>
|
302
|
+
<xsl:for-each select="@*">
|
303
|
+
<xsl:if test="position() >1">, </xsl:if>
|
304
|
+
<xsl:text>:</xsl:text>
|
305
|
+
<xsl:value-of select="name(.)"/>
|
306
|
+
</xsl:for-each>
|
307
|
+
<xsl:text>).new(</xsl:text>
|
308
|
+
<xsl:text></xsl:text>
|
274
309
|
<xsl:choose>
|
275
|
-
<xsl:when test="@type = 'symbolic'">
|
276
|
-
<xsl:value-of select="text()"/>
|
277
|
-
</xsl:when>
|
278
310
|
<xsl:when test="not(node())">
|
279
311
|
<xsl:text>nil</xsl:text>
|
280
312
|
</xsl:when>
|
281
313
|
<xsl:otherwise>
|
282
|
-
<xsl:text>"</xsl:text>
|
283
314
|
<xsl:value-of select="text()"/>
|
284
|
-
<xsl:text>"</xsl:text>
|
285
315
|
</xsl:otherwise>
|
286
|
-
</xsl:choose>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
<xsl:text> </xsl:text>
|
316
|
+
</xsl:choose>
|
317
|
+
<xsl:text>,</xsl:text>
|
318
|
+
<xsl:for-each select="@*">
|
319
|
+
<xsl:if test="position() >1">, </xsl:if>
|
320
|
+
<xsl:text>"</xsl:text>
|
321
|
+
<xsl:value-of select="string(.)"/>
|
322
|
+
<xsl:text>"</xsl:text>
|
323
|
+
</xsl:for-each>
|
324
|
+
<xsl:text>)</xsl:text>
|
325
|
+
</xsl:when>
|
326
|
+
<xsl:when test="not(node())">
|
327
|
+
<xsl:text>nil</xsl:text>
|
299
328
|
</xsl:when>
|
300
329
|
<xsl:otherwise>
|
301
|
-
<xsl:text
|
330
|
+
<xsl:value-of select="text()"/>
|
302
331
|
</xsl:otherwise>
|
303
|
-
</xsl:choose>
|
332
|
+
</xsl:choose>
|
304
333
|
</xsl:template>
|
305
|
-
|
306
334
|
<xsl:template match="d:manipulate" mode="part-of-call">
|
307
335
|
<xsl:param name="myspace"/>
|
308
336
|
<xsl:call-template name="print-content">
|
309
|
-
<xsl:with-param name="myspace"
|
337
|
+
<xsl:with-param name="myspace">
|
338
|
+
<xsl:value-of select="$myspace"/>
|
339
|
+
</xsl:with-param>
|
310
340
|
</xsl:call-template>
|
311
341
|
</xsl:template>
|
312
|
-
|
313
342
|
<xsl:template name="print-content">
|
314
343
|
<xsl:param name="myspace"/>
|
315
344
|
<xsl:if test="text()">
|
@@ -321,7 +350,7 @@
|
|
321
350
|
<xsl:value-of select="@output"/>
|
322
351
|
<xsl:text>|</xsl:text>
|
323
352
|
</xsl:if>
|
324
|
-
</xsl:when>
|
353
|
+
</xsl:when>
|
325
354
|
<xsl:otherwise>
|
326
355
|
<xsl:text>, <<-end </xsl:text>
|
327
356
|
</xsl:otherwise>
|
@@ -331,12 +360,13 @@
|
|
331
360
|
<xsl:call-template name="print-newline"/>
|
332
361
|
<xsl:call-template name="print-space">
|
333
362
|
<xsl:with-param name="i">1</xsl:with-param>
|
334
|
-
<xsl:with-param name="count"
|
363
|
+
<xsl:with-param name="count">
|
364
|
+
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
365
|
+
</xsl:with-param>
|
335
366
|
</xsl:call-template>
|
336
367
|
<xsl:text>end</xsl:text>
|
337
368
|
</xsl:if>
|
338
369
|
</xsl:template>
|
339
|
-
|
340
370
|
<xsl:template name="print-space">
|
341
371
|
<xsl:param name="i"/>
|
342
372
|
<xsl:param name="count"/>
|
@@ -356,5 +386,4 @@
|
|
356
386
|
<xsl:text>
|
357
387
|
</xsl:text>
|
358
388
|
</xsl:template>
|
359
|
-
|
360
389
|
</xsl:stylesheet>
|