kwartz 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +36 -1
- data/LGPL +504 -0
- data/README.txt +16 -2
- data/bin/kwartz +1 -1
- data/doc-api/classes/Kwartz.html +47 -1
- data/doc-api/classes/Kwartz/Assertion.html +6 -6
- data/doc-api/classes/Kwartz/AssertionError.html +6 -6
- data/doc-api/classes/Kwartz/AttrInfo.html +42 -42
- data/doc-api/classes/Kwartz/BaseError.html +12 -12
- data/doc-api/classes/Kwartz/BaseTranslator.html +210 -43
- data/doc-api/classes/Kwartz/CharacterType.html +24 -24
- data/doc-api/classes/Kwartz/CommandOptionError.html +7 -7
- data/doc-api/classes/Kwartz/CommandOptions.html +49 -49
- data/doc-api/classes/Kwartz/Config.html +6 -1
- data/doc-api/classes/Kwartz/ConvertError.html +14 -14
- data/doc-api/classes/Kwartz/Converter.html +31 -30
- data/doc-api/classes/Kwartz/CssStyleParser.html +79 -57
- data/doc-api/classes/Kwartz/Defun.html +313 -0
- data/doc-api/classes/Kwartz/DocumentRuleset.html +58 -58
- data/doc-api/classes/Kwartz/ElementExpander.html +32 -32
- data/doc-api/classes/Kwartz/ElementInfo.html +29 -29
- data/doc-api/classes/Kwartz/ElementRuleset.html +126 -96
- data/doc-api/classes/Kwartz/EperlHandler.html +108 -84
- data/doc-api/classes/Kwartz/EperlTranslator.html +7 -7
- data/doc-api/classes/Kwartz/ErubisHandler.html +2 -2
- data/doc-api/classes/Kwartz/ErubisTranslator.html +8 -8
- data/doc-api/classes/Kwartz/ErubyHandler.html +2 -220
- data/doc-api/classes/Kwartz/ErubyTranslator.html +7 -7
- data/doc-api/classes/Kwartz/ExpandStatement.html +20 -20
- data/doc-api/classes/Kwartz/Handler.html +122 -117
- data/doc-api/classes/Kwartz/HandlerArgument.html +215 -0
- data/doc-api/classes/Kwartz/Helper.html +112 -0
- data/doc-api/classes/Kwartz/Helper/ActionViewHelper.html +221 -0
- data/doc-api/classes/Kwartz/Helper/RailsTemplate.html +630 -0
- data/doc-api/classes/Kwartz/JstlHandler.html +208 -193
- data/doc-api/classes/Kwartz/JstlTranslator.html +15 -15
- data/doc-api/classes/Kwartz/KwartzError.html +6 -6
- data/doc-api/classes/Kwartz/Main.html +39 -23
- data/doc-api/classes/Kwartz/NativeExpression.html +18 -18
- data/doc-api/classes/Kwartz/NativeStatement.html +25 -25
- data/doc-api/classes/Kwartz/Node.html +6 -6
- data/doc-api/classes/Kwartz/PIErubisHandler.html +113 -0
- data/doc-api/classes/Kwartz/PIErubisTranslator.html +200 -0
- data/doc-api/classes/Kwartz/ParseError.html +6 -6
- data/doc-api/classes/Kwartz/PhpHandler.html +102 -83
- data/doc-api/classes/Kwartz/PhpTranslator.html +14 -14
- data/doc-api/classes/Kwartz/PresentationLogicParser.html +136 -128
- data/doc-api/classes/Kwartz/PrintStatement.html +19 -19
- data/doc-api/classes/Kwartz/RailsHandler.html +121 -118
- data/doc-api/classes/Kwartz/RailsTranslator.html +7 -7
- data/doc-api/classes/Kwartz/RubyHandler.html +349 -0
- data/doc-api/classes/Kwartz/RubyStyleParser.html +85 -85
- data/doc-api/classes/Kwartz/RubyTranslator.html +218 -0
- data/doc-api/classes/Kwartz/StatementHelper.html +479 -0
- data/doc-api/classes/Kwartz/StrutsTranslator.html +12 -12
- data/doc-api/classes/Kwartz/TagInfo.html +28 -28
- data/doc-api/classes/Kwartz/TextConverter.html +28 -28
- data/doc-api/classes/Kwartz/Translator.html +42 -42
- data/doc-api/classes/Kwartz/Util.html +284 -0
- data/doc-api/created.rid +1 -1
- data/doc-api/files/__/README_txt.html +30 -3
- data/doc-api/files/kwartz/assert_rb.html +1 -1
- data/doc-api/files/kwartz/binding/eperl_rb.html +2 -2
- data/doc-api/files/kwartz/binding/erubis_rb.html +3 -3
- data/doc-api/files/kwartz/binding/eruby_rb.html +3 -2
- data/doc-api/files/kwartz/binding/jstl_rb.html +2 -2
- data/doc-api/files/kwartz/binding/php_rb.html +2 -2
- data/doc-api/files/kwartz/binding/pierubis_rb.html +116 -0
- data/doc-api/files/kwartz/binding/rails_rb.html +2 -2
- data/doc-api/files/kwartz/binding/ruby_rb.html +115 -0
- data/doc-api/files/kwartz/binding/struts_rb.html +1 -1
- data/doc-api/files/kwartz/config_rb.html +2 -2
- data/doc-api/files/kwartz/converter_rb.html +3 -2
- data/doc-api/files/kwartz/defun_rb.html +116 -0
- data/doc-api/files/kwartz/error_rb.html +1 -1
- data/doc-api/files/kwartz/helper/rails_rb.html +123 -0
- data/doc-api/files/kwartz/main_rb.html +5 -2
- data/doc-api/files/kwartz/node_rb.html +2 -2
- data/doc-api/files/kwartz/parser_rb.html +2 -2
- data/doc-api/files/kwartz/translator_rb.html +2 -2
- data/doc-api/files/kwartz/util/assert-text-equal_rb.html +1 -1
- data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
- data/doc-api/files/kwartz/util_rb.html +107 -0
- data/doc-api/files/kwartz_rb.html +3 -2
- data/doc-api/fr_class_index.html +11 -0
- data/doc-api/fr_file_index.html +5 -0
- data/doc-api/fr_method_index.html +242 -190
- data/doc/p-pattern.html +94 -94
- data/doc/reference.html +847 -612
- data/doc/users-guide.html +744 -241
- data/examples/rails1/README +2 -2
- data/examples/rails1/application_helper.rb +2 -27
- data/examples/rails1/link_to.plogic +5 -5
- data/examples/rails1/list.plogic +2 -2
- data/examples/rails2/app/controllers/application.rb +14 -0
- data/examples/rails2/app/controllers/groups_controller.rb +47 -0
- data/examples/rails2/app/controllers/members_controller.rb +56 -0
- data/examples/rails2/app/helpers/application_helper.rb +6 -0
- data/examples/rails2/app/helpers/groups_helper.rb +2 -0
- data/examples/rails2/app/helpers/members_helper.rb +2 -0
- data/examples/rails2/app/models/group.rb +2 -0
- data/examples/rails2/app/models/member.rb +3 -0
- data/examples/rails2/app/views/groups/_form.html +30 -0
- data/examples/rails2/app/views/groups/_form.plogic +11 -0
- data/examples/rails2/app/views/groups/_link.plogic +19 -0
- data/examples/rails2/app/views/groups/_read.plogic +7 -0
- data/examples/rails2/app/views/groups/edit.cfg.yaml +2 -0
- data/examples/rails2/app/views/groups/edit.html +26 -0
- data/examples/rails2/app/views/groups/edit.plogic +9 -0
- data/examples/rails2/app/views/groups/list.html +48 -0
- data/examples/rails2/app/views/groups/list.plogic +32 -0
- data/examples/rails2/app/views/groups/new.cfg.yaml +2 -0
- data/examples/rails2/app/views/groups/new.html +27 -0
- data/examples/rails2/app/views/groups/new.plogic +9 -0
- data/examples/rails2/app/views/groups/show.html +27 -0
- data/examples/rails2/app/views/groups/show.plogic +2 -0
- data/examples/rails2/app/views/layouts/groups.html +23 -0
- data/examples/rails2/app/views/layouts/groups.plogic +11 -0
- data/examples/rails2/app/views/layouts/members.html +23 -0
- data/examples/rails2/app/views/layouts/members.plogic +11 -0
- data/examples/rails2/app/views/layouts/members2.html +24 -0
- data/examples/rails2/app/views/layouts/members2.plogic +11 -0
- data/examples/rails2/app/views/members/_form.plogic +27 -0
- data/examples/rails2/app/views/members/_link.plogic +19 -0
- data/examples/rails2/app/views/members/_read.plogic +29 -0
- data/examples/rails2/app/views/members/edit.cfg.yaml +6 -0
- data/examples/rails2/app/views/members/edit.html +27 -0
- data/examples/rails2/app/views/members/edit.plogic +10 -0
- data/examples/rails2/app/views/members/list.html +53 -0
- data/examples/rails2/app/views/members/list.plogic +32 -0
- data/examples/rails2/app/views/members/new.html +61 -0
- data/examples/rails2/app/views/members/new.plogic +17 -0
- data/examples/rails2/app/views/members/show.html +41 -0
- data/examples/rails2/app/views/members/show.plogic +3 -0
- data/examples/rails2/db/create-tables.mysql.sql +27 -0
- data/examples/rails2/db/create-tables.pgsql.sql +27 -0
- data/examples/rails2/db/insert-data.sql +21 -0
- data/examples/rails2/db/tabledef.yaml +51 -0
- data/kwartz.gemspec +4 -4
- data/lib/kwartz.rb +10 -2
- data/lib/kwartz/assert.rb +1 -1
- data/lib/kwartz/binding/eperl.rb +85 -61
- data/lib/kwartz/binding/erubis.rb +6 -8
- data/lib/kwartz/binding/eruby.rb +5 -120
- data/lib/kwartz/binding/jstl.rb +116 -101
- data/lib/kwartz/binding/php.rb +79 -60
- data/lib/kwartz/binding/pierubis.rb +58 -0
- data/lib/kwartz/binding/rails.rb +45 -42
- data/lib/kwartz/binding/ruby.rb +193 -0
- data/lib/kwartz/binding/struts.rb +1 -1
- data/lib/kwartz/config.rb +4 -3
- data/lib/kwartz/converter.rb +231 -68
- data/lib/kwartz/defun.rb +126 -0
- data/lib/kwartz/error.rb +1 -1
- data/lib/kwartz/helper/rails.rb +437 -0
- data/lib/kwartz/main.rb +30 -38
- data/lib/kwartz/node.rb +46 -31
- data/lib/kwartz/parser.rb +43 -15
- data/lib/kwartz/translator.rb +104 -6
- data/lib/kwartz/util.rb +113 -0
- data/lib/kwartz/util/assert-text-equal.rb +1 -1
- data/lib/kwartz/util/testcase-helper.rb +26 -8
- data/test/test-compile.rb +3 -3
- data/test/test-compile.yaml +135 -5
- data/test/test-converter.rb +16 -8
- data/test/test-converter.yaml +307 -76
- data/test/test-directives.rb +1 -1
- data/test/test-directives.yaml +964 -979
- data/test/test-main.rb +61 -146
- data/test/test-main.yaml +235 -0
- data/test/test-parser.rb +10 -12
- data/test/test-parser.yaml +484 -326
- data/test/test-rails.rb +1 -1
- data/test/test-rails.yaml +37 -37
- data/test/test-ruleset.rb +1 -1
- data/test/test-ruleset.yaml +34 -40
- data/test/test.rb +1 -1
- metadata +82 -3
- data/COPYING +0 -340
data/doc/reference.html
CHANGED
|
@@ -105,6 +105,8 @@ It means that presentation logics are separated from both presentation data (typ
|
|
|
105
105
|
</li>
|
|
106
106
|
<li><a href="#directive-replace">replace_element/content_with_element/content</a>
|
|
107
107
|
</li>
|
|
108
|
+
<li><a href="#directive-replace2">replace_element_with, replace_content_with</a>
|
|
109
|
+
</li>
|
|
108
110
|
</ul>
|
|
109
111
|
</li>
|
|
110
112
|
<li><a href="#cmdline">Command-Line Options</a>
|
|
@@ -166,21 +168,21 @@ presentation data (ex-elem.pdata)</div>
|
|
|
166
168
|
<div class="program_caption">
|
|
167
169
|
presentation logic (ex-elem.plogic)</div>
|
|
168
170
|
<pre class="program">#name1 {
|
|
169
|
-
<
|
|
171
|
+
<strong>elem:</strong> user[:name];
|
|
170
172
|
}
|
|
171
173
|
#name2 {
|
|
172
|
-
<
|
|
174
|
+
<strong>Elem:</strong> user[:name];
|
|
173
175
|
}
|
|
174
176
|
#name3 {
|
|
175
|
-
<
|
|
177
|
+
<strong>ELEM:</strong> user[:name];
|
|
176
178
|
}
|
|
177
179
|
</pre>
|
|
178
180
|
<div class="terminal_caption">
|
|
179
181
|
compile</div>
|
|
180
182
|
<pre class="terminal">$ kwartz -l eruby -p ex-elem.plogic ex-elem.pdata
|
|
181
|
-
<
|
|
182
|
-
<
|
|
183
|
-
<
|
|
183
|
+
<strong><%= user[:name] %></strong>
|
|
184
|
+
<strong><%=h user[:name] %></strong>
|
|
185
|
+
<strong><%= user[:name] %></strong>
|
|
184
186
|
</pre>
|
|
185
187
|
<br>
|
|
186
188
|
|
|
@@ -195,21 +197,21 @@ presentation data (ex-elem.pdata)</div>
|
|
|
195
197
|
<div class="program_caption">
|
|
196
198
|
presentation logic (ex-elem.plogic)</div>
|
|
197
199
|
<pre class="program">#name1 {
|
|
198
|
-
<
|
|
200
|
+
<strong>elem:</strong> $user['name'];
|
|
199
201
|
}
|
|
200
202
|
#name2 {
|
|
201
|
-
<
|
|
203
|
+
<strong>Elem:</strong> $user['name'];
|
|
202
204
|
}
|
|
203
205
|
#name3 {
|
|
204
|
-
<
|
|
206
|
+
<strong>ELEM:</strong> $user['name'];
|
|
205
207
|
}
|
|
206
208
|
</pre>
|
|
207
209
|
<div class="terminal_caption">
|
|
208
210
|
compile</div>
|
|
209
211
|
<pre class="terminal">$ kwartz -l php -p ex-elem.plogic ex-elem.pdata
|
|
210
|
-
<
|
|
211
|
-
<
|
|
212
|
-
<
|
|
212
|
+
<strong><?php echo $user['name']; ?></strong>
|
|
213
|
+
<strong><?php echo htmlspecialchars($user['name']); ?></strong>
|
|
214
|
+
<strong><?php echo $user['name']; ?></strong>
|
|
213
215
|
</pre>
|
|
214
216
|
<br>
|
|
215
217
|
|
|
@@ -224,13 +226,13 @@ presentation data (ex-elem.pdata)</div>
|
|
|
224
226
|
<div class="program_caption">
|
|
225
227
|
presentation logic (ex-elem.plogic)</div>
|
|
226
228
|
<pre class="program">#name1 {
|
|
227
|
-
<
|
|
229
|
+
<strong>elem:</strong> user.name;
|
|
228
230
|
}
|
|
229
231
|
#name2 {
|
|
230
|
-
<
|
|
232
|
+
<strong>Elem:</strong> user.name;
|
|
231
233
|
}
|
|
232
234
|
#name3 {
|
|
233
|
-
<
|
|
235
|
+
<strong>ELEM:</strong> user.name;
|
|
234
236
|
}
|
|
235
237
|
</pre>
|
|
236
238
|
<div class="terminal_caption">
|
|
@@ -238,9 +240,9 @@ compile</div>
|
|
|
238
240
|
<pre class="terminal">$ kwartz -l jstl -p ex-elem.plogic ex-elem.pdata
|
|
239
241
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
240
242
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
241
|
-
<
|
|
242
|
-
<
|
|
243
|
-
<
|
|
243
|
+
<strong>${user.name}</strong>
|
|
244
|
+
<strong>${user.name}</strong>
|
|
245
|
+
<strong><c:out value="${user.name}" escapeXml="false"/></strong>
|
|
244
246
|
</pre>
|
|
245
247
|
<br>
|
|
246
248
|
|
|
@@ -255,21 +257,21 @@ presentation data (ex-elem.pdata)</div>
|
|
|
255
257
|
<div class="program_caption">
|
|
256
258
|
presentation logic (ex-elem.plogic)</div>
|
|
257
259
|
<pre class="program">#name1 {
|
|
258
|
-
<
|
|
260
|
+
<strong>elem:</strong> $user{'name'};
|
|
259
261
|
}
|
|
260
262
|
#name2 {
|
|
261
|
-
<
|
|
263
|
+
<strong>Elem:</strong> $user{'name'};
|
|
262
264
|
}
|
|
263
265
|
#name3 {
|
|
264
|
-
<
|
|
266
|
+
<strong>ELEM:</strong> $user{'name'};
|
|
265
267
|
}
|
|
266
268
|
</pre>
|
|
267
269
|
<div class="terminal_caption">
|
|
268
270
|
compile</div>
|
|
269
271
|
<pre class="terminal">$ kwartz -l eperl -p ex-elem.plogic ex-elem.pdata
|
|
270
|
-
<
|
|
271
|
-
<
|
|
272
|
-
<
|
|
272
|
+
<strong><?= $user{'name'} !></strong>
|
|
273
|
+
<strong><?= encode_entities($user{'name'}) !></strong>
|
|
274
|
+
<strong><?= $user{'name'} !></strong>
|
|
273
275
|
</pre>
|
|
274
276
|
<br>
|
|
275
277
|
|
|
@@ -296,21 +298,21 @@ presentation data (ex-cont.pdata)</div>
|
|
|
296
298
|
<div class="program_caption">
|
|
297
299
|
presentation logic (ex-cont.plogic)</div>
|
|
298
300
|
<pre class="program">#name1 {
|
|
299
|
-
<
|
|
301
|
+
<strong>cont:</strong> user[:name];
|
|
300
302
|
}
|
|
301
303
|
#name2 {
|
|
302
|
-
<
|
|
304
|
+
<strong>Cont:</strong> user[:name];
|
|
303
305
|
}
|
|
304
306
|
#name3 {
|
|
305
|
-
<
|
|
307
|
+
<strong>CONT:</strong> user[:name];
|
|
306
308
|
}
|
|
307
309
|
</pre>
|
|
308
310
|
<div class="terminal_caption">
|
|
309
311
|
compile</div>
|
|
310
312
|
<pre class="terminal">$ kwartz -l eruby -p ex-cont.plogic ex-cont.pdata
|
|
311
|
-
<p><
|
|
312
|
-
<p><
|
|
313
|
-
<p><
|
|
313
|
+
<p><strong><%= user[:name] %></strong></p>
|
|
314
|
+
<p><strong><%=h user[:name] %></strong></p>
|
|
315
|
+
<p><strong><%= user[:name] %></strong></p>
|
|
314
316
|
</pre>
|
|
315
317
|
<br>
|
|
316
318
|
|
|
@@ -325,21 +327,21 @@ presentation data (ex-cont.pdata)</div>
|
|
|
325
327
|
<div class="program_caption">
|
|
326
328
|
presentation logic (ex-cont.plogic)</div>
|
|
327
329
|
<pre class="program">#name1 {
|
|
328
|
-
<
|
|
330
|
+
<strong>cont:</strong> $user['name'];
|
|
329
331
|
}
|
|
330
332
|
#name2 {
|
|
331
|
-
<
|
|
333
|
+
<strong>Cont:</strong> $user['name'];
|
|
332
334
|
}
|
|
333
335
|
#name3 {
|
|
334
|
-
<
|
|
336
|
+
<strong>CONT:</strong> $user['name'];
|
|
335
337
|
}
|
|
336
338
|
</pre>
|
|
337
339
|
<div class="terminal_caption">
|
|
338
340
|
compile</div>
|
|
339
341
|
<pre class="terminal">$ kwartz -l php -p ex-cont.plogic ex-cont.pdata
|
|
340
|
-
<p><
|
|
341
|
-
<p><
|
|
342
|
-
<p><
|
|
342
|
+
<p><strong><?php echo $user['name']; ?></strong></p>
|
|
343
|
+
<p><strong><?php echo htmlspecialchars($user['name']); ?></strong></p>
|
|
344
|
+
<p><strong><?php echo $user['name']; ?></strong></p>
|
|
343
345
|
</pre>
|
|
344
346
|
<br>
|
|
345
347
|
|
|
@@ -354,13 +356,13 @@ presentation data (ex-cont.pdata)</div>
|
|
|
354
356
|
<div class="program_caption">
|
|
355
357
|
presentation logic (ex-cont.plogic)</div>
|
|
356
358
|
<pre class="program">#name1 {
|
|
357
|
-
<
|
|
359
|
+
<strong>cont:</strong> user.name;
|
|
358
360
|
}
|
|
359
361
|
#name2 {
|
|
360
|
-
<
|
|
362
|
+
<strong>Cont:</strong> user.name;
|
|
361
363
|
}
|
|
362
364
|
#name3 {
|
|
363
|
-
<
|
|
365
|
+
<strong>CONT:</strong> user.name;
|
|
364
366
|
}
|
|
365
367
|
</pre>
|
|
366
368
|
<div class="terminal_caption">
|
|
@@ -368,9 +370,9 @@ compile</div>
|
|
|
368
370
|
<pre class="terminal">$ kwartz -l jstl -p ex-cont.plogic ex-cont.pdata
|
|
369
371
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
370
372
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
371
|
-
<p><
|
|
372
|
-
<p><
|
|
373
|
-
<p><
|
|
373
|
+
<p><strong>${user.name}</strong></p>
|
|
374
|
+
<p><strong>${user.name}</strong></p>
|
|
375
|
+
<p><strong><c:out value="${user.name}" escapeXml="false"/></strong></p>
|
|
374
376
|
</pre>
|
|
375
377
|
<br>
|
|
376
378
|
|
|
@@ -385,21 +387,21 @@ presentation data (ex-cont.pdata)</div>
|
|
|
385
387
|
<div class="program_caption">
|
|
386
388
|
presentation logic (ex-cont.plogic)</div>
|
|
387
389
|
<pre class="program">#name1 {
|
|
388
|
-
<
|
|
390
|
+
<strong>cont:</strong> $user{'name'};
|
|
389
391
|
}
|
|
390
392
|
#name2 {
|
|
391
|
-
<
|
|
393
|
+
<strong>Cont:</strong> $user{'name'};
|
|
392
394
|
}
|
|
393
395
|
#name3 {
|
|
394
|
-
<
|
|
396
|
+
<strong>CONT:</strong> $user{'name'};
|
|
395
397
|
}
|
|
396
398
|
</pre>
|
|
397
399
|
<div class="terminal_caption">
|
|
398
400
|
compile</div>
|
|
399
401
|
<pre class="terminal">$ kwartz -l eperl -p ex-cont.plogic ex-cont.pdata
|
|
400
|
-
<p><
|
|
401
|
-
<p><
|
|
402
|
-
<p><
|
|
402
|
+
<p><strong><?= $user{'name'} !></strong></p>
|
|
403
|
+
<p><strong><?= encode_entities($user{'name'}) !></strong></p>
|
|
404
|
+
<p><strong><?= $user{'name'} !></strong></p>
|
|
403
405
|
</pre>
|
|
404
406
|
<br>
|
|
405
407
|
|
|
@@ -424,21 +426,21 @@ presentation data (ex-value.pdata)</div>
|
|
|
424
426
|
<div class="program_caption">
|
|
425
427
|
presentation logic (ex-value.plogic)</div>
|
|
426
428
|
<pre class="program">#name1 {
|
|
427
|
-
<
|
|
429
|
+
<strong>value:</strong> user[:name];
|
|
428
430
|
}
|
|
429
431
|
#name2 {
|
|
430
|
-
<
|
|
432
|
+
<strong>Value:</strong> user[:name];
|
|
431
433
|
}
|
|
432
434
|
#name3 {
|
|
433
|
-
<
|
|
435
|
+
<strong>VALUE:</strong> user[:name];
|
|
434
436
|
}
|
|
435
437
|
</pre>
|
|
436
438
|
<div class="terminal_caption">
|
|
437
439
|
compile</div>
|
|
438
440
|
<pre class="terminal">$ kwartz -l eruby -p ex-value.plogic ex-value.pdata
|
|
439
|
-
<p><
|
|
440
|
-
<p><
|
|
441
|
-
<p><
|
|
441
|
+
<p><strong><%= user[:name] %></strong></p>
|
|
442
|
+
<p><strong><%=h user[:name] %></strong></p>
|
|
443
|
+
<p><strong><%= user[:name] %></strong></p>
|
|
442
444
|
</pre>
|
|
443
445
|
<br>
|
|
444
446
|
|
|
@@ -453,21 +455,21 @@ presentation data (ex-value.pdata)</div>
|
|
|
453
455
|
<div class="program_caption">
|
|
454
456
|
presentation logic (ex-value.plogic)</div>
|
|
455
457
|
<pre class="program">#name1 {
|
|
456
|
-
<
|
|
458
|
+
<strong>value:</strong> $user['name'];
|
|
457
459
|
}
|
|
458
460
|
#name2 {
|
|
459
|
-
<
|
|
461
|
+
<strong>Value:</strong> $user['name'];
|
|
460
462
|
}
|
|
461
463
|
#name3 {
|
|
462
|
-
<
|
|
464
|
+
<strong>VALUE:</strong> $user['name'];
|
|
463
465
|
}
|
|
464
466
|
</pre>
|
|
465
467
|
<div class="terminal_caption">
|
|
466
468
|
compile</div>
|
|
467
469
|
<pre class="terminal">$ kwartz -l php -p ex-value.plogic ex-value.pdata
|
|
468
|
-
<p><
|
|
469
|
-
<p><
|
|
470
|
-
<p><
|
|
470
|
+
<p><strong><?php echo $user['name']; ?></strong></p>
|
|
471
|
+
<p><strong><?php echo htmlspecialchars($user['name']); ?></strong></p>
|
|
472
|
+
<p><strong><?php echo $user['name']; ?></strong></p>
|
|
471
473
|
</pre>
|
|
472
474
|
<br>
|
|
473
475
|
|
|
@@ -482,13 +484,13 @@ presentation data (ex-value.pdata)</div>
|
|
|
482
484
|
<div class="program_caption">
|
|
483
485
|
presentation logic (ex-value.plogic)</div>
|
|
484
486
|
<pre class="program">#name1 {
|
|
485
|
-
<
|
|
487
|
+
<strong>value:</strong> user.name;
|
|
486
488
|
}
|
|
487
489
|
#name2 {
|
|
488
|
-
<
|
|
490
|
+
<strong>Value:</strong> user.name;
|
|
489
491
|
}
|
|
490
492
|
#name3 {
|
|
491
|
-
<
|
|
493
|
+
<strong>VALUE:</strong> user.name;
|
|
492
494
|
}
|
|
493
495
|
</pre>
|
|
494
496
|
<div class="terminal_caption">
|
|
@@ -496,9 +498,9 @@ compile</div>
|
|
|
496
498
|
<pre class="terminal">$ kwartz -l jstl -p ex-value.plogic ex-value.pdata
|
|
497
499
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
498
500
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
499
|
-
<p><
|
|
500
|
-
<p><
|
|
501
|
-
<p><
|
|
501
|
+
<p><strong>${user.name}</strong></p>
|
|
502
|
+
<p><strong>${user.name}</strong></p>
|
|
503
|
+
<p><strong><c:out value="${user.name}" escapeXml="false"/></strong></p>
|
|
502
504
|
</pre>
|
|
503
505
|
<br>
|
|
504
506
|
|
|
@@ -513,21 +515,21 @@ presentation data (ex-value.pdata)</div>
|
|
|
513
515
|
<div class="program_caption">
|
|
514
516
|
presentation logic (ex-value.plogic)</div>
|
|
515
517
|
<pre class="program">#name1 {
|
|
516
|
-
<
|
|
518
|
+
<strong>value:</strong> $user{'name'};
|
|
517
519
|
}
|
|
518
520
|
#name2 {
|
|
519
|
-
<
|
|
521
|
+
<strong>Value:</strong> $user{'name'};
|
|
520
522
|
}
|
|
521
523
|
#name3 {
|
|
522
|
-
<
|
|
524
|
+
<strong>VALUE:</strong> $user{'name'};
|
|
523
525
|
}
|
|
524
526
|
</pre>
|
|
525
527
|
<div class="terminal_caption">
|
|
526
528
|
compile</div>
|
|
527
529
|
<pre class="terminal">$ kwartz -l eperl -p ex-value.plogic ex-value.pdata
|
|
528
|
-
<p><
|
|
529
|
-
<p><
|
|
530
|
-
<p><
|
|
530
|
+
<p><strong><?= $user{'name'} !></strong></p>
|
|
531
|
+
<p><strong><?= encode_entities($user{'name'}) !></strong></p>
|
|
532
|
+
<p><strong><?= $user{'name'} !></strong></p>
|
|
531
533
|
</pre>
|
|
532
534
|
<br>
|
|
533
535
|
|
|
@@ -554,21 +556,21 @@ presentation data (ex-stag.pdata)</div>
|
|
|
554
556
|
<div class="program_caption">
|
|
555
557
|
presentation logic (ex-stag.plogic)</div>
|
|
556
558
|
<pre class="program">#link1 {
|
|
557
|
-
<
|
|
559
|
+
<strong>stag:</strong> start_link_tag :action=>'list';
|
|
558
560
|
}
|
|
559
561
|
#link2 {
|
|
560
|
-
<
|
|
562
|
+
<strong>Stag:</strong> start_link_tag :action=>'list';
|
|
561
563
|
}
|
|
562
564
|
#link3 {
|
|
563
|
-
<
|
|
565
|
+
<strong>STAG:</strong> start_link_tag :action=>'list';
|
|
564
566
|
}
|
|
565
567
|
</pre>
|
|
566
568
|
<div class="terminal_caption">
|
|
567
569
|
compile</div>
|
|
568
570
|
<pre class="terminal">$ kwartz -l eruby -p ex-stag.plogic ex-stag.pdata
|
|
569
|
-
<
|
|
570
|
-
<
|
|
571
|
-
<
|
|
571
|
+
<strong><%= start_link_tag :action=>'list' %></strong><img src="button1.png"></a>
|
|
572
|
+
<strong><%=h start_link_tag :action=>'list' %></strong><img src="button2.png"></a>
|
|
573
|
+
<strong><%= start_link_tag :action=>'list' %></strong><img src="button3.png"></a>
|
|
572
574
|
</pre>
|
|
573
575
|
<br>
|
|
574
576
|
|
|
@@ -583,21 +585,21 @@ presentation data (ex-stag.pdata)</div>
|
|
|
583
585
|
<div class="program_caption">
|
|
584
586
|
presentation logic (ex-stag.plogic)</div>
|
|
585
587
|
<pre class="program">#link1 {
|
|
586
|
-
<
|
|
588
|
+
<strong>stag:</strong> start_link_tag('list');
|
|
587
589
|
}
|
|
588
590
|
#link2 {
|
|
589
|
-
<
|
|
591
|
+
<strong>Stag:</strong> start_link_tag('list');
|
|
590
592
|
}
|
|
591
593
|
#link3 {
|
|
592
|
-
<
|
|
594
|
+
<strong>STAG:</strong> start_link_tag('list');
|
|
593
595
|
}
|
|
594
596
|
</pre>
|
|
595
597
|
<div class="terminal_caption">
|
|
596
598
|
compile</div>
|
|
597
599
|
<pre class="terminal">$ kwartz -l php -p ex-stag.plogic ex-stag.pdata
|
|
598
|
-
<
|
|
599
|
-
<
|
|
600
|
-
<
|
|
600
|
+
<strong><?php echo start_link_tag('list'); ?></strong><img src="button1.png"></a>
|
|
601
|
+
<strong><?php echo htmlspecialchars(start_link_tag('list')); ?></strong><img src="button2.png"></a>
|
|
602
|
+
<strong><?php echo start_link_tag('list'); ?></strong><img src="button3.png"></a>
|
|
601
603
|
</pre>
|
|
602
604
|
<br>
|
|
603
605
|
|
|
@@ -612,13 +614,13 @@ presentation data (ex-stag.pdata)</div>
|
|
|
612
614
|
<div class="program_caption">
|
|
613
615
|
presentation logic (ex-stag.plogic)</div>
|
|
614
616
|
<pre class="program">#link1 {
|
|
615
|
-
<
|
|
617
|
+
<strong>stag:</strong> fn:start_link_tag('list');
|
|
616
618
|
}
|
|
617
619
|
#link2 {
|
|
618
|
-
<
|
|
620
|
+
<strong>Stag:</strong> fn:start_link_tag('list');
|
|
619
621
|
}
|
|
620
622
|
#link3 {
|
|
621
|
-
<
|
|
623
|
+
<strong>STAG:</strong> fn:start_link_tag('list');
|
|
622
624
|
}
|
|
623
625
|
</pre>
|
|
624
626
|
<div class="terminal_caption">
|
|
@@ -626,9 +628,9 @@ compile</div>
|
|
|
626
628
|
<pre class="terminal">$ kwartz -l jstl -p ex-stag.plogic ex-stag.pdata
|
|
627
629
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
628
630
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
629
|
-
<
|
|
630
|
-
<
|
|
631
|
-
<
|
|
631
|
+
<strong>${fn:start_link_tag('list')}</strong><img src="button1.png"></a>
|
|
632
|
+
<strong>${fn:start_link_tag('list')}</strong><img src="button2.png"></a>
|
|
633
|
+
<strong><c:out value="${fn:start_link_tag('list')}" escapeXml="false"/></strong><img src="button3.png"></a>
|
|
632
634
|
</pre>
|
|
633
635
|
<br>
|
|
634
636
|
|
|
@@ -643,21 +645,21 @@ presentation data (ex-stag.pdata)</div>
|
|
|
643
645
|
<div class="program_caption">
|
|
644
646
|
presentation logic (ex-stag.plogic)</div>
|
|
645
647
|
<pre class="program">#link1 {
|
|
646
|
-
<
|
|
648
|
+
<strong>stag:</strong> start_link_tag('list');
|
|
647
649
|
}
|
|
648
650
|
#link2 {
|
|
649
|
-
<
|
|
651
|
+
<strong>Stag:</strong> start_link_tag('list');
|
|
650
652
|
}
|
|
651
653
|
#link3 {
|
|
652
|
-
<
|
|
654
|
+
<strong>STAG:</strong> start_link_tag('list');
|
|
653
655
|
}
|
|
654
656
|
</pre>
|
|
655
657
|
<div class="terminal_caption">
|
|
656
658
|
compile</div>
|
|
657
659
|
<pre class="terminal">$ kwartz -l eperl -p ex-stag.plogic ex-stag.pdata
|
|
658
|
-
<
|
|
659
|
-
<
|
|
660
|
-
<
|
|
660
|
+
<strong><?= start_link_tag('list') !></strong><img src="button1.png"></a>
|
|
661
|
+
<strong><?= encode_entities(start_link_tag('list')) !></strong><img src="button2.png"></a>
|
|
662
|
+
<strong><?= start_link_tag('list') !></strong><img src="button3.png"></a>
|
|
661
663
|
</pre>
|
|
662
664
|
<br>
|
|
663
665
|
|
|
@@ -684,21 +686,21 @@ presentation data (ex-etag.pdata)</div>
|
|
|
684
686
|
<div class="program_caption">
|
|
685
687
|
presentation logic (ex-etag.plogic)</div>
|
|
686
688
|
<pre class="program">#item1 {
|
|
687
|
-
<
|
|
689
|
+
<strong>etag:</strong> is_xml ? '</li>' : '';
|
|
688
690
|
}
|
|
689
691
|
#item2 {
|
|
690
|
-
<
|
|
692
|
+
<strong>Etag:</strong> is_xml ? '</li>' : '';
|
|
691
693
|
}
|
|
692
694
|
#item3 {
|
|
693
|
-
<
|
|
695
|
+
<strong>ETAG:</strong> is_xml ? '</li>' : '';
|
|
694
696
|
}
|
|
695
697
|
</pre>
|
|
696
698
|
<div class="terminal_caption">
|
|
697
699
|
compile</div>
|
|
698
700
|
<pre class="terminal">$ kwartz -l eruby -p ex-etag.plogic ex-etag.pdata
|
|
699
|
-
<li>foo<
|
|
700
|
-
<li>bar<
|
|
701
|
-
<li>baz<
|
|
701
|
+
<li>foo<strong><%= is_xml ? '</li>' : '' %></strong>
|
|
702
|
+
<li>bar<strong><%=h is_xml ? '</li>' : '' %></strong>
|
|
703
|
+
<li>baz<strong><%= is_xml ? '</li>' : '' %></strong>
|
|
702
704
|
</pre>
|
|
703
705
|
<br>
|
|
704
706
|
|
|
@@ -713,21 +715,21 @@ presentation data (ex-etag.pdata)</div>
|
|
|
713
715
|
<div class="program_caption">
|
|
714
716
|
presentation logic (ex-etag.plogic)</div>
|
|
715
717
|
<pre class="program">#item1 {
|
|
716
|
-
<
|
|
718
|
+
<strong>etag:</strong> $is_xml ? '</li>' : '';
|
|
717
719
|
}
|
|
718
720
|
#item2 {
|
|
719
|
-
<
|
|
721
|
+
<strong>Etag:</strong> $is_xml ? '</li>' : '';
|
|
720
722
|
}
|
|
721
723
|
#item3 {
|
|
722
|
-
<
|
|
724
|
+
<strong>ETAG:</strong> $is_xml ? '</li>' : '';
|
|
723
725
|
}
|
|
724
726
|
</pre>
|
|
725
727
|
<div class="terminal_caption">
|
|
726
728
|
compile</div>
|
|
727
729
|
<pre class="terminal">$ kwartz -l php -p ex-etag.plogic ex-etag.pdata
|
|
728
|
-
<li>foo<
|
|
729
|
-
<li>bar<
|
|
730
|
-
<li>baz<
|
|
730
|
+
<li>foo<strong><?php echo $is_xml ? '</li>' : ''; ?></strong>
|
|
731
|
+
<li>bar<strong><?php echo htmlspecialchars($is_xml ? '</li>' : ''); ?></strong>
|
|
732
|
+
<li>baz<strong><?php echo $is_xml ? '</li>' : ''; ?></strong>
|
|
731
733
|
</pre>
|
|
732
734
|
<br>
|
|
733
735
|
|
|
@@ -742,13 +744,13 @@ presentation data (ex-etag.pdata)</div>
|
|
|
742
744
|
<div class="program_caption">
|
|
743
745
|
presentation logic (ex-etag.plogic)</div>
|
|
744
746
|
<pre class="program">#item1 {
|
|
745
|
-
<
|
|
747
|
+
<strong>etag:</strong> is_xml ? '</li>' : '';
|
|
746
748
|
}
|
|
747
749
|
#item2 {
|
|
748
|
-
<
|
|
750
|
+
<strong>Etag:</strong> is_xml ? '</li>' : '';
|
|
749
751
|
}
|
|
750
752
|
#item3 {
|
|
751
|
-
<
|
|
753
|
+
<strong>ETAG:</strong> is_xml ? '</li>' : '';
|
|
752
754
|
}
|
|
753
755
|
</pre>
|
|
754
756
|
<div class="terminal_caption">
|
|
@@ -756,9 +758,9 @@ compile</div>
|
|
|
756
758
|
<pre class="terminal">$ kwartz -l jstl -p ex-etag.plogic ex-etag.pdata
|
|
757
759
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
758
760
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
759
|
-
<li>foo<
|
|
760
|
-
<li>bar<
|
|
761
|
-
<li>baz<
|
|
761
|
+
<li>foo<strong>${is_xml ? '</li>' : ''}</strong>
|
|
762
|
+
<li>bar<strong>${is_xml ? '</li>' : ''}</strong>
|
|
763
|
+
<li>baz<strong><c:out value="${is_xml ? '</li>' : ''}" escapeXml="false"/></strong>
|
|
762
764
|
</pre>
|
|
763
765
|
<br>
|
|
764
766
|
|
|
@@ -773,21 +775,21 @@ presentation data (ex-etag.pdata)</div>
|
|
|
773
775
|
<div class="program_caption">
|
|
774
776
|
presentation logic (ex-etag.plogic)</div>
|
|
775
777
|
<pre class="program">#item1 {
|
|
776
|
-
<
|
|
778
|
+
<strong>etag:</strong> $is_xml ? '</li>' : '';
|
|
777
779
|
}
|
|
778
780
|
#item2 {
|
|
779
|
-
<
|
|
781
|
+
<strong>Etag:</strong> $is_xml ? '</li>' : '';
|
|
780
782
|
}
|
|
781
783
|
#item3 {
|
|
782
|
-
<
|
|
784
|
+
<strong>ETAG:</strong> $is_xml ? '</li>' : '';
|
|
783
785
|
}
|
|
784
786
|
</pre>
|
|
785
787
|
<div class="terminal_caption">
|
|
786
788
|
compile</div>
|
|
787
789
|
<pre class="terminal">$ kwartz -l eperl -p ex-etag.plogic ex-etag.pdata
|
|
788
|
-
<li>foo<
|
|
789
|
-
<li>bar<
|
|
790
|
-
<li>baz<
|
|
790
|
+
<li>foo<strong><?= $is_xml ? '</li>' : '' !></strong>
|
|
791
|
+
<li>bar<strong><?= encode_entities($is_xml ? '</li>' : '') !></strong>
|
|
792
|
+
<li>baz<strong><?= $is_xml ? '</li>' : '' !></strong>
|
|
791
793
|
</pre>
|
|
792
794
|
<br>
|
|
793
795
|
|
|
@@ -820,14 +822,14 @@ presentation data (ex-attrs.pdata)</div>
|
|
|
820
822
|
<div class="program_caption">
|
|
821
823
|
presentation logic (ex-attrs.plogic)</div>
|
|
822
824
|
<pre class="program">#item {
|
|
823
|
-
<
|
|
825
|
+
<strong>attrs:</strong> 'class' klass,
|
|
824
826
|
'style' style;
|
|
825
827
|
}
|
|
826
828
|
</pre>
|
|
827
829
|
<div class="terminal_caption">
|
|
828
830
|
compile</div>
|
|
829
831
|
<pre class="terminal">$ kwartz -l eruby -p ex-attrs.plogic ex-attrs.pdata
|
|
830
|
-
<p <
|
|
832
|
+
<p <strong>class="<%= klass %>"</strong> <strong>style="<%= style %>"</strong>>
|
|
831
833
|
AAA
|
|
832
834
|
</p>
|
|
833
835
|
</pre>
|
|
@@ -844,14 +846,14 @@ presentation data (ex-attrs.pdata)</div>
|
|
|
844
846
|
<div class="program_caption">
|
|
845
847
|
presentation logic (ex-attrs.plogic)</div>
|
|
846
848
|
<pre class="program">#item {
|
|
847
|
-
<
|
|
849
|
+
<strong>attrs:</strong> 'class' $class,
|
|
848
850
|
'style' $style;
|
|
849
851
|
}
|
|
850
852
|
</pre>
|
|
851
853
|
<div class="terminal_caption">
|
|
852
854
|
compile</div>
|
|
853
855
|
<pre class="terminal">$ kwartz -l php -p ex-attrs.plogic ex-attrs.pdata
|
|
854
|
-
<p <
|
|
856
|
+
<p <strong>class="<?php echo $class; ?>"</strong> <strong>style="<?php echo $style; ?>"</strong>>
|
|
855
857
|
AAA
|
|
856
858
|
</p>
|
|
857
859
|
</pre>
|
|
@@ -868,7 +870,7 @@ presentation data (ex-attrs.pdata)</div>
|
|
|
868
870
|
<div class="program_caption">
|
|
869
871
|
presentation logic (ex-attrs.plogic)</div>
|
|
870
872
|
<pre class="program">#item {
|
|
871
|
-
<
|
|
873
|
+
<strong>attrs:</strong> 'class' klass,
|
|
872
874
|
'style' style;
|
|
873
875
|
}
|
|
874
876
|
</pre>
|
|
@@ -877,7 +879,7 @@ compile</div>
|
|
|
877
879
|
<pre class="terminal">$ kwartz -l jstl -p ex-attrs.plogic ex-attrs.pdata
|
|
878
880
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
879
881
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
880
|
-
<p <
|
|
882
|
+
<p <strong>class="${klass}"</strong> <strong>style="${style}"</strong>>
|
|
881
883
|
AAA
|
|
882
884
|
</p>
|
|
883
885
|
</pre>
|
|
@@ -894,14 +896,14 @@ presentation data (ex-attrs.pdata)</div>
|
|
|
894
896
|
<div class="program_caption">
|
|
895
897
|
presentation logic (ex-attrs.plogic)</div>
|
|
896
898
|
<pre class="program">#item {
|
|
897
|
-
<
|
|
899
|
+
<strong>attrs:</strong> 'class' $class,
|
|
898
900
|
'style' $style;
|
|
899
901
|
}
|
|
900
902
|
</pre>
|
|
901
903
|
<div class="terminal_caption">
|
|
902
904
|
compile</div>
|
|
903
905
|
<pre class="terminal">$ kwartz -l eperl -p ex-attrs.plogic ex-attrs.pdata
|
|
904
|
-
<p <
|
|
906
|
+
<p <strong>class="<?= $class !>"</strong> <strong>style="<?= $style !>"</strong>>
|
|
905
907
|
AAA
|
|
906
908
|
</p>
|
|
907
909
|
</pre>
|
|
@@ -942,13 +944,13 @@ presentation data (ex-append.pdata)</div>
|
|
|
942
944
|
<div class="program_caption">
|
|
943
945
|
presentation logic (ex-append.plogic)</div>
|
|
944
946
|
<pre class="program">#remember {
|
|
945
|
-
<
|
|
947
|
+
<strong>append:</strong> flag ? ' checked' : '';
|
|
946
948
|
}
|
|
947
949
|
</pre>
|
|
948
950
|
<div class="terminal_caption">
|
|
949
951
|
compile</div>
|
|
950
952
|
<pre class="terminal">$ kwartz -l eruby -p ex-append.plogic ex-append.pdata
|
|
951
|
-
<input type="checkboxk" value="y"<
|
|
953
|
+
<input type="checkboxk" value="y"<strong><%= flag ? ' checked' : '' %></strong>>Remeber me
|
|
952
954
|
</pre>
|
|
953
955
|
<br>
|
|
954
956
|
|
|
@@ -961,13 +963,13 @@ presentation data (ex-append.pdata)</div>
|
|
|
961
963
|
<div class="program_caption">
|
|
962
964
|
presentation logic (ex-append.plogic)</div>
|
|
963
965
|
<pre class="program">#remember {
|
|
964
|
-
<
|
|
966
|
+
<strong>append:</strong> $flag ? ' checked' : '';
|
|
965
967
|
}
|
|
966
968
|
</pre>
|
|
967
969
|
<div class="terminal_caption">
|
|
968
970
|
compile</div>
|
|
969
971
|
<pre class="terminal">$ kwartz -l php -p ex-append.plogic ex-append.pdata
|
|
970
|
-
<input type="checkboxk" value="y"<
|
|
972
|
+
<input type="checkboxk" value="y"<strong><?php echo $flag ? ' checked' : ''; ?></strong>>Remeber me
|
|
971
973
|
</pre>
|
|
972
974
|
<br>
|
|
973
975
|
|
|
@@ -980,7 +982,7 @@ presentation data (ex-append.pdata)</div>
|
|
|
980
982
|
<div class="program_caption">
|
|
981
983
|
presentation logic (ex-append.plogic)</div>
|
|
982
984
|
<pre class="program">#remember {
|
|
983
|
-
<
|
|
985
|
+
<strong>append:</strong> flag ? ' checked' : '';
|
|
984
986
|
}
|
|
985
987
|
</pre>
|
|
986
988
|
<div class="terminal_caption">
|
|
@@ -988,7 +990,7 @@ compile</div>
|
|
|
988
990
|
<pre class="terminal">$ kwartz -l jstl -p ex-append.plogic ex-append.pdata
|
|
989
991
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
990
992
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
991
|
-
<input type="checkboxk" value="y"<
|
|
993
|
+
<input type="checkboxk" value="y"<strong>${flag ? ' checked' : ''}</strong>>Remeber me
|
|
992
994
|
</pre>
|
|
993
995
|
<br>
|
|
994
996
|
|
|
@@ -1001,13 +1003,13 @@ presentation data (ex-append.pdata)</div>
|
|
|
1001
1003
|
<div class="program_caption">
|
|
1002
1004
|
presentation logic (ex-append.plogic)</div>
|
|
1003
1005
|
<pre class="program">#remember {
|
|
1004
|
-
<
|
|
1006
|
+
<strong>append:</strong> $flag ? ' checked' : '';
|
|
1005
1007
|
}
|
|
1006
1008
|
</pre>
|
|
1007
1009
|
<div class="terminal_caption">
|
|
1008
1010
|
compile</div>
|
|
1009
1011
|
<pre class="terminal">$ kwartz -l eperl -p ex-append.plogic ex-append.pdata
|
|
1010
|
-
<input type="checkboxk" value="y"<
|
|
1012
|
+
<input type="checkboxk" value="y"<strong><?= $flag ? ' checked' : '' !></strong>>Remeber me
|
|
1011
1013
|
</pre>
|
|
1012
1014
|
<br>
|
|
1013
1015
|
|
|
@@ -1029,7 +1031,7 @@ presentation data (ex-remove.pdata)</div>
|
|
|
1029
1031
|
<div class="program_caption">
|
|
1030
1032
|
presentation logic (ex-remove.plogic)</div>
|
|
1031
1033
|
<pre class="program">#foo {
|
|
1032
|
-
<
|
|
1034
|
+
<strong>remove:</strong> 'id', 'style';
|
|
1033
1035
|
}
|
|
1034
1036
|
</pre>
|
|
1035
1037
|
<div class="terminal_caption">
|
|
@@ -1052,7 +1054,7 @@ presentation data (ex-remove.pdata)</div>
|
|
|
1052
1054
|
<div class="program_caption">
|
|
1053
1055
|
presentation logic (ex-remove.plogic)</div>
|
|
1054
1056
|
<pre class="program">#foo {
|
|
1055
|
-
<
|
|
1057
|
+
<strong>remove:</strong> 'id', 'style';
|
|
1056
1058
|
}
|
|
1057
1059
|
</pre>
|
|
1058
1060
|
<div class="terminal_caption">
|
|
@@ -1075,7 +1077,7 @@ presentation data (ex-remove.pdata)</div>
|
|
|
1075
1077
|
<div class="program_caption">
|
|
1076
1078
|
presentation logic (ex-remove.plogic)</div>
|
|
1077
1079
|
<pre class="program">#foo {
|
|
1078
|
-
<
|
|
1080
|
+
<strong>remove:</strong> 'id', 'style';
|
|
1079
1081
|
}
|
|
1080
1082
|
</pre>
|
|
1081
1083
|
<div class="terminal_caption">
|
|
@@ -1100,7 +1102,7 @@ presentation data (ex-remove.pdata)</div>
|
|
|
1100
1102
|
<div class="program_caption">
|
|
1101
1103
|
presentation logic (ex-remove.plogic)</div>
|
|
1102
1104
|
<pre class="program">#foo {
|
|
1103
|
-
<
|
|
1105
|
+
<strong>remove:</strong> 'id', 'style';
|
|
1104
1106
|
}
|
|
1105
1107
|
</pre>
|
|
1106
1108
|
<div class="terminal_caption">
|
|
@@ -1142,14 +1144,14 @@ In the <code>logic:</code> property, the folllowings are available.
|
|
|
1142
1144
|
represents end-tag of the element
|
|
1143
1145
|
</dd>
|
|
1144
1146
|
<dt class="dt3"><b>
|
|
1145
|
-
<code>_element(<
|
|
1147
|
+
<code>_element(<em>name</em>)</code> </b></dt>
|
|
1146
1148
|
<dd class="dd3">
|
|
1147
|
-
represents the other element marked as <
|
|
1149
|
+
represents the other element marked as <em>name</em>.
|
|
1148
1150
|
</dd>
|
|
1149
1151
|
<dt class="dt3"><b>
|
|
1150
|
-
<code>_content(<
|
|
1152
|
+
<code>_content(<em>name</em>)</code> </b></dt>
|
|
1151
1153
|
<dd class="dd3">
|
|
1152
|
-
represents the content of other element marked as <
|
|
1154
|
+
represents the content of other element marked as <em>name</em>.
|
|
1153
1155
|
</dd>
|
|
1154
1156
|
</dl>
|
|
1155
1157
|
<p>In the <code>logic:</code> property, it is able to write statements in target language
|
|
@@ -1167,11 +1169,11 @@ presentation data (ex-logic.pdata)</div>
|
|
|
1167
1169
|
presentation logic (ex-logic.plogic)</div>
|
|
1168
1170
|
<pre class="program">#items {
|
|
1169
1171
|
value: item;
|
|
1170
|
-
<
|
|
1172
|
+
<strong>logic:</strong> {
|
|
1171
1173
|
@list.each do |item|
|
|
1172
|
-
<
|
|
1173
|
-
<
|
|
1174
|
-
<
|
|
1174
|
+
<strong>_stag</strong>
|
|
1175
|
+
<strong>_cont</strong>
|
|
1176
|
+
<strong>_etag</strong>
|
|
1175
1177
|
end
|
|
1176
1178
|
}
|
|
1177
1179
|
}
|
|
@@ -1180,9 +1182,9 @@ presentation logic (ex-logic.plogic)</div>
|
|
|
1180
1182
|
compile</div>
|
|
1181
1183
|
<pre class="terminal">$ kwartz -l eruby -p ex-logic.plogic ex-logic.pdata
|
|
1182
1184
|
<ul>
|
|
1183
|
-
<
|
|
1185
|
+
<strong><% @list.each do |item| %></strong>
|
|
1184
1186
|
<li><%= item %></li>
|
|
1185
|
-
<
|
|
1187
|
+
<strong><% end %></strong>
|
|
1186
1188
|
</ul>
|
|
1187
1189
|
</pre>
|
|
1188
1190
|
<br>
|
|
@@ -1199,11 +1201,11 @@ presentation data (ex-logic.pdata)</div>
|
|
|
1199
1201
|
presentation logic (ex-logic.plogic)</div>
|
|
1200
1202
|
<pre class="program">#items {
|
|
1201
1203
|
value: $item;
|
|
1202
|
-
<
|
|
1204
|
+
<strong>logic:</strong> {
|
|
1203
1205
|
foreach ($list as $item) {
|
|
1204
|
-
<
|
|
1205
|
-
<
|
|
1206
|
-
<
|
|
1206
|
+
<strong>_stag();</strong>
|
|
1207
|
+
<strong>_cont();</strong>
|
|
1208
|
+
<strong>_etag();</strong>
|
|
1207
1209
|
}
|
|
1208
1210
|
}
|
|
1209
1211
|
}
|
|
@@ -1212,9 +1214,9 @@ presentation logic (ex-logic.plogic)</div>
|
|
|
1212
1214
|
compile</div>
|
|
1213
1215
|
<pre class="terminal">$ kwartz -l php -p ex-logic.plogic ex-logic.pdata
|
|
1214
1216
|
<ul>
|
|
1215
|
-
<
|
|
1217
|
+
<strong><?php foreach ($list as $item) { ?></strong>
|
|
1216
1218
|
<li><?php echo $item; ?></li>
|
|
1217
|
-
<
|
|
1219
|
+
<strong><?php } ?></strong>
|
|
1218
1220
|
</ul>
|
|
1219
1221
|
</pre>
|
|
1220
1222
|
<br>
|
|
@@ -1231,11 +1233,11 @@ presentation data (ex-logic.pdata)</div>
|
|
|
1231
1233
|
presentation logic (ex-logic.plogic)</div>
|
|
1232
1234
|
<pre class="program">#items {
|
|
1233
1235
|
value: item;
|
|
1234
|
-
<
|
|
1236
|
+
<strong>logic:</strong> {
|
|
1235
1237
|
<c:forEach var="item" items="${list}">
|
|
1236
|
-
<
|
|
1237
|
-
<
|
|
1238
|
-
<
|
|
1238
|
+
<strong>_stag();</strong>
|
|
1239
|
+
<strong>_cont();</strong>
|
|
1240
|
+
<strong>_etag();</strong>
|
|
1239
1241
|
</c:forEach>
|
|
1240
1242
|
}
|
|
1241
1243
|
}
|
|
@@ -1246,9 +1248,9 @@ compile</div>
|
|
|
1246
1248
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
1247
1249
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
1248
1250
|
<ul>
|
|
1249
|
-
<
|
|
1251
|
+
<strong><c:forEach var="item" items="${list}"></strong>
|
|
1250
1252
|
<li>${item}</li>
|
|
1251
|
-
<
|
|
1253
|
+
<strong></c:forEach></strong>
|
|
1252
1254
|
</ul>
|
|
1253
1255
|
</pre>
|
|
1254
1256
|
<br>
|
|
@@ -1265,11 +1267,11 @@ presentation data (ex-logic.pdata)</div>
|
|
|
1265
1267
|
presentation logic (ex-logic.plogic)</div>
|
|
1266
1268
|
<pre class="program">#items {
|
|
1267
1269
|
value: $item;
|
|
1268
|
-
<
|
|
1270
|
+
<strong>logic:</strong> {
|
|
1269
1271
|
foreach ($item in @list) {
|
|
1270
|
-
<
|
|
1271
|
-
<
|
|
1272
|
-
<
|
|
1272
|
+
<strong>_stag();</strong>
|
|
1273
|
+
<strong>_cont();</strong>
|
|
1274
|
+
<strong>_etag();</strong>
|
|
1273
1275
|
}
|
|
1274
1276
|
}
|
|
1275
1277
|
}
|
|
@@ -1278,9 +1280,9 @@ presentation logic (ex-logic.plogic)</div>
|
|
|
1278
1280
|
compile</div>
|
|
1279
1281
|
<pre class="terminal">$ kwartz -l eperl -p ex-logic.plogic ex-logic.pdata
|
|
1280
1282
|
<ul>
|
|
1281
|
-
<
|
|
1283
|
+
<strong><? foreach ($item in @list) { !></strong>
|
|
1282
1284
|
<li><?= $item !></li>
|
|
1283
|
-
<
|
|
1285
|
+
<strong><? } !></strong>
|
|
1284
1286
|
</ul>
|
|
1285
1287
|
</pre>
|
|
1286
1288
|
<br>
|
|
@@ -1307,13 +1309,12 @@ presentation data (ex-begin.pdata)</div>
|
|
|
1307
1309
|
<div class="program_caption">
|
|
1308
1310
|
presentation logic (ex-begin.plogic)</div>
|
|
1309
1311
|
<pre class="program">#DOCUMENT {
|
|
1310
|
-
<
|
|
1312
|
+
<strong>begin:</strong> {
|
|
1311
1313
|
username = @context[:username]
|
|
1312
1314
|
menulist = @context[:menulist]
|
|
1313
1315
|
}
|
|
1314
|
-
<
|
|
1316
|
+
<strong>end:</strong> {
|
|
1315
1317
|
print "<!-- document end -->\n"
|
|
1316
|
-
|
|
1317
1318
|
}
|
|
1318
1319
|
}
|
|
1319
1320
|
#username {
|
|
@@ -1331,15 +1332,15 @@ presentation logic (ex-begin.plogic)</div>
|
|
|
1331
1332
|
<div class="terminal_caption">
|
|
1332
1333
|
compile</div>
|
|
1333
1334
|
<pre class="terminal">$ kwartz -l eruby -p ex-begin.plogic ex-begin.pdata
|
|
1334
|
-
<
|
|
1335
|
-
<
|
|
1335
|
+
<strong><% username = @context[:username] %></strong>
|
|
1336
|
+
<strong><% menulist = @context[:menulist] %></strong>
|
|
1336
1337
|
<p>Hello <span><%= username %></span>!</p>
|
|
1337
1338
|
<ul>
|
|
1338
1339
|
<% for menu in menulist %>
|
|
1339
1340
|
<li><%= menu %></li>
|
|
1340
1341
|
<% end %>
|
|
1341
1342
|
</ul>
|
|
1342
|
-
<
|
|
1343
|
+
<strong><%= "<!-- document end -->\n" %></strong>
|
|
1343
1344
|
</pre>
|
|
1344
1345
|
<br>
|
|
1345
1346
|
|
|
@@ -1355,13 +1356,12 @@ presentation data (ex-begin.pdata)</div>
|
|
|
1355
1356
|
<div class="program_caption">
|
|
1356
1357
|
presentation logic (ex-begin.plogic)</div>
|
|
1357
1358
|
<pre class="program">#DOCUMENT {
|
|
1358
|
-
<
|
|
1359
|
+
<strong>begin:</strong> {
|
|
1359
1360
|
$username = $context['username'];
|
|
1360
1361
|
$menulist = $context['menulist'];
|
|
1361
1362
|
}
|
|
1362
|
-
<
|
|
1363
|
+
<strong>end:</strong> {
|
|
1363
1364
|
print("<!-- document end -->\n");
|
|
1364
|
-
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
1367
|
#username {
|
|
@@ -1379,15 +1379,15 @@ presentation logic (ex-begin.plogic)</div>
|
|
|
1379
1379
|
<div class="terminal_caption">
|
|
1380
1380
|
compile</div>
|
|
1381
1381
|
<pre class="terminal">$ kwartz -l php -p ex-begin.plogic ex-begin.pdata
|
|
1382
|
-
<
|
|
1383
|
-
<
|
|
1382
|
+
<strong><?php $username = $context['username']; ?></strong>
|
|
1383
|
+
<strong><?php $menulist = $context['menulist']; ?></strong>
|
|
1384
1384
|
<p>Hello <span><?php echo $username; ?></span>!</p>
|
|
1385
1385
|
<ul>
|
|
1386
1386
|
<?php foreach ($menulist as $menu) { ?>
|
|
1387
1387
|
<li><?php echo $menu; ?></li>
|
|
1388
1388
|
<?php } ?>
|
|
1389
1389
|
</ul>
|
|
1390
|
-
<
|
|
1390
|
+
<strong><?php echo "<!-- document end -->\n"; ?></strong>
|
|
1391
1391
|
</pre>
|
|
1392
1392
|
<br>
|
|
1393
1393
|
|
|
@@ -1403,11 +1403,11 @@ presentation data (ex-begin.pdata)</div>
|
|
|
1403
1403
|
<div class="program_caption">
|
|
1404
1404
|
presentation logic (ex-begin.plogic)</div>
|
|
1405
1405
|
<pre class="program">#DOCUMENT {
|
|
1406
|
-
<
|
|
1406
|
+
<strong>begin:</strong> {
|
|
1407
1407
|
<c:set var="username" value="${context.username}"/>
|
|
1408
1408
|
<c:set var="menulist" value="${context.menulist}"/>
|
|
1409
1409
|
}
|
|
1410
|
-
<
|
|
1410
|
+
<strong>end:</strong> {
|
|
1411
1411
|
<c:out value="<!-- document end -->\n"/>
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
@@ -1428,15 +1428,15 @@ compile</div>
|
|
|
1428
1428
|
<pre class="terminal">$ kwartz -l jstl -p ex-begin.plogic ex-begin.pdata
|
|
1429
1429
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
1430
1430
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
1431
|
-
<
|
|
1432
|
-
<
|
|
1431
|
+
<strong><c:set var="username" value="${context.username}"/></strong>
|
|
1432
|
+
<strong><c:set var="menulist" value="${context.menulist}"/></strong>
|
|
1433
1433
|
<p>Hello <span>${username}</span>!</p>
|
|
1434
1434
|
<ul>
|
|
1435
1435
|
<c:forEach var="menu" items="${menulist}">
|
|
1436
1436
|
<li>${menu}</li>
|
|
1437
1437
|
</c:forEach>
|
|
1438
1438
|
</ul>
|
|
1439
|
-
<
|
|
1439
|
+
<strong><c:out value="<!-- document end -->\n"/></strong>
|
|
1440
1440
|
</pre>
|
|
1441
1441
|
<br>
|
|
1442
1442
|
|
|
@@ -1452,13 +1452,12 @@ presentation data (ex-begin.pdata)</div>
|
|
|
1452
1452
|
<div class="program_caption">
|
|
1453
1453
|
presentation logic (ex-begin.plogic)</div>
|
|
1454
1454
|
<pre class="program">#DOCUMENT {
|
|
1455
|
-
<
|
|
1455
|
+
<strong>begin:</strong> {
|
|
1456
1456
|
$username = $context{'username'};
|
|
1457
1457
|
@menulist = $context{'menulist'};
|
|
1458
1458
|
}
|
|
1459
|
-
<
|
|
1459
|
+
<strong>end:</strong> {
|
|
1460
1460
|
print("<!-- document end -->\n");
|
|
1461
|
-
|
|
1462
1461
|
}
|
|
1463
1462
|
}
|
|
1464
1463
|
#username {
|
|
@@ -1476,15 +1475,15 @@ presentation logic (ex-begin.plogic)</div>
|
|
|
1476
1475
|
<div class="terminal_caption">
|
|
1477
1476
|
compile</div>
|
|
1478
1477
|
<pre class="terminal">$ kwartz -l eperl -p ex-begin.plogic ex-begin.pdata
|
|
1479
|
-
<
|
|
1480
|
-
<
|
|
1478
|
+
<strong><? $username = $context{'username'}; !></strong>
|
|
1479
|
+
<strong><? @menulist = $context{'menulist'}; !></strong>
|
|
1481
1480
|
<p>Hello <span><?= $username !></span>!</p>
|
|
1482
1481
|
<ul>
|
|
1483
1482
|
<? foreach ($menu in @menulist) { !>
|
|
1484
1483
|
<li><?= $menu !></li>
|
|
1485
1484
|
<? } !>
|
|
1486
1485
|
</ul>
|
|
1487
|
-
<
|
|
1486
|
+
<strong><?= "<!-- document end -->\n" !></strong>
|
|
1488
1487
|
</pre>
|
|
1489
1488
|
<br>
|
|
1490
1489
|
|
|
@@ -1499,7 +1498,7 @@ compile</div>
|
|
|
1499
1498
|
<p>Directives are commands to embed presentation logics into presentation data.
|
|
1500
1499
|
For example, <code>title="for item in @list"</code> directive represents iteration of the element.
|
|
1501
1500
|
</p>
|
|
1502
|
-
<p>Directives are provided for '<
|
|
1501
|
+
<p>Directives are provided for '<strong>choosability</strong>'.
|
|
1503
1502
|
This is very important concept for Kwartz (and other products by kuwata-lab).
|
|
1504
1503
|
In Kwartz, you can separate presentation logics from presentation data, or 'mix' them.
|
|
1505
1504
|
It is the user or customer of Kwartz and not developer who determine which solution to adopt.
|
|
@@ -1522,16 +1521,16 @@ or PROPERTY_ESCAPE is true in configuration file.
|
|
|
1522
1521
|
<h4 class="section3">Ruby</h4>
|
|
1523
1522
|
<div class="program_caption">
|
|
1524
1523
|
presentation data (ex-elem.pdata)</div>
|
|
1525
|
-
<pre class="program"><b <
|
|
1526
|
-
<b <
|
|
1527
|
-
<b <
|
|
1524
|
+
<pre class="program"><b <strong>kw:d="elem: expr"</strong>>foo</b>
|
|
1525
|
+
<b <strong>kw:d="Elem: expr"</strong>>foo</b>
|
|
1526
|
+
<b <strong>kw:d="ELEM: expr"</strong>>foo</b>
|
|
1528
1527
|
</pre>
|
|
1529
1528
|
<div class="terminal_caption">
|
|
1530
1529
|
compile</div>
|
|
1531
1530
|
<pre class="terminal">$ kwartz -l eruby ex-elem.pdata
|
|
1532
|
-
<
|
|
1533
|
-
<
|
|
1534
|
-
<
|
|
1531
|
+
<strong><%= expr %></strong>
|
|
1532
|
+
<strong><%=h expr %></strong>
|
|
1533
|
+
<strong><%= expr %></strong>
|
|
1535
1534
|
</pre>
|
|
1536
1535
|
<br>
|
|
1537
1536
|
|
|
@@ -1539,16 +1538,16 @@ compile</div>
|
|
|
1539
1538
|
<h4 class="section3">PHP</h4>
|
|
1540
1539
|
<div class="program_caption">
|
|
1541
1540
|
presentation data (ex-elem.pdata)</div>
|
|
1542
|
-
<pre class="program"><b <
|
|
1543
|
-
<b <
|
|
1544
|
-
<b <
|
|
1541
|
+
<pre class="program"><b <strong>kw:d="elem($expr)"</strong>>foo</b>
|
|
1542
|
+
<b <strong>kw:d="Elem($expr)"</strong>>foo</b>
|
|
1543
|
+
<b <strong>kw:d="ELEM($expr)"</strong>>foo</b>
|
|
1545
1544
|
</pre>
|
|
1546
1545
|
<div class="terminal_caption">
|
|
1547
1546
|
compile</div>
|
|
1548
1547
|
<pre class="terminal">$ kwartz -l php ex-elem.pdata
|
|
1549
|
-
<
|
|
1550
|
-
<
|
|
1551
|
-
<
|
|
1548
|
+
<strong><?php echo $expr; ?></strong>
|
|
1549
|
+
<strong><?php echo htmlspecialchars($expr); ?></strong>
|
|
1550
|
+
<strong><?php echo $expr; ?></strong>
|
|
1552
1551
|
</pre>
|
|
1553
1552
|
<br>
|
|
1554
1553
|
|
|
@@ -1556,16 +1555,16 @@ compile</div>
|
|
|
1556
1555
|
<h4 class="section3">JSP</h4>
|
|
1557
1556
|
<div class="program_caption">
|
|
1558
1557
|
presentation data (ex-elem.pdata)</div>
|
|
1559
|
-
<pre class="program"><b <
|
|
1560
|
-
<b <
|
|
1561
|
-
<b <
|
|
1558
|
+
<pre class="program"><b <strong>kw:d="elem(expr)"</strong>>foo</b>
|
|
1559
|
+
<b <strong>kw:d="Elem(expr)"</strong>>foo</b>
|
|
1560
|
+
<b <strong>kw:d="ELEM(expr)"</strong>>foo</b>
|
|
1562
1561
|
</pre>
|
|
1563
1562
|
<div class="terminal_caption">
|
|
1564
1563
|
compile</div>
|
|
1565
1564
|
<pre class="terminal">$ kwartz -l jstl ex-elem.pdata
|
|
1566
|
-
<
|
|
1567
|
-
<
|
|
1568
|
-
<
|
|
1565
|
+
<strong>${expr}</strong>
|
|
1566
|
+
<strong>${expr}</strong>
|
|
1567
|
+
<strong><c:out value="${expr}" escapeXml="false"/></strong>
|
|
1569
1568
|
</pre>
|
|
1570
1569
|
<br>
|
|
1571
1570
|
|
|
@@ -1573,16 +1572,16 @@ compile</div>
|
|
|
1573
1572
|
<h4 class="section3">Perl</h4>
|
|
1574
1573
|
<div class="program_caption">
|
|
1575
1574
|
presentation data (ex-elem.pdata)</div>
|
|
1576
|
-
<pre class="program"><b <
|
|
1577
|
-
<b <
|
|
1578
|
-
<b <
|
|
1575
|
+
<pre class="program"><b <strong>kw:d="elem($expr)"</strong>>foo</b>
|
|
1576
|
+
<b <strong>kw:d="Elem($expr)"</strong>>foo</b>
|
|
1577
|
+
<b <strong>kw:d="ELEM($expr)"</strong>>foo</b>
|
|
1579
1578
|
</pre>
|
|
1580
1579
|
<div class="terminal_caption">
|
|
1581
1580
|
compile</div>
|
|
1582
1581
|
<pre class="terminal">$ kwartz -l eperl ex-elem.pdata
|
|
1583
|
-
<
|
|
1584
|
-
<
|
|
1585
|
-
<
|
|
1582
|
+
<strong><?= $expr !></strong>
|
|
1583
|
+
<strong><?= encode_entities($expr) !></strong>
|
|
1584
|
+
<strong><?= $expr !></strong>
|
|
1586
1585
|
</pre>
|
|
1587
1586
|
<br>
|
|
1588
1587
|
|
|
@@ -1601,16 +1600,16 @@ or PROPERTY_ESCAPE is true in configuration file.
|
|
|
1601
1600
|
<h4 class="section3">Ruby</h4>
|
|
1602
1601
|
<div class="program_caption">
|
|
1603
1602
|
presentation data (ex-stag.pdata)</div>
|
|
1604
|
-
<pre class="program"><b <
|
|
1605
|
-
<b <
|
|
1606
|
-
<b <
|
|
1603
|
+
<pre class="program"><b <strong>kw:d="stag: expr"</strong>>foo</b>
|
|
1604
|
+
<b <strong>kw:d="Stag: expr"</strong>>foo</b>
|
|
1605
|
+
<b <strong>kw:d="STAG: expr"</strong>>foo</b>
|
|
1607
1606
|
</pre>
|
|
1608
1607
|
<div class="terminal_caption">
|
|
1609
1608
|
compile</div>
|
|
1610
1609
|
<pre class="terminal">$ kwartz -l eruby ex-stag.pdata
|
|
1611
|
-
<
|
|
1612
|
-
<
|
|
1613
|
-
<
|
|
1610
|
+
<strong><%= expr %></strong>foo</b>
|
|
1611
|
+
<strong><%=h expr %></strong>foo</b>
|
|
1612
|
+
<strong><%= expr %></strong>foo</b>
|
|
1614
1613
|
</pre>
|
|
1615
1614
|
<br>
|
|
1616
1615
|
|
|
@@ -1618,16 +1617,16 @@ compile</div>
|
|
|
1618
1617
|
<h4 class="section3">PHP</h4>
|
|
1619
1618
|
<div class="program_caption">
|
|
1620
1619
|
presentation data (ex-stag.pdata)</div>
|
|
1621
|
-
<pre class="program"><b <
|
|
1622
|
-
<b <
|
|
1623
|
-
<b <
|
|
1620
|
+
<pre class="program"><b <strong>kw:d="stag($expr)"</strong>>foo</b>
|
|
1621
|
+
<b <strong>kw:d="Stag($expr)"</strong>>foo</b>
|
|
1622
|
+
<b <strong>kw:d="STAG($expr)"</strong>>foo</b>
|
|
1624
1623
|
</pre>
|
|
1625
1624
|
<div class="terminal_caption">
|
|
1626
1625
|
compile</div>
|
|
1627
1626
|
<pre class="terminal">$ kwartz -l php ex-stag.pdata
|
|
1628
|
-
<
|
|
1629
|
-
<
|
|
1630
|
-
<
|
|
1627
|
+
<strong><?php echo $expr; ?></strong>foo</b>
|
|
1628
|
+
<strong><?php echo htmlspecialchars($expr); ?></strong>foo</b>
|
|
1629
|
+
<strong><?php echo $expr; ?></strong>foo</b>
|
|
1631
1630
|
</pre>
|
|
1632
1631
|
<br>
|
|
1633
1632
|
|
|
@@ -1635,16 +1634,16 @@ compile</div>
|
|
|
1635
1634
|
<h4 class="section3">JSP</h4>
|
|
1636
1635
|
<div class="program_caption">
|
|
1637
1636
|
presentation data (ex-stag.pdata)</div>
|
|
1638
|
-
<pre class="program"><b <
|
|
1639
|
-
<b <
|
|
1640
|
-
<b <
|
|
1637
|
+
<pre class="program"><b <strong>kw:d="stag(expr)"</strong>>foo</b>
|
|
1638
|
+
<b <strong>kw:d="Stag(expr)"</strong>>foo</b>
|
|
1639
|
+
<b <strong>kw:d="STAG(expr)"</strong>>foo</b>
|
|
1641
1640
|
</pre>
|
|
1642
1641
|
<div class="terminal_caption">
|
|
1643
1642
|
compile</div>
|
|
1644
1643
|
<pre class="terminal">$ kwartz -l jstl ex-stag.pdata
|
|
1645
|
-
<
|
|
1646
|
-
<
|
|
1647
|
-
<
|
|
1644
|
+
<strong>${expr}</strong>foo</b>
|
|
1645
|
+
<strong>${expr}</strong>foo</b>
|
|
1646
|
+
<strong><c:out value="${expr}" escapeXml="false"/></strong>foo</b>
|
|
1648
1647
|
</pre>
|
|
1649
1648
|
<br>
|
|
1650
1649
|
|
|
@@ -1652,16 +1651,16 @@ compile</div>
|
|
|
1652
1651
|
<h4 class="section3">Perl</h4>
|
|
1653
1652
|
<div class="program_caption">
|
|
1654
1653
|
presentation data (ex-stag.pdata)</div>
|
|
1655
|
-
<pre class="program"><b <
|
|
1656
|
-
<b <
|
|
1657
|
-
<b <
|
|
1654
|
+
<pre class="program"><b <strong>kw:d="stag($expr)"</strong>>foo</b>
|
|
1655
|
+
<b <strong>kw:d="Stag($expr)"</strong>>foo</b>
|
|
1656
|
+
<b <strong>kw:d="STAG($expr)"</strong>>foo</b>
|
|
1658
1657
|
</pre>
|
|
1659
1658
|
<div class="terminal_caption">
|
|
1660
1659
|
compile</div>
|
|
1661
1660
|
<pre class="terminal">$ kwartz -l eperl ex-stag.pdata
|
|
1662
|
-
<
|
|
1663
|
-
<
|
|
1664
|
-
<
|
|
1661
|
+
<strong><?= $expr !></strong>foo</b>
|
|
1662
|
+
<strong><?= encode_entities($expr) !></strong>foo</b>
|
|
1663
|
+
<strong><?= $expr !></strong>foo</b>
|
|
1665
1664
|
</pre>
|
|
1666
1665
|
<br>
|
|
1667
1666
|
|
|
@@ -1680,16 +1679,16 @@ or PROPERTY_ESCAPE is true in configuration file.
|
|
|
1680
1679
|
<h4 class="section3">Ruby</h4>
|
|
1681
1680
|
<div class="program_caption">
|
|
1682
1681
|
presentation data (ex-etag.pdata)</div>
|
|
1683
|
-
<pre class="program"><b <
|
|
1684
|
-
<b <
|
|
1685
|
-
<b <
|
|
1682
|
+
<pre class="program"><b <strong>kw:d="etag: expr"</strong>>foo</b>
|
|
1683
|
+
<b <strong>kw:d="Etag: expr"</strong>>foo</b>
|
|
1684
|
+
<b <strong>kw:d="ETAG: expr"</strong>>foo</b>
|
|
1686
1685
|
</pre>
|
|
1687
1686
|
<div class="terminal_caption">
|
|
1688
1687
|
compile</div>
|
|
1689
1688
|
<pre class="terminal">$ kwartz -l eruby ex-etag.pdata
|
|
1690
|
-
<b>foo<
|
|
1691
|
-
<b>foo<
|
|
1692
|
-
<b>foo<
|
|
1689
|
+
<b>foo<strong><%= expr %></strong>
|
|
1690
|
+
<b>foo<strong><%=h expr %></strong>
|
|
1691
|
+
<b>foo<strong><%= expr %></strong>
|
|
1693
1692
|
</pre>
|
|
1694
1693
|
<br>
|
|
1695
1694
|
|
|
@@ -1697,16 +1696,16 @@ compile</div>
|
|
|
1697
1696
|
<h4 class="section3">PHP</h4>
|
|
1698
1697
|
<div class="program_caption">
|
|
1699
1698
|
presentation data (ex-etag.pdata)</div>
|
|
1700
|
-
<pre class="program"><b <
|
|
1701
|
-
<b <
|
|
1702
|
-
<b <
|
|
1699
|
+
<pre class="program"><b <strong>kw:d="etag($expr)"</strong>>foo</b>
|
|
1700
|
+
<b <strong>kw:d="Etag($expr)"</strong>>foo</b>
|
|
1701
|
+
<b <strong>kw:d="ETAG($expr)"</strong>>foo</b>
|
|
1703
1702
|
</pre>
|
|
1704
1703
|
<div class="terminal_caption">
|
|
1705
1704
|
compile</div>
|
|
1706
1705
|
<pre class="terminal">$ kwartz -l php ex-etag.pdata
|
|
1707
|
-
<b>foo<
|
|
1708
|
-
<b>foo<
|
|
1709
|
-
<b>foo<
|
|
1706
|
+
<b>foo<strong><?php echo $expr; ?></strong>
|
|
1707
|
+
<b>foo<strong><?php echo htmlspecialchars($expr); ?></strong>
|
|
1708
|
+
<b>foo<strong><?php echo $expr; ?></strong>
|
|
1710
1709
|
</pre>
|
|
1711
1710
|
<br>
|
|
1712
1711
|
|
|
@@ -1714,16 +1713,16 @@ compile</div>
|
|
|
1714
1713
|
<h4 class="section3">JSP</h4>
|
|
1715
1714
|
<div class="program_caption">
|
|
1716
1715
|
presentation data (ex-etag.pdata)</div>
|
|
1717
|
-
<pre class="program"><b <
|
|
1718
|
-
<b <
|
|
1719
|
-
<b <
|
|
1716
|
+
<pre class="program"><b <strong>kw:d="etag(expr)"</strong>>foo</b>
|
|
1717
|
+
<b <strong>kw:d="Etag(expr)"</strong>>foo</b>
|
|
1718
|
+
<b <strong>kw:d="ETAG(expr)"</strong>>foo</b>
|
|
1720
1719
|
</pre>
|
|
1721
1720
|
<div class="terminal_caption">
|
|
1722
1721
|
compile</div>
|
|
1723
1722
|
<pre class="terminal">$ kwartz -l jstl ex-etag.pdata
|
|
1724
|
-
<b>foo<
|
|
1725
|
-
<b>foo<
|
|
1726
|
-
<b>foo<
|
|
1723
|
+
<b>foo<strong>${expr}</strong>
|
|
1724
|
+
<b>foo<strong>${expr}</strong>
|
|
1725
|
+
<b>foo<strong><c:out value="${expr}" escapeXml="false"/></strong>
|
|
1727
1726
|
</pre>
|
|
1728
1727
|
<br>
|
|
1729
1728
|
|
|
@@ -1731,16 +1730,16 @@ compile</div>
|
|
|
1731
1730
|
<h4 class="section3">Perl</h4>
|
|
1732
1731
|
<div class="program_caption">
|
|
1733
1732
|
presentation data (ex-etag.pdata)</div>
|
|
1734
|
-
<pre class="program"><b <
|
|
1735
|
-
<b <
|
|
1736
|
-
<b <
|
|
1733
|
+
<pre class="program"><b <strong>kw:d="etag($expr)"</strong>>foo</b>
|
|
1734
|
+
<b <strong>kw:d="Etag($expr)"</strong>>foo</b>
|
|
1735
|
+
<b <strong>kw:d="ETAG($expr)"</strong>>foo</b>
|
|
1737
1736
|
</pre>
|
|
1738
1737
|
<div class="terminal_caption">
|
|
1739
1738
|
compile</div>
|
|
1740
1739
|
<pre class="terminal">$ kwartz -l eperl ex-etag.pdata
|
|
1741
|
-
<b>foo<
|
|
1742
|
-
<b>foo<
|
|
1743
|
-
<b>foo<
|
|
1740
|
+
<b>foo<strong><?= $expr !></strong>
|
|
1741
|
+
<b>foo<strong><?= encode_entities($expr) !></strong>
|
|
1742
|
+
<b>foo<strong><?= $expr !></strong>
|
|
1744
1743
|
</pre>
|
|
1745
1744
|
<br>
|
|
1746
1745
|
|
|
@@ -1759,16 +1758,16 @@ or PROPERTY_ESCAPE is true in configuration file.
|
|
|
1759
1758
|
<h4 class="section3">Ruby</h4>
|
|
1760
1759
|
<div class="program_caption">
|
|
1761
1760
|
presentation data (ex-cont.pdata)</div>
|
|
1762
|
-
<pre class="program"><b <
|
|
1763
|
-
<b <
|
|
1764
|
-
<b <
|
|
1761
|
+
<pre class="program"><b <strong>kw:d="cont: expr"</strong>>foo</b>
|
|
1762
|
+
<b <strong>kw:d="Cont: expr"</strong>>foo</b>
|
|
1763
|
+
<b <strong>kw:d="CONT: expr"</strong>>foo</b>
|
|
1765
1764
|
</pre>
|
|
1766
1765
|
<div class="terminal_caption">
|
|
1767
1766
|
compile</div>
|
|
1768
1767
|
<pre class="terminal">$ kwartz -l eruby ex-cont.pdata
|
|
1769
|
-
<b><
|
|
1770
|
-
<b><
|
|
1771
|
-
<b><
|
|
1768
|
+
<b><strong><%= expr %></strong></b>
|
|
1769
|
+
<b><strong><%=h expr %></strong></b>
|
|
1770
|
+
<b><strong><%= expr %></strong></b>
|
|
1772
1771
|
</pre>
|
|
1773
1772
|
<br>
|
|
1774
1773
|
|
|
@@ -1776,16 +1775,16 @@ compile</div>
|
|
|
1776
1775
|
<h4 class="section3">PHP</h4>
|
|
1777
1776
|
<div class="program_caption">
|
|
1778
1777
|
presentation data (ex-cont.pdata)</div>
|
|
1779
|
-
<pre class="program"><b <
|
|
1780
|
-
<b <
|
|
1781
|
-
<b <
|
|
1778
|
+
<pre class="program"><b <strong>kw:d="cont($expr)"</strong>>foo</b>
|
|
1779
|
+
<b <strong>kw:d="Cont($expr)"</strong>>foo</b>
|
|
1780
|
+
<b <strong>kw:d="CONT($expr)"</strong>>foo</b>
|
|
1782
1781
|
</pre>
|
|
1783
1782
|
<div class="terminal_caption">
|
|
1784
1783
|
compile</div>
|
|
1785
1784
|
<pre class="terminal">$ kwartz -l php ex-cont.pdata
|
|
1786
|
-
<b><
|
|
1787
|
-
<b><
|
|
1788
|
-
<b><
|
|
1785
|
+
<b><strong><?php echo $expr; ?></strong></b>
|
|
1786
|
+
<b><strong><?php echo htmlspecialchars($expr); ?></strong></b>
|
|
1787
|
+
<b><strong><?php echo $expr; ?></strong></b>
|
|
1789
1788
|
</pre>
|
|
1790
1789
|
<br>
|
|
1791
1790
|
|
|
@@ -1793,16 +1792,16 @@ compile</div>
|
|
|
1793
1792
|
<h4 class="section3">JSP</h4>
|
|
1794
1793
|
<div class="program_caption">
|
|
1795
1794
|
presentation data (ex-cont.pdata)</div>
|
|
1796
|
-
<pre class="program"><b <
|
|
1797
|
-
<b <
|
|
1798
|
-
<b <
|
|
1795
|
+
<pre class="program"><b <strong>kw:d="cont(expr)"</strong>>foo</b>
|
|
1796
|
+
<b <strong>kw:d="Cont(expr)"</strong>>foo</b>
|
|
1797
|
+
<b <strong>kw:d="CONT(expr)"</strong>>foo</b>
|
|
1799
1798
|
</pre>
|
|
1800
1799
|
<div class="terminal_caption">
|
|
1801
1800
|
compile</div>
|
|
1802
1801
|
<pre class="terminal">$ kwartz -l jstl ex-cont.pdata
|
|
1803
|
-
<b><
|
|
1804
|
-
<b><
|
|
1805
|
-
<b><
|
|
1802
|
+
<b><strong>${expr}</strong></b>
|
|
1803
|
+
<b><strong>${expr}</strong></b>
|
|
1804
|
+
<b><strong><c:out value="${expr}" escapeXml="false"/></strong></b>
|
|
1806
1805
|
</pre>
|
|
1807
1806
|
<br>
|
|
1808
1807
|
|
|
@@ -1810,16 +1809,16 @@ compile</div>
|
|
|
1810
1809
|
<h4 class="section3">Perl</h4>
|
|
1811
1810
|
<div class="program_caption">
|
|
1812
1811
|
presentation data (ex-cont.pdata)</div>
|
|
1813
|
-
<pre class="program"><b <
|
|
1814
|
-
<b <
|
|
1815
|
-
<b <
|
|
1812
|
+
<pre class="program"><b <strong>kw:d="cont($expr)"</strong>>foo</b>
|
|
1813
|
+
<b <strong>kw:d="Cont($expr)"</strong>>foo</b>
|
|
1814
|
+
<b <strong>kw:d="CONT($expr)"</strong>>foo</b>
|
|
1816
1815
|
</pre>
|
|
1817
1816
|
<div class="terminal_caption">
|
|
1818
1817
|
compile</div>
|
|
1819
1818
|
<pre class="terminal">$ kwartz -l eperl ex-cont.pdata
|
|
1820
|
-
<b><
|
|
1821
|
-
<b><
|
|
1822
|
-
<b><
|
|
1819
|
+
<b><strong><?= $expr !></strong></b>
|
|
1820
|
+
<b><strong><?= encode_entities($expr) !></strong></b>
|
|
1821
|
+
<b><strong><?= $expr !></strong></b>
|
|
1823
1822
|
</pre>
|
|
1824
1823
|
<br>
|
|
1825
1824
|
|
|
@@ -1835,16 +1834,16 @@ compile</div>
|
|
|
1835
1834
|
<h4 class="section3">Ruby</h4>
|
|
1836
1835
|
<div class="program_caption">
|
|
1837
1836
|
presentation data (ex-value.pdata)</div>
|
|
1838
|
-
<pre class="program"><b <
|
|
1839
|
-
<b <
|
|
1840
|
-
<b <
|
|
1837
|
+
<pre class="program"><b <strong>kw:d="value: expr"</strong>>foo</b>
|
|
1838
|
+
<b <strong>kw:d="Value: expr"</strong>>foo</b>
|
|
1839
|
+
<b <strong>kw:d="VALUE: expr"</strong>>foo</b>
|
|
1841
1840
|
</pre>
|
|
1842
1841
|
<div class="terminal_caption">
|
|
1843
1842
|
compile</div>
|
|
1844
1843
|
<pre class="terminal">$ kwartz -l eruby ex-value.pdata
|
|
1845
|
-
<b><
|
|
1846
|
-
<b><
|
|
1847
|
-
<b><
|
|
1844
|
+
<b><strong><%= expr %></strong></b>
|
|
1845
|
+
<b><strong><%=h expr %></strong></b>
|
|
1846
|
+
<b><strong><%= expr %></strong></b>
|
|
1848
1847
|
</pre>
|
|
1849
1848
|
<br>
|
|
1850
1849
|
|
|
@@ -1852,16 +1851,16 @@ compile</div>
|
|
|
1852
1851
|
<h4 class="section3">PHP</h4>
|
|
1853
1852
|
<div class="program_caption">
|
|
1854
1853
|
presentation data (ex-value.pdata)</div>
|
|
1855
|
-
<pre class="program"><b <
|
|
1856
|
-
<b <
|
|
1857
|
-
<b <
|
|
1854
|
+
<pre class="program"><b <strong>kw:d="value($expr)"</strong>>foo</b>
|
|
1855
|
+
<b <strong>kw:d="Value($expr)"</strong>>foo</b>
|
|
1856
|
+
<b <strong>kw:d="VALUE($expr)"</strong>>foo</b>
|
|
1858
1857
|
</pre>
|
|
1859
1858
|
<div class="terminal_caption">
|
|
1860
1859
|
compile</div>
|
|
1861
1860
|
<pre class="terminal">$ kwartz -l php ex-value.pdata
|
|
1862
|
-
<b><
|
|
1863
|
-
<b><
|
|
1864
|
-
<b><
|
|
1861
|
+
<b><strong><?php echo $expr; ?></strong></b>
|
|
1862
|
+
<b><strong><?php echo htmlspecialchars($expr); ?></strong></b>
|
|
1863
|
+
<b><strong><?php echo $expr; ?></strong></b>
|
|
1865
1864
|
</pre>
|
|
1866
1865
|
<br>
|
|
1867
1866
|
|
|
@@ -1869,16 +1868,16 @@ compile</div>
|
|
|
1869
1868
|
<h4 class="section3">JSP</h4>
|
|
1870
1869
|
<div class="program_caption">
|
|
1871
1870
|
presentation data (ex-value.pdata)</div>
|
|
1872
|
-
<pre class="program"><b <
|
|
1873
|
-
<b <
|
|
1874
|
-
<b <
|
|
1871
|
+
<pre class="program"><b <strong>kw:d="value(expr)"</strong>>foo</b>
|
|
1872
|
+
<b <strong>kw:d="Value(expr)"</strong>>foo</b>
|
|
1873
|
+
<b <strong>kw:d="VALUE(expr)"</strong>>foo</b>
|
|
1875
1874
|
</pre>
|
|
1876
1875
|
<div class="terminal_caption">
|
|
1877
1876
|
compile</div>
|
|
1878
1877
|
<pre class="terminal">$ kwartz -l jstl ex-value.pdata
|
|
1879
|
-
<b><
|
|
1880
|
-
<b><
|
|
1881
|
-
<b><
|
|
1878
|
+
<b><strong>${expr}</strong></b>
|
|
1879
|
+
<b><strong>${expr}</strong></b>
|
|
1880
|
+
<b><strong><c:out value="${expr}" escapeXml="false"/></strong></b>
|
|
1882
1881
|
</pre>
|
|
1883
1882
|
<br>
|
|
1884
1883
|
|
|
@@ -1886,16 +1885,16 @@ compile</div>
|
|
|
1886
1885
|
<h4 class="section3">Perl</h4>
|
|
1887
1886
|
<div class="program_caption">
|
|
1888
1887
|
presentation data (ex-value.pdata)</div>
|
|
1889
|
-
<pre class="program"><b <
|
|
1890
|
-
<b <
|
|
1891
|
-
<b <
|
|
1888
|
+
<pre class="program"><b <strong>kw:d="value($expr)"</strong>>foo</b>
|
|
1889
|
+
<b <strong>kw:d="Value($expr)"</strong>>foo</b>
|
|
1890
|
+
<b <strong>kw:d="VALUE($expr)"</strong>>foo</b>
|
|
1892
1891
|
</pre>
|
|
1893
1892
|
<div class="terminal_caption">
|
|
1894
1893
|
compile</div>
|
|
1895
1894
|
<pre class="terminal">$ kwartz -l eperl ex-value.pdata
|
|
1896
|
-
<b><
|
|
1897
|
-
<b><
|
|
1898
|
-
<b><
|
|
1895
|
+
<b><strong><?= $expr !></strong></b>
|
|
1896
|
+
<b><strong><?= encode_entities($expr) !></strong></b>
|
|
1897
|
+
<b><strong><?= $expr !></strong></b>
|
|
1899
1898
|
</pre>
|
|
1900
1899
|
<br>
|
|
1901
1900
|
|
|
@@ -1910,30 +1909,30 @@ compile</div>
|
|
|
1910
1909
|
<h4 class="section3">Ruby</h4>
|
|
1911
1910
|
<div class="program_caption">
|
|
1912
1911
|
presentation data (ex-foreach.pdata)</div>
|
|
1913
|
-
<pre class="program"><tr <
|
|
1914
|
-
<td
|
|
1912
|
+
<pre class="program"><tr <strong>kw:d="for item in list"</strong>>
|
|
1913
|
+
<td kw:d="cont item">foo</td>
|
|
1915
1914
|
</tr>
|
|
1916
1915
|
|
|
1917
|
-
<tr <
|
|
1918
|
-
<td
|
|
1919
|
-
<td
|
|
1916
|
+
<tr <strong>kw:d="for key,value in hash"</strong>>
|
|
1917
|
+
<td kw:d="cont key">key</td>
|
|
1918
|
+
<td kw:d="cont value">value</td>
|
|
1920
1919
|
</tr>
|
|
1921
1920
|
</pre>
|
|
1922
1921
|
<div class="terminal_caption">
|
|
1923
1922
|
compile</div>
|
|
1924
1923
|
<pre class="terminal">$ kwartz -l eruby ex-foreach.pdata
|
|
1925
|
-
<
|
|
1924
|
+
<strong><% for item in list do %></strong>
|
|
1926
1925
|
<tr>
|
|
1927
1926
|
<td><%= item %></td>
|
|
1928
1927
|
</tr>
|
|
1929
|
-
<
|
|
1928
|
+
<strong><% end %></strong>
|
|
1930
1929
|
|
|
1931
|
-
<
|
|
1930
|
+
<strong><% hash.each do |key, value| %></strong>
|
|
1932
1931
|
<tr>
|
|
1933
1932
|
<td><%= key %></td>
|
|
1934
1933
|
<td><%= value %></td>
|
|
1935
1934
|
</tr>
|
|
1936
|
-
<
|
|
1935
|
+
<strong><% end %></strong>
|
|
1937
1936
|
</pre>
|
|
1938
1937
|
<br>
|
|
1939
1938
|
|
|
@@ -1941,30 +1940,30 @@ compile</div>
|
|
|
1941
1940
|
<h4 class="section3">PHP</h4>
|
|
1942
1941
|
<div class="program_caption">
|
|
1943
1942
|
presentation data (ex-foreach.pdata)</div>
|
|
1944
|
-
<pre class="program"><tr <
|
|
1945
|
-
<td
|
|
1943
|
+
<pre class="program"><tr <strong>kw:d="foreach($list as $item)"</strong>>
|
|
1944
|
+
<td kw:d="cont($item)">foo</td>
|
|
1946
1945
|
</tr>
|
|
1947
1946
|
|
|
1948
|
-
<tr <
|
|
1949
|
-
<td
|
|
1950
|
-
<td
|
|
1947
|
+
<tr <strong>kw:d="foreach($hash as $key=>$value)"</strong>>
|
|
1948
|
+
<td kw:d="cont($key)">key</td>
|
|
1949
|
+
<td kw:d="cont($value)">value</td>
|
|
1951
1950
|
</tr>
|
|
1952
1951
|
</pre>
|
|
1953
1952
|
<div class="terminal_caption">
|
|
1954
1953
|
compile</div>
|
|
1955
1954
|
<pre class="terminal">$ kwartz -l php ex-foreach.pdata
|
|
1956
|
-
<
|
|
1955
|
+
<strong><?php foreach ($list as $item) { ?></strong>
|
|
1957
1956
|
<tr>
|
|
1958
1957
|
<td><?php echo $item; ?></td>
|
|
1959
1958
|
</tr>
|
|
1960
|
-
<
|
|
1959
|
+
<strong><?php } ?></strong>
|
|
1961
1960
|
|
|
1962
|
-
<
|
|
1961
|
+
<strong><?php foreach ($hash as $key=>$value) { ?></strong>
|
|
1963
1962
|
<tr>
|
|
1964
1963
|
<td><?php echo $key; ?></td>
|
|
1965
1964
|
<td><?php echo $value; ?></td>
|
|
1966
1965
|
</tr>
|
|
1967
|
-
<
|
|
1966
|
+
<strong><?php } ?></strong>
|
|
1968
1967
|
</pre>
|
|
1969
1968
|
<br>
|
|
1970
1969
|
|
|
@@ -1972,40 +1971,40 @@ compile</div>
|
|
|
1972
1971
|
<h4 class="section3">JSP</h4>
|
|
1973
1972
|
<div class="program_caption">
|
|
1974
1973
|
presentation data (ex-foreach.pdata)</div>
|
|
1975
|
-
<pre class="program"><tr <
|
|
1976
|
-
<td
|
|
1974
|
+
<pre class="program"><tr <strong>kw:d="for(item: list)"</strong>>
|
|
1975
|
+
<td kw:d="cont(item)">foo</td>
|
|
1977
1976
|
</tr>
|
|
1978
1977
|
|
|
1979
|
-
<tr <
|
|
1980
|
-
<td
|
|
1981
|
-
<td
|
|
1978
|
+
<tr <strong>kw:d="forEach('var'=>'v', 'items'=>'${params.list}', 'varStatus'=>'status')"</strong>>
|
|
1979
|
+
<td kw:d="cont(status.index)">1</td>
|
|
1980
|
+
<td kw:d="cont(v)"></td>
|
|
1982
1981
|
</tr>
|
|
1983
1982
|
|
|
1984
|
-
<tr <
|
|
1985
|
-
<td
|
|
1983
|
+
<tr <strong>kw:d="forEach('var'=>'n', 'begin'=>1, 'end'=>10, 'step'=>2)"</strong>>
|
|
1984
|
+
<td kw:d="cont(n)">key</td>
|
|
1986
1985
|
</tr>
|
|
1987
1986
|
</pre>
|
|
1988
1987
|
<div class="terminal_caption">
|
|
1989
1988
|
compile</div>
|
|
1990
1989
|
<pre class="terminal">$ kwartz -l jstl ex-foreach.pdata
|
|
1991
|
-
<
|
|
1990
|
+
<strong><c:forEach var="item" items="${list}"></strong>
|
|
1992
1991
|
<tr>
|
|
1993
1992
|
<td>${item}</td>
|
|
1994
1993
|
</tr>
|
|
1995
|
-
<
|
|
1994
|
+
<strong></c:forEach></strong>
|
|
1996
1995
|
|
|
1997
|
-
<
|
|
1996
|
+
<strong><c:forEach var="v" items="${params.list}" varStatus="status"></strong>
|
|
1998
1997
|
<tr>
|
|
1999
1998
|
<td>${status.index}</td>
|
|
2000
1999
|
<td>${v}</td>
|
|
2001
2000
|
</tr>
|
|
2002
|
-
<
|
|
2001
|
+
<strong></c:forEach></strong>
|
|
2003
2002
|
|
|
2004
|
-
<
|
|
2003
|
+
<strong><c:forEach var="n" begin="1" end="10" step="2"></strong>
|
|
2005
2004
|
<tr>
|
|
2006
2005
|
<td>${n}</td>
|
|
2007
2006
|
</tr>
|
|
2008
|
-
<
|
|
2007
|
+
<strong></c:forEach></strong>
|
|
2009
2008
|
</pre>
|
|
2010
2009
|
<br>
|
|
2011
2010
|
|
|
@@ -2013,31 +2012,31 @@ compile</div>
|
|
|
2013
2012
|
<h4 class="section3">Perl</h4>
|
|
2014
2013
|
<div class="program_caption">
|
|
2015
2014
|
presentation data (ex-foreach.pdata)</div>
|
|
2016
|
-
<pre class="program"><tr <
|
|
2017
|
-
<td
|
|
2015
|
+
<pre class="program"><tr <strong>kw:d="foreach($item in @list)"</strong>>
|
|
2016
|
+
<td kw:d="cont($item)">foo</td>
|
|
2018
2017
|
</tr>
|
|
2019
2018
|
|
|
2020
|
-
<tr <
|
|
2021
|
-
<td
|
|
2022
|
-
<td
|
|
2019
|
+
<tr <strong>kw:d="foreach($key,$value in %hash)"</strong>>
|
|
2020
|
+
<td kw:d="cont($key)">key</td>
|
|
2021
|
+
<td kw:d="cont($value)">value</td>
|
|
2023
2022
|
</tr>
|
|
2024
2023
|
</pre>
|
|
2025
2024
|
<div class="terminal_caption">
|
|
2026
2025
|
compile</div>
|
|
2027
2026
|
<pre class="terminal">$ kwartz -l eperl ex-foreach.pdata
|
|
2028
|
-
<
|
|
2027
|
+
<strong><? foreach my $item (@list) { !></strong>
|
|
2029
2028
|
<tr>
|
|
2030
2029
|
<td><?= $item !></td>
|
|
2031
2030
|
</tr>
|
|
2032
|
-
<
|
|
2031
|
+
<strong><? } !></strong>
|
|
2033
2032
|
|
|
2034
|
-
<
|
|
2035
|
-
<
|
|
2033
|
+
<strong><? foreach my $key (keys %hash) { !></strong>
|
|
2034
|
+
<strong><? my $value = $hash{$key}; !></strong>
|
|
2036
2035
|
<tr>
|
|
2037
2036
|
<td><?= $key !></td>
|
|
2038
2037
|
<td><?= $value !></td>
|
|
2039
2038
|
</tr>
|
|
2040
|
-
<
|
|
2039
|
+
<strong><? } !></strong>
|
|
2041
2040
|
</pre>
|
|
2042
2041
|
<br>
|
|
2043
2042
|
|
|
@@ -2052,29 +2051,29 @@ compile</div>
|
|
|
2052
2051
|
<h4 class="section3">Ruby</h4>
|
|
2053
2052
|
<div class="program_caption">
|
|
2054
2053
|
presentation data (ex-list.pdata)</div>
|
|
2055
|
-
<pre class="program"><tr <
|
|
2056
|
-
<td
|
|
2054
|
+
<pre class="program"><tr <strong>kw:d="list item in list"</strong>>
|
|
2055
|
+
<td kw:d="cont item">foo</td>
|
|
2057
2056
|
</tr>
|
|
2058
2057
|
|
|
2059
|
-
<tr <
|
|
2060
|
-
<td
|
|
2061
|
-
<td
|
|
2058
|
+
<tr <strong>kw:d="list key,value in hash"</strong>>
|
|
2059
|
+
<td kw:d="cont key">key</td>
|
|
2060
|
+
<td kw:d="cont value">value</td>
|
|
2062
2061
|
</tr>
|
|
2063
2062
|
</pre>
|
|
2064
2063
|
<div class="terminal_caption">
|
|
2065
2064
|
compile</div>
|
|
2066
2065
|
<pre class="terminal">$ kwartz -l eruby ex-list.pdata
|
|
2067
2066
|
<tr>
|
|
2068
|
-
<
|
|
2067
|
+
<strong><% for item in list do %></strong>
|
|
2069
2068
|
<td><%= item %></td>
|
|
2070
|
-
<
|
|
2069
|
+
<strong><% end %></strong>
|
|
2071
2070
|
</tr>
|
|
2072
2071
|
|
|
2073
2072
|
<tr>
|
|
2074
|
-
<
|
|
2073
|
+
<strong><% hash.each do |key, value| %></strong>
|
|
2075
2074
|
<td><%= key %></td>
|
|
2076
2075
|
<td><%= value %></td>
|
|
2077
|
-
<
|
|
2076
|
+
<strong><% end %></strong>
|
|
2078
2077
|
</tr>
|
|
2079
2078
|
</pre>
|
|
2080
2079
|
<br>
|
|
@@ -2083,29 +2082,29 @@ compile</div>
|
|
|
2083
2082
|
<h4 class="section3">PHP</h4>
|
|
2084
2083
|
<div class="program_caption">
|
|
2085
2084
|
presentation data (ex-list.pdata)</div>
|
|
2086
|
-
<pre class="program"><tr <
|
|
2087
|
-
<td
|
|
2085
|
+
<pre class="program"><tr <strong>kw:d="list($list as $item)"</strong>>
|
|
2086
|
+
<td kw:d="cont($item)">foo</td>
|
|
2088
2087
|
</tr>
|
|
2089
2088
|
|
|
2090
|
-
<tr <
|
|
2091
|
-
<td
|
|
2092
|
-
<td
|
|
2089
|
+
<tr <strong>kw:d="list($hash as $key=>$value)"</strong>>
|
|
2090
|
+
<td kw:d="cont($key)">key</td>
|
|
2091
|
+
<td kw:d="cont($value)">value</td>
|
|
2093
2092
|
</tr>
|
|
2094
2093
|
</pre>
|
|
2095
2094
|
<div class="terminal_caption">
|
|
2096
2095
|
compile</div>
|
|
2097
2096
|
<pre class="terminal">$ kwartz -l php ex-list.pdata
|
|
2098
2097
|
<tr>
|
|
2099
|
-
<
|
|
2098
|
+
<strong><?php foreach ($list as $item) { ?></strong>
|
|
2100
2099
|
<td><?php echo $item; ?></td>
|
|
2101
|
-
<
|
|
2100
|
+
<strong><?php } ?></strong>
|
|
2102
2101
|
</tr>
|
|
2103
2102
|
|
|
2104
2103
|
<tr>
|
|
2105
|
-
<
|
|
2104
|
+
<strong><?php foreach ($hash as $key=>$value) { ?></strong>
|
|
2106
2105
|
<td><?php echo $key; ?></td>
|
|
2107
2106
|
<td><?php echo $value; ?></td>
|
|
2108
|
-
<
|
|
2107
|
+
<strong><?php } ?></strong>
|
|
2109
2108
|
</tr>
|
|
2110
2109
|
</pre>
|
|
2111
2110
|
<br>
|
|
@@ -2114,17 +2113,17 @@ compile</div>
|
|
|
2114
2113
|
<h4 class="section3">JSP</h4>
|
|
2115
2114
|
<div class="program_caption">
|
|
2116
2115
|
presentation data (ex-list.pdata)</div>
|
|
2117
|
-
<pre class="program"><tr <
|
|
2118
|
-
<td
|
|
2116
|
+
<pre class="program"><tr <strong>kw:d="list(item: list)"</strong>>
|
|
2117
|
+
<td kw:d="cont(item)">foo</td>
|
|
2119
2118
|
</tr>
|
|
2120
2119
|
</pre>
|
|
2121
2120
|
<div class="terminal_caption">
|
|
2122
2121
|
compile</div>
|
|
2123
2122
|
<pre class="terminal">$ kwartz -l jstl ex-list.pdata
|
|
2124
2123
|
<tr>
|
|
2125
|
-
<
|
|
2124
|
+
<strong><c:forEach var="item" items="${list}"></strong>
|
|
2126
2125
|
<td>${item}</td>
|
|
2127
|
-
<
|
|
2126
|
+
<strong></c:forEach></strong>
|
|
2128
2127
|
</tr>
|
|
2129
2128
|
</pre>
|
|
2130
2129
|
<br>
|
|
@@ -2133,30 +2132,30 @@ compile</div>
|
|
|
2133
2132
|
<h4 class="section3">Perl</h4>
|
|
2134
2133
|
<div class="program_caption">
|
|
2135
2134
|
presentation data (ex-list.pdata)</div>
|
|
2136
|
-
<pre class="program"><tr <
|
|
2137
|
-
<td
|
|
2135
|
+
<pre class="program"><tr <strong>kw:d="list($item in @list)"</strong>>
|
|
2136
|
+
<td kw:d="cont($item)">foo</td>
|
|
2138
2137
|
</tr>
|
|
2139
2138
|
|
|
2140
|
-
<tr <
|
|
2141
|
-
<td
|
|
2142
|
-
<td
|
|
2139
|
+
<tr <strong>kw:d="list($key,$value in %hash)"</strong>>
|
|
2140
|
+
<td kw:d="cont($key)">key</td>
|
|
2141
|
+
<td kw:d="cont($value)">value</td>
|
|
2143
2142
|
</tr>
|
|
2144
2143
|
</pre>
|
|
2145
2144
|
<div class="terminal_caption">
|
|
2146
2145
|
compile</div>
|
|
2147
2146
|
<pre class="terminal">$ kwartz -l eperl ex-list.pdata
|
|
2148
2147
|
<tr>
|
|
2149
|
-
<
|
|
2148
|
+
<strong><? foreach my $item (@list) { !></strong>
|
|
2150
2149
|
<td><?= $item !></td>
|
|
2151
|
-
<
|
|
2150
|
+
<strong><? } !></strong>
|
|
2152
2151
|
</tr>
|
|
2153
2152
|
|
|
2154
2153
|
<tr>
|
|
2155
|
-
<
|
|
2156
|
-
<
|
|
2154
|
+
<strong><? foreach my $key (keys %hash) { !></strong>
|
|
2155
|
+
<strong><? my $value = $hash{$key}; !></strong>
|
|
2157
2156
|
<td><?= $key !></td>
|
|
2158
2157
|
<td><?= $value !></td>
|
|
2159
|
-
<
|
|
2158
|
+
<strong><? } !></strong>
|
|
2160
2159
|
</tr>
|
|
2161
2160
|
</pre>
|
|
2162
2161
|
<br>
|
|
@@ -2173,31 +2172,31 @@ compile</div>
|
|
|
2173
2172
|
<h4 class="section3">Ruby</h4>
|
|
2174
2173
|
<div class="program_caption">
|
|
2175
2174
|
presentation data (ex-foreach_ctr.pdata)</div>
|
|
2176
|
-
<pre class="program"><tr <
|
|
2177
|
-
<td
|
|
2175
|
+
<pre class="program"><tr <strong>kw:d="For item in list"</strong>>
|
|
2176
|
+
<td kw:d="cont item">foo</td>
|
|
2178
2177
|
</tr>
|
|
2179
2178
|
|
|
2180
|
-
<tr <
|
|
2181
|
-
<td
|
|
2179
|
+
<tr <strong>kw:d="List item in list"</strong>>
|
|
2180
|
+
<td kw:d="cont item">foo</td>
|
|
2182
2181
|
</tr>
|
|
2183
2182
|
</pre>
|
|
2184
2183
|
<div class="terminal_caption">
|
|
2185
2184
|
compile</div>
|
|
2186
2185
|
<pre class="terminal">$ kwartz -l eruby ex-foreach_ctr.pdata
|
|
2187
|
-
<
|
|
2188
|
-
<
|
|
2189
|
-
<
|
|
2186
|
+
<strong><% item_ctr = 0 %></strong>
|
|
2187
|
+
<strong><% for item in list do %></strong>
|
|
2188
|
+
<strong><% item_ctr += 1 %></strong>
|
|
2190
2189
|
<tr>
|
|
2191
2190
|
<td><%= item %></td>
|
|
2192
2191
|
</tr>
|
|
2193
|
-
<
|
|
2192
|
+
<strong><% end %></strong>
|
|
2194
2193
|
|
|
2195
2194
|
<tr>
|
|
2196
|
-
<
|
|
2197
|
-
<
|
|
2198
|
-
<
|
|
2195
|
+
<strong><% item_ctr = 0 %></strong>
|
|
2196
|
+
<strong><% for item in list do %></strong>
|
|
2197
|
+
<strong><% item_ctr += 1 %></strong>
|
|
2199
2198
|
<td><%= item %></td>
|
|
2200
|
-
<
|
|
2199
|
+
<strong><% end %></strong>
|
|
2201
2200
|
</tr>
|
|
2202
2201
|
</pre>
|
|
2203
2202
|
<br>
|
|
@@ -2206,31 +2205,31 @@ compile</div>
|
|
|
2206
2205
|
<h4 class="section3">PHP</h4>
|
|
2207
2206
|
<div class="program_caption">
|
|
2208
2207
|
presentation data (ex-foreach_ctr.pdata)</div>
|
|
2209
|
-
<pre class="program"><tr <
|
|
2210
|
-
<td
|
|
2208
|
+
<pre class="program"><tr <strong>kw:d="Foreach($list as $item)"</strong>>
|
|
2209
|
+
<td kw:d="cont($item)">foo</td>
|
|
2211
2210
|
</tr>
|
|
2212
2211
|
|
|
2213
|
-
<tr <
|
|
2214
|
-
<td
|
|
2212
|
+
<tr <strong>kw:d="List($list as $item)"</strong>>
|
|
2213
|
+
<td kw:d="cont($item)">foo</td>
|
|
2215
2214
|
</tr>
|
|
2216
2215
|
</pre>
|
|
2217
2216
|
<div class="terminal_caption">
|
|
2218
2217
|
compile</div>
|
|
2219
2218
|
<pre class="terminal">$ kwartz -l php ex-foreach_ctr.pdata
|
|
2220
|
-
<
|
|
2221
|
-
<
|
|
2222
|
-
<
|
|
2219
|
+
<strong><?php $item_ctr = 0; ?></strong>
|
|
2220
|
+
<strong><?php foreach ($list as $item) { ?></strong>
|
|
2221
|
+
<strong><?php $item_ctr++; ?></strong>
|
|
2223
2222
|
<tr>
|
|
2224
2223
|
<td><?php echo $item; ?></td>
|
|
2225
2224
|
</tr>
|
|
2226
|
-
<
|
|
2225
|
+
<strong><?php } ?></strong>
|
|
2227
2226
|
|
|
2228
2227
|
<tr>
|
|
2229
|
-
<
|
|
2230
|
-
<
|
|
2231
|
-
<
|
|
2228
|
+
<strong><?php $item_ctr = 0; ?></strong>
|
|
2229
|
+
<strong><?php foreach ($list as $item) { ?></strong>
|
|
2230
|
+
<strong><?php $item_ctr++; ?></strong>
|
|
2232
2231
|
<td><?php echo $item; ?></td>
|
|
2233
|
-
<
|
|
2232
|
+
<strong><?php } ?></strong>
|
|
2234
2233
|
</tr>
|
|
2235
2234
|
</pre>
|
|
2236
2235
|
<br>
|
|
@@ -2239,29 +2238,29 @@ compile</div>
|
|
|
2239
2238
|
<h4 class="section3">JSP</h4>
|
|
2240
2239
|
<div class="program_caption">
|
|
2241
2240
|
presentation data (ex-foreach_ctr.pdata)</div>
|
|
2242
|
-
<pre class="program"><tr <
|
|
2243
|
-
<td
|
|
2241
|
+
<pre class="program"><tr <strong>kw:d="For(item: list)"</strong>>
|
|
2242
|
+
<td kw:d="cont(item)">foo</td>
|
|
2244
2243
|
</tr>
|
|
2245
2244
|
|
|
2246
|
-
<tr <
|
|
2247
|
-
<td
|
|
2245
|
+
<tr <strong>kw:d="List(item: list)"</strong>>
|
|
2246
|
+
<td kw:d="cont(item)">foo</td>
|
|
2248
2247
|
</tr>
|
|
2249
2248
|
</pre>
|
|
2250
2249
|
<div class="terminal_caption">
|
|
2251
2250
|
compile</div>
|
|
2252
2251
|
<pre class="terminal">$ kwartz -l jstl ex-foreach_ctr.pdata
|
|
2253
|
-
<
|
|
2254
|
-
<
|
|
2252
|
+
<strong><c:forEach var="item" items="${list}" varStatus="item_status"></strong>
|
|
2253
|
+
<strong><c:set var="item_ctr" value="${item_status.count}"/></strong>
|
|
2255
2254
|
<tr>
|
|
2256
2255
|
<td>${item}</td>
|
|
2257
2256
|
</tr>
|
|
2258
|
-
<
|
|
2257
|
+
<strong></c:forEach></strong>
|
|
2259
2258
|
|
|
2260
2259
|
<tr>
|
|
2261
|
-
<
|
|
2262
|
-
<
|
|
2260
|
+
<strong><c:forEach var="item" items="${list}" varStatus="item_status"></strong>
|
|
2261
|
+
<strong><c:set var="item_ctr" value="${item_status.count}"/></strong>
|
|
2263
2262
|
<td>${item}</td>
|
|
2264
|
-
<
|
|
2263
|
+
<strong></c:forEach></strong>
|
|
2265
2264
|
</tr>
|
|
2266
2265
|
</pre>
|
|
2267
2266
|
<br>
|
|
@@ -2270,31 +2269,31 @@ compile</div>
|
|
|
2270
2269
|
<h4 class="section3">Perl</h4>
|
|
2271
2270
|
<div class="program_caption">
|
|
2272
2271
|
presentation data (ex-foreach_ctr.pdata)</div>
|
|
2273
|
-
<pre class="program"><tr <
|
|
2274
|
-
<td
|
|
2272
|
+
<pre class="program"><tr <strong>kw:d="Foreach($item in @list)"</strong>>
|
|
2273
|
+
<td kw:d="cont($item)">foo</td>
|
|
2275
2274
|
</tr>
|
|
2276
2275
|
|
|
2277
|
-
<tr <
|
|
2278
|
-
<td
|
|
2276
|
+
<tr <strong>kw:d="List($item in @list)"</strong>>
|
|
2277
|
+
<td kw:d="cont($item)">foo</td>
|
|
2279
2278
|
</tr>
|
|
2280
2279
|
</pre>
|
|
2281
2280
|
<div class="terminal_caption">
|
|
2282
2281
|
compile</div>
|
|
2283
2282
|
<pre class="terminal">$ kwartz -l eperl ex-foreach_ctr.pdata
|
|
2284
|
-
<
|
|
2285
|
-
<
|
|
2286
|
-
<
|
|
2283
|
+
<strong><? my $item_ctr = 0; !></strong>
|
|
2284
|
+
<strong><? foreach my $item (@list) { !></strong>
|
|
2285
|
+
<strong><? $item_ctr++; !></strong>
|
|
2287
2286
|
<tr>
|
|
2288
2287
|
<td><?= $item !></td>
|
|
2289
2288
|
</tr>
|
|
2290
|
-
<
|
|
2289
|
+
<strong><? } !></strong>
|
|
2291
2290
|
|
|
2292
2291
|
<tr>
|
|
2293
|
-
<
|
|
2294
|
-
<
|
|
2295
|
-
<
|
|
2292
|
+
<strong><? my $item_ctr = 0; !></strong>
|
|
2293
|
+
<strong><? foreach my $item (@list) { !></strong>
|
|
2294
|
+
<strong><? $item_ctr++; !></strong>
|
|
2296
2295
|
<td><?= $item !></td>
|
|
2297
|
-
<
|
|
2296
|
+
<strong><? } !></strong>
|
|
2298
2297
|
</tr>
|
|
2299
2298
|
</pre>
|
|
2300
2299
|
<br>
|
|
@@ -2314,33 +2313,33 @@ or by properties(PROPERTY_ODD, PROPERTY_EVEN) in configuration file.
|
|
|
2314
2313
|
<h4 class="section3">Ruby</h4>
|
|
2315
2314
|
<div class="program_caption">
|
|
2316
2315
|
presentation data (ex-foreach_tgl.pdata)</div>
|
|
2317
|
-
<pre class="program"><tr <
|
|
2318
|
-
<td
|
|
2316
|
+
<pre class="program"><tr <strong>kw:d="FOR item in list"</strong>>
|
|
2317
|
+
<td kw:d="cont item">foo</td>
|
|
2319
2318
|
</tr>
|
|
2320
2319
|
|
|
2321
|
-
<tr <
|
|
2322
|
-
<td
|
|
2320
|
+
<tr <strong>kw:d="LIST item in list"</strong>>
|
|
2321
|
+
<td kw:d="cont item">foo</td>
|
|
2323
2322
|
</tr>
|
|
2324
2323
|
</pre>
|
|
2325
2324
|
<div class="terminal_caption">
|
|
2326
2325
|
compile</div>
|
|
2327
2326
|
<pre class="terminal">$ kwartz -l eruby ex-foreach_tgl.pdata
|
|
2328
|
-
<
|
|
2329
|
-
<
|
|
2330
|
-
<
|
|
2331
|
-
<
|
|
2327
|
+
<strong><% item_ctr = 0 %></strong>
|
|
2328
|
+
<strong><% for item in list do %></strong>
|
|
2329
|
+
<strong><% item_ctr += 1 %></strong>
|
|
2330
|
+
<strong><% item_tgl = item_ctr%2==0 ? 'even' : 'odd' %></strong>
|
|
2332
2331
|
<tr>
|
|
2333
2332
|
<td><%= item %></td>
|
|
2334
2333
|
</tr>
|
|
2335
|
-
<
|
|
2334
|
+
<strong><% end %></strong>
|
|
2336
2335
|
|
|
2337
2336
|
<tr>
|
|
2338
|
-
<
|
|
2339
|
-
<
|
|
2340
|
-
<
|
|
2341
|
-
<
|
|
2337
|
+
<strong><% item_ctr = 0 %></strong>
|
|
2338
|
+
<strong><% for item in list do %></strong>
|
|
2339
|
+
<strong><% item_ctr += 1 %></strong>
|
|
2340
|
+
<strong><% item_tgl = item_ctr%2==0 ? 'even' : 'odd' %></strong>
|
|
2342
2341
|
<td><%= item %></td>
|
|
2343
|
-
<
|
|
2342
|
+
<strong><% end %></strong>
|
|
2344
2343
|
</tr>
|
|
2345
2344
|
</pre>
|
|
2346
2345
|
<br>
|
|
@@ -2349,33 +2348,33 @@ compile</div>
|
|
|
2349
2348
|
<h4 class="section3">PHP</h4>
|
|
2350
2349
|
<div class="program_caption">
|
|
2351
2350
|
presentation data (ex-foreach_tgl.pdata)</div>
|
|
2352
|
-
<pre class="program"><tr <
|
|
2353
|
-
<td
|
|
2351
|
+
<pre class="program"><tr <strong>kw:d="FOREACH($list as $item)"</strong>>
|
|
2352
|
+
<td kw:d="cont($item)">foo</td>
|
|
2354
2353
|
</tr>
|
|
2355
2354
|
|
|
2356
|
-
<tr <
|
|
2357
|
-
<td
|
|
2355
|
+
<tr <strong>kw:d="LIST($list as $item)"</strong>>
|
|
2356
|
+
<td kw:d="cont($item)">foo</td>
|
|
2358
2357
|
</tr>
|
|
2359
2358
|
</pre>
|
|
2360
2359
|
<div class="terminal_caption">
|
|
2361
2360
|
compile</div>
|
|
2362
2361
|
<pre class="terminal">$ kwartz -l php ex-foreach_tgl.pdata
|
|
2363
|
-
<
|
|
2364
|
-
<
|
|
2365
|
-
<
|
|
2366
|
-
<
|
|
2362
|
+
<strong><?php $item_ctr = 0; ?></strong>
|
|
2363
|
+
<strong><?php foreach ($list as $item) { ?></strong>
|
|
2364
|
+
<strong><?php $item_ctr++; ?></strong>
|
|
2365
|
+
<strong><?php $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; ?></strong>
|
|
2367
2366
|
<tr>
|
|
2368
2367
|
<td><?php echo $item; ?></td>
|
|
2369
2368
|
</tr>
|
|
2370
|
-
<
|
|
2369
|
+
<strong><?php } ?></strong>
|
|
2371
2370
|
|
|
2372
2371
|
<tr>
|
|
2373
|
-
<
|
|
2374
|
-
<
|
|
2375
|
-
<
|
|
2376
|
-
<
|
|
2372
|
+
<strong><?php $item_ctr = 0; ?></strong>
|
|
2373
|
+
<strong><?php foreach ($list as $item) { ?></strong>
|
|
2374
|
+
<strong><?php $item_ctr++; ?></strong>
|
|
2375
|
+
<strong><?php $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; ?></strong>
|
|
2377
2376
|
<td><?php echo $item; ?></td>
|
|
2378
|
-
<
|
|
2377
|
+
<strong><?php } ?></strong>
|
|
2379
2378
|
</tr>
|
|
2380
2379
|
</pre>
|
|
2381
2380
|
<br>
|
|
@@ -2384,31 +2383,31 @@ compile</div>
|
|
|
2384
2383
|
<h4 class="section3">JSP</h4>
|
|
2385
2384
|
<div class="program_caption">
|
|
2386
2385
|
presentation data (ex-foreach_tgl.pdata)</div>
|
|
2387
|
-
<pre class="program"><tr <
|
|
2388
|
-
<td
|
|
2386
|
+
<pre class="program"><tr <strong>kw:d="FOR(item: list)"</strong>>
|
|
2387
|
+
<td kw:d="cont(item)">foo</td>
|
|
2389
2388
|
</tr>
|
|
2390
2389
|
|
|
2391
|
-
<tr <
|
|
2392
|
-
<td
|
|
2390
|
+
<tr <strong>kw:d="LIST(item: list)"</strong>>
|
|
2391
|
+
<td kw:d="cont(item)">foo</td>
|
|
2393
2392
|
</tr>
|
|
2394
2393
|
</pre>
|
|
2395
2394
|
<div class="terminal_caption">
|
|
2396
2395
|
compile</div>
|
|
2397
2396
|
<pre class="terminal">$ kwartz -l jstl ex-foreach_tgl.pdata
|
|
2398
|
-
<
|
|
2399
|
-
<
|
|
2400
|
-
<
|
|
2397
|
+
<strong><c:forEach var="item" items="${list}" varStatus="item_status"></strong>
|
|
2398
|
+
<strong><c:set var="item_ctr" value="${item_status.count}"/></strong>
|
|
2399
|
+
<strong><c:set var="item_tgl" value="${item_status.count%2==0 ? 'even' : 'odd'}"/></strong>
|
|
2401
2400
|
<tr>
|
|
2402
2401
|
<td>${item}</td>
|
|
2403
2402
|
</tr>
|
|
2404
|
-
<
|
|
2403
|
+
<strong></c:forEach></strong>
|
|
2405
2404
|
|
|
2406
2405
|
<tr>
|
|
2407
|
-
<
|
|
2408
|
-
<
|
|
2409
|
-
<
|
|
2406
|
+
<strong><c:forEach var="item" items="${list}" varStatus="item_status"></strong>
|
|
2407
|
+
<strong><c:set var="item_ctr" value="${item_status.count}"/></strong>
|
|
2408
|
+
<strong><c:set var="item_tgl" value="${item_status.count%2==0 ? 'even' : 'odd'}"/></strong>
|
|
2410
2409
|
<td>${item}</td>
|
|
2411
|
-
<
|
|
2410
|
+
<strong></c:forEach></strong>
|
|
2412
2411
|
</tr>
|
|
2413
2412
|
</pre>
|
|
2414
2413
|
<br>
|
|
@@ -2417,33 +2416,33 @@ compile</div>
|
|
|
2417
2416
|
<h4 class="section3">Perl</h4>
|
|
2418
2417
|
<div class="program_caption">
|
|
2419
2418
|
presentation data (ex-foreach_tgl.pdata)</div>
|
|
2420
|
-
<pre class="program"><tr <
|
|
2421
|
-
<td
|
|
2419
|
+
<pre class="program"><tr <strong>kw:d="FOREACH($item in @list)"</strong>>
|
|
2420
|
+
<td kw:d="cont($item)">foo</td>
|
|
2422
2421
|
</tr>
|
|
2423
2422
|
|
|
2424
|
-
<tr <
|
|
2425
|
-
<td
|
|
2423
|
+
<tr <strong>kw:d="LIST($item in @list)"</strong>>
|
|
2424
|
+
<td kw:d="cont($item)">foo</td>
|
|
2426
2425
|
</tr>
|
|
2427
2426
|
</pre>
|
|
2428
2427
|
<div class="terminal_caption">
|
|
2429
2428
|
compile</div>
|
|
2430
2429
|
<pre class="terminal">$ kwartz -l eperl ex-foreach_tgl.pdata
|
|
2431
|
-
<
|
|
2432
|
-
<
|
|
2433
|
-
<
|
|
2434
|
-
<
|
|
2430
|
+
<strong><? my $item_ctr = 0; !></strong>
|
|
2431
|
+
<strong><? foreach my $item (@list) { !></strong>
|
|
2432
|
+
<strong><? $item_ctr++; !></strong>
|
|
2433
|
+
<strong><? my $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; !></strong>
|
|
2435
2434
|
<tr>
|
|
2436
2435
|
<td><?= $item !></td>
|
|
2437
2436
|
</tr>
|
|
2438
|
-
<
|
|
2437
|
+
<strong><? } !></strong>
|
|
2439
2438
|
|
|
2440
2439
|
<tr>
|
|
2441
|
-
<
|
|
2442
|
-
<
|
|
2443
|
-
<
|
|
2444
|
-
<
|
|
2440
|
+
<strong><? my $item_ctr = 0; !></strong>
|
|
2441
|
+
<strong><? foreach my $item (@list) { !></strong>
|
|
2442
|
+
<strong><? $item_ctr++; !></strong>
|
|
2443
|
+
<strong><? my $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; !></strong>
|
|
2445
2444
|
<td><?= $item !></td>
|
|
2446
|
-
<
|
|
2445
|
+
<strong><? } !></strong>
|
|
2447
2446
|
</tr>
|
|
2448
2447
|
</pre>
|
|
2449
2448
|
<br>
|
|
@@ -2463,27 +2462,27 @@ until conditional expression is false.
|
|
|
2463
2462
|
<h4 class="section3">Ruby</h4>
|
|
2464
2463
|
<div class="program_caption">
|
|
2465
2464
|
presentation data (ex-while.pdata)</div>
|
|
2466
|
-
<pre class="program"><tr <
|
|
2467
|
-
<td
|
|
2465
|
+
<pre class="program"><tr <strong>kw:d="while (item = dbh.fetch) != nil"</strong>>
|
|
2466
|
+
<td kw:d="cont item.name">foo</td>
|
|
2468
2467
|
</tr>
|
|
2469
2468
|
|
|
2470
|
-
<tr <
|
|
2471
|
-
<td
|
|
2469
|
+
<tr <strong>kw:d="loop (item = dbh.fetch) != nil"</strong>>
|
|
2470
|
+
<td kw:d="cont item.name">foo</td>
|
|
2472
2471
|
</tr>
|
|
2473
2472
|
</pre>
|
|
2474
2473
|
<div class="terminal_caption">
|
|
2475
2474
|
compile</div>
|
|
2476
2475
|
<pre class="terminal">$ kwartz -l eruby ex-while.pdata
|
|
2477
|
-
<
|
|
2476
|
+
<strong><% while (item = dbh.fetch) != nil do %></strong>
|
|
2478
2477
|
<tr>
|
|
2479
2478
|
<td><%= item.name %></td>
|
|
2480
2479
|
</tr>
|
|
2481
|
-
<
|
|
2480
|
+
<strong><% end %></strong>
|
|
2482
2481
|
|
|
2483
2482
|
<tr>
|
|
2484
|
-
<
|
|
2483
|
+
<strong><% while (item = dbh.fetch) != nil do %></strong>
|
|
2485
2484
|
<td><%= item.name %></td>
|
|
2486
|
-
<
|
|
2485
|
+
<strong><% end %></strong>
|
|
2487
2486
|
</tr>
|
|
2488
2487
|
</pre>
|
|
2489
2488
|
<br>
|
|
@@ -2492,27 +2491,27 @@ compile</div>
|
|
|
2492
2491
|
<h4 class="section3">PHP</h4>
|
|
2493
2492
|
<div class="program_caption">
|
|
2494
2493
|
presentation data (ex-while.pdata)</div>
|
|
2495
|
-
<pre class="program"><tr <
|
|
2496
|
-
<td
|
|
2494
|
+
<pre class="program"><tr <strong>kw:d="while(($item = $dbh->fetch()) != null)"</strong>>
|
|
2495
|
+
<td kw:d="cont($item->name)">foo</td>
|
|
2497
2496
|
</tr>
|
|
2498
2497
|
|
|
2499
|
-
<tr <
|
|
2500
|
-
<td
|
|
2498
|
+
<tr <strong>kw:d="loop(($item = $dbh->fetch()) != null)"</strong>>
|
|
2499
|
+
<td kw:d="cont($item->name)">foo</td>
|
|
2501
2500
|
</tr>
|
|
2502
2501
|
</pre>
|
|
2503
2502
|
<div class="terminal_caption">
|
|
2504
2503
|
compile</div>
|
|
2505
2504
|
<pre class="terminal">$ kwartz -l php ex-while.pdata
|
|
2506
|
-
<
|
|
2505
|
+
<strong><?php while (($item = $dbh->fetch()) != null) { ?></strong>
|
|
2507
2506
|
<tr>
|
|
2508
2507
|
<td><?php echo $item->name; ?></td>
|
|
2509
2508
|
</tr>
|
|
2510
|
-
<
|
|
2509
|
+
<strong><?php } ?></strong>
|
|
2511
2510
|
|
|
2512
2511
|
<tr>
|
|
2513
|
-
<
|
|
2512
|
+
<strong><?php while (($item = $dbh->fetch()) != null) { ?></strong>
|
|
2514
2513
|
<td><?php echo $item->name; ?></td>
|
|
2515
|
-
<
|
|
2514
|
+
<strong><?php } ?></strong>
|
|
2516
2515
|
</tr>
|
|
2517
2516
|
</pre>
|
|
2518
2517
|
<br>
|
|
@@ -2534,27 +2533,27 @@ compile</div>
|
|
|
2534
2533
|
<h4 class="section3">Perl</h4>
|
|
2535
2534
|
<div class="program_caption">
|
|
2536
2535
|
presentation data (ex-while.pdata)</div>
|
|
2537
|
-
<pre class="program"><tr <
|
|
2538
|
-
<td
|
|
2536
|
+
<pre class="program"><tr <strong>kw:d="while(($item = $dbh->fetch()) != null)"</strong>>
|
|
2537
|
+
<td kw:d="cont($item->name)">foo</td>
|
|
2539
2538
|
</tr>
|
|
2540
2539
|
|
|
2541
|
-
<tr <
|
|
2542
|
-
<td
|
|
2540
|
+
<tr <strong>kw:d="loop(($item = $dbh->fetch()) != null)"</strong>>
|
|
2541
|
+
<td kw:d="cont($item->name)">foo</td>
|
|
2543
2542
|
</tr>
|
|
2544
2543
|
</pre>
|
|
2545
2544
|
<div class="terminal_caption">
|
|
2546
2545
|
compile</div>
|
|
2547
2546
|
<pre class="terminal">$ kwartz -l eperl ex-while.pdata
|
|
2548
|
-
<
|
|
2547
|
+
<strong><? while (($item = $dbh->fetch()) != null) { !></strong>
|
|
2549
2548
|
<tr>
|
|
2550
2549
|
<td><?= $item->name !></td>
|
|
2551
2550
|
</tr>
|
|
2552
|
-
<
|
|
2551
|
+
<strong><? } !></strong>
|
|
2553
2552
|
|
|
2554
2553
|
<tr>
|
|
2555
|
-
<
|
|
2554
|
+
<strong><? while (($item = $dbh->fetch()) != null) { !></strong>
|
|
2556
2555
|
<td><?= $item->name !></td>
|
|
2557
|
-
<
|
|
2556
|
+
<strong><? } !></strong>
|
|
2558
2557
|
</tr>
|
|
2559
2558
|
</pre>
|
|
2560
2559
|
<br>
|
|
@@ -2573,32 +2572,32 @@ start-tag of 'elseif'/'else' directive.
|
|
|
2573
2572
|
<h4 class="section3">Ruby</h4>
|
|
2574
2573
|
<div class="program_caption">
|
|
2575
2574
|
presentation data (ex-if.pdata)</div>
|
|
2576
|
-
<pre class="program"><div <
|
|
2577
|
-
<p class="error"
|
|
2575
|
+
<pre class="program"><div <strong>kw:d="if status=='error'"</strong>>
|
|
2576
|
+
<p class="error" kw:d="cont mesg">error</p>
|
|
2578
2577
|
</div>
|
|
2579
|
-
<div <
|
|
2580
|
-
<p class="warning"
|
|
2578
|
+
<div <strong>kw:d="elsif status=='warning'"</strong>>
|
|
2579
|
+
<p class="warning" kw:d="cont mesg">waring</p>
|
|
2581
2580
|
</div>
|
|
2582
|
-
<div <
|
|
2583
|
-
<p
|
|
2581
|
+
<div <strong>kw:d="else"</strong>>
|
|
2582
|
+
<p kw:d="cont mesg">mesg</p>
|
|
2584
2583
|
</div>
|
|
2585
2584
|
</pre>
|
|
2586
2585
|
<div class="terminal_caption">
|
|
2587
2586
|
compile</div>
|
|
2588
2587
|
<pre class="terminal">$ kwartz -l eruby ex-if.pdata
|
|
2589
|
-
<
|
|
2588
|
+
<strong><% if status=='error' then %></strong>
|
|
2590
2589
|
<div>
|
|
2591
2590
|
<p class="error"><%= mesg %></p>
|
|
2592
2591
|
</div>
|
|
2593
|
-
<
|
|
2592
|
+
<strong><% elsif status=='warning' then %></strong>
|
|
2594
2593
|
<div>
|
|
2595
2594
|
<p class="warning"><%= mesg %></p>
|
|
2596
2595
|
</div>
|
|
2597
|
-
<
|
|
2596
|
+
<strong><% else %></strong>
|
|
2598
2597
|
<div>
|
|
2599
2598
|
<p><%= mesg %></p>
|
|
2600
2599
|
</div>
|
|
2601
|
-
<
|
|
2600
|
+
<strong><% end %></strong>
|
|
2602
2601
|
</pre>
|
|
2603
2602
|
<br>
|
|
2604
2603
|
|
|
@@ -2606,32 +2605,32 @@ compile</div>
|
|
|
2606
2605
|
<h4 class="section3">PHP</h4>
|
|
2607
2606
|
<div class="program_caption">
|
|
2608
2607
|
presentation data (ex-if.pdata)</div>
|
|
2609
|
-
<pre class="program"><div <
|
|
2610
|
-
<p class="error"
|
|
2608
|
+
<pre class="program"><div <strong>kw:d="if($status=='error')"</strong>>
|
|
2609
|
+
<p class="error" kw:d="cont($mesg)">error</p>
|
|
2611
2610
|
</div>
|
|
2612
|
-
<div <
|
|
2613
|
-
<p class="warning"
|
|
2611
|
+
<div <strong>kw:d="elseif($status=='warning')"</strong>>
|
|
2612
|
+
<p class="warning" kw:d="cont($mesg)">waring</p>
|
|
2614
2613
|
</div>
|
|
2615
|
-
<div <
|
|
2616
|
-
<p
|
|
2614
|
+
<div <strong>kw:d="else"</strong>>
|
|
2615
|
+
<p kw:d="cont($mesg)">mesg</p>
|
|
2617
2616
|
</div>
|
|
2618
2617
|
</pre>
|
|
2619
2618
|
<div class="terminal_caption">
|
|
2620
2619
|
compile</div>
|
|
2621
2620
|
<pre class="terminal">$ kwartz -l php ex-if.pdata
|
|
2622
|
-
<
|
|
2621
|
+
<strong><?php if ($status=='error') { ?></strong>
|
|
2623
2622
|
<div>
|
|
2624
2623
|
<p class="error"><?php echo $mesg; ?></p>
|
|
2625
2624
|
</div>
|
|
2626
|
-
<
|
|
2625
|
+
<strong><?php } elseif ($status=='warning') { ?></strong>
|
|
2627
2626
|
<div>
|
|
2628
2627
|
<p class="warning"><?php echo $mesg; ?></p>
|
|
2629
2628
|
</div>
|
|
2630
|
-
<
|
|
2629
|
+
<strong><?php } else { ?></strong>
|
|
2631
2630
|
<div>
|
|
2632
2631
|
<p><?php echo $mesg; ?></p>
|
|
2633
2632
|
</div>
|
|
2634
|
-
<
|
|
2633
|
+
<strong><?php } ?></strong>
|
|
2635
2634
|
</pre>
|
|
2636
2635
|
<br>
|
|
2637
2636
|
|
|
@@ -2639,32 +2638,32 @@ compile</div>
|
|
|
2639
2638
|
<h4 class="section3">JSP</h4>
|
|
2640
2639
|
<div class="program_caption">
|
|
2641
2640
|
presentation data (ex-if.pdata)</div>
|
|
2642
|
-
<pre class="program"><div <
|
|
2643
|
-
<p class="error"
|
|
2641
|
+
<pre class="program"><div <strong>kw:d="if(status=='error')"</strong>>
|
|
2642
|
+
<p class="error" kw:d="cont(mesg)">error</p>
|
|
2644
2643
|
</div>
|
|
2645
|
-
<div <
|
|
2646
|
-
<p class="warning"
|
|
2644
|
+
<div <strong>kw:d="elseif(status=='warning')"</strong>>
|
|
2645
|
+
<p class="warning" kw:d="cont(mesg)">waring</p>
|
|
2647
2646
|
</div>
|
|
2648
|
-
<div <
|
|
2649
|
-
<p
|
|
2647
|
+
<div <strong>kw:d="else"</strong>>
|
|
2648
|
+
<p kw:d="cont(mesg)">mesg</p>
|
|
2650
2649
|
</div>
|
|
2651
2650
|
</pre>
|
|
2652
2651
|
<div class="terminal_caption">
|
|
2653
2652
|
compile</div>
|
|
2654
2653
|
<pre class="terminal">$ kwartz -l jstl ex-if.pdata
|
|
2655
|
-
<
|
|
2654
|
+
<strong><c:choose><c:when test="${status=='error'}"></strong>
|
|
2656
2655
|
<div>
|
|
2657
2656
|
<p class="error">${mesg}</p>
|
|
2658
2657
|
</div>
|
|
2659
|
-
<
|
|
2658
|
+
<strong></c:when><c:when test="${status=='warning'}"></strong>
|
|
2660
2659
|
<div>
|
|
2661
2660
|
<p class="warning">${mesg}</p>
|
|
2662
2661
|
</div>
|
|
2663
|
-
<
|
|
2662
|
+
<strong></c:when><c:otherwise></strong>
|
|
2664
2663
|
<div>
|
|
2665
2664
|
<p>${mesg}</p>
|
|
2666
2665
|
</div>
|
|
2667
|
-
<
|
|
2666
|
+
<strong></c:otherwise></c:choose></strong>
|
|
2668
2667
|
</pre>
|
|
2669
2668
|
<br>
|
|
2670
2669
|
|
|
@@ -2672,32 +2671,32 @@ compile</div>
|
|
|
2672
2671
|
<h4 class="section3">Perl</h4>
|
|
2673
2672
|
<div class="program_caption">
|
|
2674
2673
|
presentation data (ex-if.pdata)</div>
|
|
2675
|
-
<pre class="program"><div <
|
|
2676
|
-
<p class="error"
|
|
2674
|
+
<pre class="program"><div <strong>kw:d="if($status=='error')"</strong>>
|
|
2675
|
+
<p class="error" kw:d="cont($mesg)">error</p>
|
|
2677
2676
|
</div>
|
|
2678
|
-
<div <
|
|
2679
|
-
<p class="warning"
|
|
2677
|
+
<div <strong>kw:d="elsif($status=='warning')"</strong>>
|
|
2678
|
+
<p class="warning" kw:d="cont($mesg)">waring</p>
|
|
2680
2679
|
</div>
|
|
2681
|
-
<div <
|
|
2682
|
-
<p
|
|
2680
|
+
<div <strong>kw:d="else"</strong>>
|
|
2681
|
+
<p kw:d="cont($mesg)">mesg</p>
|
|
2683
2682
|
</div>
|
|
2684
2683
|
</pre>
|
|
2685
2684
|
<div class="terminal_caption">
|
|
2686
2685
|
compile</div>
|
|
2687
2686
|
<pre class="terminal">$ kwartz -l eperl ex-if.pdata
|
|
2688
|
-
<
|
|
2687
|
+
<strong><? if ($status=='error') { !></strong>
|
|
2689
2688
|
<div>
|
|
2690
2689
|
<p class="error"><?= $mesg !></p>
|
|
2691
2690
|
</div>
|
|
2692
|
-
<
|
|
2691
|
+
<strong><? } elsif ($status=='warning') { !></strong>
|
|
2693
2692
|
<div>
|
|
2694
2693
|
<p class="warning"><?= $mesg !></p>
|
|
2695
2694
|
</div>
|
|
2696
|
-
<
|
|
2695
|
+
<strong><? } else { !></strong>
|
|
2697
2696
|
<div>
|
|
2698
2697
|
<p><?= $mesg !></p>
|
|
2699
2698
|
</div>
|
|
2700
|
-
<
|
|
2699
|
+
<strong><? } !></strong>
|
|
2701
2700
|
</pre>
|
|
2702
2701
|
<br>
|
|
2703
2702
|
|
|
@@ -2712,14 +2711,14 @@ compile</div>
|
|
|
2712
2711
|
<h4 class="section3">Ruby</h4>
|
|
2713
2712
|
<div class="program_caption">
|
|
2714
2713
|
presentation data (ex-set.pdata)</div>
|
|
2715
|
-
<pre class="program"><tr <
|
|
2716
|
-
<td
|
|
2714
|
+
<pre class="program"><tr <strong>kw:d="set color=i%2==0 ? 'red' : 'blue'"</strong>>
|
|
2715
|
+
<td kw:d="cont: color">red</td>
|
|
2717
2716
|
</tr>
|
|
2718
2717
|
</pre>
|
|
2719
2718
|
<div class="terminal_caption">
|
|
2720
2719
|
compile</div>
|
|
2721
2720
|
<pre class="terminal">$ kwartz -l eruby ex-set.pdata
|
|
2722
|
-
<
|
|
2721
|
+
<strong><% color=i%2==0 ? 'red' : 'blue' %></strong>
|
|
2723
2722
|
<tr>
|
|
2724
2723
|
<td><%= color %></td>
|
|
2725
2724
|
</tr>
|
|
@@ -2730,14 +2729,14 @@ compile</div>
|
|
|
2730
2729
|
<h4 class="section3">PHP</h4>
|
|
2731
2730
|
<div class="program_caption">
|
|
2732
2731
|
presentation data (ex-set.pdata)</div>
|
|
2733
|
-
<pre class="program"><tr <
|
|
2734
|
-
<td
|
|
2732
|
+
<pre class="program"><tr <strong>kw:d="set($color=$i%2==0 ? 'red' : 'blue')"</strong>>
|
|
2733
|
+
<td kw:d="cont($color)">red</td>
|
|
2735
2734
|
</tr>
|
|
2736
2735
|
</pre>
|
|
2737
2736
|
<div class="terminal_caption">
|
|
2738
2737
|
compile</div>
|
|
2739
2738
|
<pre class="terminal">$ kwartz -l php ex-set.pdata
|
|
2740
|
-
<
|
|
2739
|
+
<strong><?php $color=$i%2==0 ? 'red' : 'blue'; ?></strong>
|
|
2741
2740
|
<tr>
|
|
2742
2741
|
<td><?php echo $color; ?></td>
|
|
2743
2742
|
</tr>
|
|
@@ -2748,14 +2747,14 @@ compile</div>
|
|
|
2748
2747
|
<h4 class="section3">JSP</h4>
|
|
2749
2748
|
<div class="program_caption">
|
|
2750
2749
|
presentation data (ex-set.pdata)</div>
|
|
2751
|
-
<pre class="program"><tr <
|
|
2752
|
-
<td
|
|
2750
|
+
<pre class="program"><tr <strong>kw:d="set(color=i%2==0 ? 'red' : 'blue')"</strong>>
|
|
2751
|
+
<td kw:d="cont(color)">red</td>
|
|
2753
2752
|
</tr>
|
|
2754
2753
|
</pre>
|
|
2755
2754
|
<div class="terminal_caption">
|
|
2756
2755
|
compile</div>
|
|
2757
2756
|
<pre class="terminal">$ kwartz -l jstl ex-set.pdata
|
|
2758
|
-
<
|
|
2757
|
+
<strong><c:set var="color=i%2=" value="${0 ? 'red' : 'blue'}"/></strong>
|
|
2759
2758
|
<tr>
|
|
2760
2759
|
<td>${color}</td>
|
|
2761
2760
|
</tr>
|
|
@@ -2766,14 +2765,14 @@ compile</div>
|
|
|
2766
2765
|
<h4 class="section3">Perl</h4>
|
|
2767
2766
|
<div class="program_caption">
|
|
2768
2767
|
presentation data (ex-set.pdata)</div>
|
|
2769
|
-
<pre class="program"><tr <
|
|
2770
|
-
<td
|
|
2768
|
+
<pre class="program"><tr <strong>kw:d="set($color=i%2==0 ? 'red' : 'blue')"</strong>>
|
|
2769
|
+
<td kw:d="cont($color)">red</td>
|
|
2771
2770
|
</tr>
|
|
2772
2771
|
</pre>
|
|
2773
2772
|
<div class="terminal_caption">
|
|
2774
2773
|
compile</div>
|
|
2775
2774
|
<pre class="terminal">$ kwartz -l eperl ex-set.pdata
|
|
2776
|
-
<
|
|
2775
|
+
<strong><? $color=i%2==0 ? 'red' : 'blue'; !></strong>
|
|
2777
2776
|
<tr>
|
|
2778
2777
|
<td><?= $color !></td>
|
|
2779
2778
|
</tr>
|
|
@@ -2795,8 +2794,8 @@ Id attribute is equivalent to 'mark' directive if other direcitve is not specifi
|
|
|
2795
2794
|
<h4 class="section3">Ruby</h4>
|
|
2796
2795
|
<div class="program_caption">
|
|
2797
2796
|
presentation data (ex-mark.pdata)</div>
|
|
2798
|
-
<pre class="program"><ul <
|
|
2799
|
-
<li <
|
|
2797
|
+
<pre class="program"><ul <strong>id="mark:list"</strong>>
|
|
2798
|
+
<li <strong>kw:d="id: item"</strong>>foo</li>
|
|
2800
2799
|
</ul>
|
|
2801
2800
|
</pre>
|
|
2802
2801
|
<div class="terminal_caption">
|
|
@@ -2812,8 +2811,8 @@ compile</div>
|
|
|
2812
2811
|
<h4 class="section3">PHP</h4>
|
|
2813
2812
|
<div class="program_caption">
|
|
2814
2813
|
presentation data (ex-mark.pdata)</div>
|
|
2815
|
-
<pre class="program"><ul <
|
|
2816
|
-
<li <
|
|
2814
|
+
<pre class="program"><ul <strong>id="mark:list"</strong>>
|
|
2815
|
+
<li <strong>kw:d="id(item)"</strong>>foo</li>
|
|
2817
2816
|
</ul>
|
|
2818
2817
|
</pre>
|
|
2819
2818
|
<div class="terminal_caption">
|
|
@@ -2829,8 +2828,8 @@ compile</div>
|
|
|
2829
2828
|
<h4 class="section3">JSP</h4>
|
|
2830
2829
|
<div class="program_caption">
|
|
2831
2830
|
presentation data (ex-mark.pdata)</div>
|
|
2832
|
-
<pre class="program"><ul <
|
|
2833
|
-
<li <
|
|
2831
|
+
<pre class="program"><ul <strong>id="mark:list"</strong>>
|
|
2832
|
+
<li <strong>kw:d="id(item)"</strong>>foo</li>
|
|
2834
2833
|
</ul>
|
|
2835
2834
|
</pre>
|
|
2836
2835
|
<div class="terminal_caption">
|
|
@@ -2846,8 +2845,8 @@ compile</div>
|
|
|
2846
2845
|
<h4 class="section3">Perl</h4>
|
|
2847
2846
|
<div class="program_caption">
|
|
2848
2847
|
presentation data (ex-mark.pdata)</div>
|
|
2849
|
-
<pre class="program"><ul <
|
|
2850
|
-
<li <
|
|
2848
|
+
<pre class="program"><ul <strong>id="mark:list"</strong>>
|
|
2849
|
+
<li <strong>kw:d="id(item)"</strong>>foo</li>
|
|
2851
2850
|
</ul>
|
|
2852
2851
|
</pre>
|
|
2853
2852
|
<div class="terminal_caption">
|
|
@@ -2877,8 +2876,8 @@ and available with other directive.
|
|
|
2877
2876
|
<div class="program_caption">
|
|
2878
2877
|
presentation data (ex-attr.pdata)</div>
|
|
2879
2878
|
<pre class="program"><tr class="odd"
|
|
2880
|
-
|
|
2881
|
-
<td
|
|
2879
|
+
kw:d="FOR v in list; <strong>attr: 'class' v_tgl; attr: 'style' style</strong>">
|
|
2880
|
+
<td kw:d="cont v.name">foo</td>
|
|
2882
2881
|
</tr>
|
|
2883
2882
|
</pre>
|
|
2884
2883
|
<div class="terminal_caption">
|
|
@@ -2888,7 +2887,7 @@ compile</div>
|
|
|
2888
2887
|
<% for v in list do %>
|
|
2889
2888
|
<% v_ctr += 1 %>
|
|
2890
2889
|
<% v_tgl = v_ctr%2==0 ? 'even' : 'odd' %>
|
|
2891
|
-
<tr <
|
|
2890
|
+
<tr <strong>class="<%= v_tgl %>"</strong> <strong>style="<%= style %>"></strong>
|
|
2892
2891
|
<td><%= v.name %></td>
|
|
2893
2892
|
</tr>
|
|
2894
2893
|
<% end %>
|
|
@@ -2900,8 +2899,8 @@ compile</div>
|
|
|
2900
2899
|
<div class="program_caption">
|
|
2901
2900
|
presentation data (ex-attr.pdata)</div>
|
|
2902
2901
|
<pre class="program"><tr class="odd"
|
|
2903
|
-
|
|
2904
|
-
<td
|
|
2902
|
+
kw:d="FOREACH($list as $v); <strong>attr('class',$v_tgl); attr('style',$style)</strong>">
|
|
2903
|
+
<td kw:d="cont($v->name)">foo</td>
|
|
2905
2904
|
</tr>
|
|
2906
2905
|
</pre>
|
|
2907
2906
|
<div class="terminal_caption">
|
|
@@ -2911,7 +2910,7 @@ compile</div>
|
|
|
2911
2910
|
<?php foreach ($list as $v) { ?>
|
|
2912
2911
|
<?php $v_ctr++; ?>
|
|
2913
2912
|
<?php $v_tgl = $v_ctr%2==0 ? 'even' : 'odd'; ?>
|
|
2914
|
-
<tr <
|
|
2913
|
+
<tr <strong>class="<?php echo $v_tgl; ?>"</strong> <strong>style="<?php echo $style; ?>"</strong>>
|
|
2915
2914
|
<td><?php echo $v->name; ?></td>
|
|
2916
2915
|
</tr>
|
|
2917
2916
|
<?php } ?>
|
|
@@ -2923,17 +2922,17 @@ compile</div>
|
|
|
2923
2922
|
<div class="program_caption">
|
|
2924
2923
|
presentation data (ex-attr.pdata)</div>
|
|
2925
2924
|
<pre class="program"><tr class="odd"
|
|
2926
|
-
|
|
2927
|
-
<td
|
|
2925
|
+
kw:d="FOR(v: list); <strong>attr('class',v_tgl); attr('style',style)</strong>">
|
|
2926
|
+
<td kw:d="cont(v.name)">foo</td>
|
|
2928
2927
|
</tr>
|
|
2929
2928
|
</pre>
|
|
2930
2929
|
<div class="terminal_caption">
|
|
2931
2930
|
compile</div>
|
|
2932
2931
|
<pre class="terminal">$ kwartz -l jstl ex-attr.pdata
|
|
2933
2932
|
<c:forEach var="v" items="${list}" varStatus="v_status">
|
|
2934
|
-
<c:set var="v_ctr" value="${v_status.count}"
|
|
2935
|
-
<c:set var="v_tgl" value="${v_status.count%2==0 ? 'even' : 'odd'}"
|
|
2936
|
-
<tr <
|
|
2933
|
+
<c:set var="v_ctr" value="${v_status.count}"/>
|
|
2934
|
+
<c:set var="v_tgl" value="${v_status.count%2==0 ? 'even' : 'odd'}"/>
|
|
2935
|
+
<tr <strong>class="${v_tgl}"</strong> <strong>style="${style}"</strong>>
|
|
2937
2936
|
<td>${v.name}</td>
|
|
2938
2937
|
</tr>
|
|
2939
2938
|
</c:forEach>
|
|
@@ -2945,8 +2944,8 @@ compile</div>
|
|
|
2945
2944
|
<div class="program_caption">
|
|
2946
2945
|
presentation data (ex-attr.pdata)</div>
|
|
2947
2946
|
<pre class="program"><tr class="odd"
|
|
2948
|
-
|
|
2949
|
-
<td
|
|
2947
|
+
kw:d="FOREACH($v in @list); <strong>attr('class',$v_tgl); attr('style',$style)</strong>">
|
|
2948
|
+
<td kw:d="cont($v->name)">foo</td>
|
|
2950
2949
|
</tr>
|
|
2951
2950
|
</pre>
|
|
2952
2951
|
<div class="terminal_caption">
|
|
@@ -2956,7 +2955,7 @@ compile</div>
|
|
|
2956
2955
|
<? foreach my $v (@list) { !>
|
|
2957
2956
|
<? $v_ctr++; !>
|
|
2958
2957
|
<? my $v_tgl = $v_ctr%2==0 ? 'even' : 'odd'; !>
|
|
2959
|
-
<tr <
|
|
2958
|
+
<tr <strong>class="<?= $v_tgl !>"</strong> <strong>style="<?= $style !>"</strong>>
|
|
2960
2959
|
<td><?= $v->name !></td>
|
|
2961
2960
|
</tr>
|
|
2962
2961
|
<? } !>
|
|
@@ -2981,12 +2980,12 @@ and available with other directive.
|
|
|
2981
2980
|
<div class="program_caption">
|
|
2982
2981
|
presentation data (ex-append.pdata)</div>
|
|
2983
2982
|
<pre class="program"><input type="checkbox"
|
|
2984
|
-
<
|
|
2983
|
+
<strong>kw:d="append: flag1 ? ' checked=\'checked\'' : ''"</strong>>
|
|
2985
2984
|
</pre>
|
|
2986
2985
|
<div class="terminal_caption">
|
|
2987
2986
|
compile</div>
|
|
2988
2987
|
<pre class="terminal">$ kwartz -l eruby ex-append.pdata
|
|
2989
|
-
<input type="checkbox"<
|
|
2988
|
+
<input type="checkbox"<strong><%= flag1 ? ' checked=\'checked\'' : '' %></strong>>
|
|
2990
2989
|
</pre>
|
|
2991
2990
|
<br>
|
|
2992
2991
|
|
|
@@ -2995,12 +2994,12 @@ compile</div>
|
|
|
2995
2994
|
<div class="program_caption">
|
|
2996
2995
|
presentation data (ex-append.pdata)</div>
|
|
2997
2996
|
<pre class="program"><input type="checkbox"
|
|
2998
|
-
<
|
|
2997
|
+
<strong>kw:d="append($flag1 ? ' checked=\'checked\'' : '')"</strong>>
|
|
2999
2998
|
</pre>
|
|
3000
2999
|
<div class="terminal_caption">
|
|
3001
3000
|
compile</div>
|
|
3002
3001
|
<pre class="terminal">$ kwartz -l php ex-append.pdata
|
|
3003
|
-
<input type="checkbox"<
|
|
3002
|
+
<input type="checkbox"<strong><?php echo $flag1 ? ' checked=\'checked\'' : ''; ?></strong>>
|
|
3004
3003
|
</pre>
|
|
3005
3004
|
<br>
|
|
3006
3005
|
|
|
@@ -3009,12 +3008,12 @@ compile</div>
|
|
|
3009
3008
|
<div class="program_caption">
|
|
3010
3009
|
presentation data (ex-append.pdata)</div>
|
|
3011
3010
|
<pre class="program"><input type="checkbox"
|
|
3012
|
-
<
|
|
3011
|
+
<strong>kw:d="append(flag1 ? ' checked=\'checked\'' : '')"</strong>>
|
|
3013
3012
|
</pre>
|
|
3014
3013
|
<div class="terminal_caption">
|
|
3015
3014
|
compile</div>
|
|
3016
3015
|
<pre class="terminal">$ kwartz -l jstl ex-append.pdata
|
|
3017
|
-
<input type="checkbox"<
|
|
3016
|
+
<input type="checkbox"<strong>${flag1 ? ' checked=\'checked\'' : ''}</strong>>
|
|
3018
3017
|
</pre>
|
|
3019
3018
|
<br>
|
|
3020
3019
|
|
|
@@ -3023,12 +3022,12 @@ compile</div>
|
|
|
3023
3022
|
<div class="program_caption">
|
|
3024
3023
|
presentation data (ex-append.pdata)</div>
|
|
3025
3024
|
<pre class="program"><input type="checkbox"
|
|
3026
|
-
<
|
|
3025
|
+
<strong>kw:d="append($flag1 ? ' checked=\'checked\'' : '')"</strong>>
|
|
3027
3026
|
</pre>
|
|
3028
3027
|
<div class="terminal_caption">
|
|
3029
3028
|
compile</div>
|
|
3030
3029
|
<pre class="terminal">$ kwartz -l eperl ex-append.pdata
|
|
3031
|
-
<input type="checkbox"<
|
|
3030
|
+
<input type="checkbox"<strong><?= $flag1 ? ' checked=\'checked\'' : '' !></strong>>
|
|
3032
3031
|
</pre>
|
|
3033
3032
|
<br>
|
|
3034
3033
|
|
|
@@ -3048,8 +3047,8 @@ It is very useful when preview the HTML design in browser.
|
|
|
3048
3047
|
presentation data (ex-dummy.pdata)</div>
|
|
3049
3048
|
<pre class="program"><ul>
|
|
3050
3049
|
<li>foo</li>
|
|
3051
|
-
<li <
|
|
3052
|
-
<li <
|
|
3050
|
+
<li <strong>id="dummy:d1"</strong>>bar</li>
|
|
3051
|
+
<li <strong>kw:d="dummy:"</strong>>baz</li>
|
|
3053
3052
|
</ul>
|
|
3054
3053
|
</pre>
|
|
3055
3054
|
<div class="terminal_caption">
|
|
@@ -3067,8 +3066,8 @@ compile</div>
|
|
|
3067
3066
|
presentation data (ex-dummy.pdata)</div>
|
|
3068
3067
|
<pre class="program"><ul>
|
|
3069
3068
|
<li>foo</li>
|
|
3070
|
-
<li <
|
|
3071
|
-
<li <
|
|
3069
|
+
<li <strong>id="dummy:d1"</strong>>bar</li>
|
|
3070
|
+
<li <strong>kw:d="dummy()"</strong>>baz</li>
|
|
3072
3071
|
</ul>
|
|
3073
3072
|
</pre>
|
|
3074
3073
|
<div class="terminal_caption">
|
|
@@ -3086,8 +3085,8 @@ compile</div>
|
|
|
3086
3085
|
presentation data (ex-dummy.pdata)</div>
|
|
3087
3086
|
<pre class="program"><ul>
|
|
3088
3087
|
<li>foo</li>
|
|
3089
|
-
<li <
|
|
3090
|
-
<li <
|
|
3088
|
+
<li <strong>id="dummy:d1"</strong>>bar</li>
|
|
3089
|
+
<li <strong>kw:d="dummy()"</strong>>baz</li>
|
|
3091
3090
|
</ul>
|
|
3092
3091
|
</pre>
|
|
3093
3092
|
<div class="terminal_caption">
|
|
@@ -3105,8 +3104,8 @@ compile</div>
|
|
|
3105
3104
|
presentation data (ex-dummy.pdata)</div>
|
|
3106
3105
|
<pre class="program"><ul>
|
|
3107
3106
|
<li>foo</li>
|
|
3108
|
-
<li <
|
|
3109
|
-
<li <
|
|
3107
|
+
<li <strong>id="dummy:d1"</strong>>bar</li>
|
|
3108
|
+
<li <strong>kw:d="dummy()"</strong>>baz</li>
|
|
3110
3109
|
</ul>
|
|
3111
3110
|
</pre>
|
|
3112
3111
|
<div class="terminal_caption">
|
|
@@ -3134,12 +3133,12 @@ or PROPERTY_ESCAPE is true in configuration file.
|
|
|
3134
3133
|
<h4 class="section3">Ruby</h4>
|
|
3135
3134
|
<div class="program_caption">
|
|
3136
3135
|
presentation data (ex-default.pdata)</div>
|
|
3137
|
-
<pre class="program">name: <em <
|
|
3136
|
+
<pre class="program">name: <em <strong>kw:d="default: user"</strong>>Guest</em>
|
|
3138
3137
|
</pre>
|
|
3139
3138
|
<div class="terminal_caption">
|
|
3140
3139
|
compile</div>
|
|
3141
3140
|
<pre class="terminal">$ kwartz -l eruby ex-default.pdata
|
|
3142
|
-
name: <em><
|
|
3141
|
+
name: <em><strong><% if (user) && !(user).to_s.empty? then %><%= user %><% else %>Guest<% end %></strong></em>
|
|
3143
3142
|
</pre>
|
|
3144
3143
|
<br>
|
|
3145
3144
|
|
|
@@ -3147,12 +3146,12 @@ name: <em><b><% if (user) && !(user).to_s.empty? then %><
|
|
|
3147
3146
|
<h4 class="section3">PHP</h4>
|
|
3148
3147
|
<div class="program_caption">
|
|
3149
3148
|
presentation data (ex-default.pdata)</div>
|
|
3150
|
-
<pre class="program">name: <em <
|
|
3149
|
+
<pre class="program">name: <em <strong>kw:d="default($user)"</strong>>Guest</em>
|
|
3151
3150
|
</pre>
|
|
3152
3151
|
<div class="terminal_caption">
|
|
3153
3152
|
compile</div>
|
|
3154
3153
|
<pre class="terminal">$ kwartz -l php ex-default.pdata
|
|
3155
|
-
name: <em><
|
|
3154
|
+
name: <em><strong><?php if ($user) { ?><?php echo $user; ?><?php } else { ?>Guest<?php } ?></strong></em>
|
|
3156
3155
|
</pre>
|
|
3157
3156
|
<br>
|
|
3158
3157
|
|
|
@@ -3160,12 +3159,12 @@ name: <em><b><?php if ($user) { ?><?php echo $user; ?><?php
|
|
|
3160
3159
|
<h4 class="section3">JSP</h4>
|
|
3161
3160
|
<div class="program_caption">
|
|
3162
3161
|
presentation data (ex-default.pdata)</div>
|
|
3163
|
-
<pre class="program">name: <em <
|
|
3162
|
+
<pre class="program">name: <em <strong>kw:d="default(user)"</strong>>Guest</em>
|
|
3164
3163
|
</pre>
|
|
3165
3164
|
<div class="terminal_caption">
|
|
3166
3165
|
compile</div>
|
|
3167
3166
|
<pre class="terminal">$ kwartz -l jstl ex-default.pdata
|
|
3168
|
-
name: <em><
|
|
3167
|
+
name: <em><strong><c:out value="${user}" default="Guest"/></strong></em>
|
|
3169
3168
|
</pre>
|
|
3170
3169
|
<br>
|
|
3171
3170
|
|
|
@@ -3173,12 +3172,12 @@ name: <em><b><c:out value="${user}" default="Guest" /></b></em>
|
|
|
3173
3172
|
<h4 class="section3">Perl</h4>
|
|
3174
3173
|
<div class="program_caption">
|
|
3175
3174
|
presentation data (ex-default.pdata)</div>
|
|
3176
|
-
<pre class="program">name: <em <
|
|
3175
|
+
<pre class="program">name: <em <strong>kw:d="default($user)"</strong>>Guest</em>
|
|
3177
3176
|
</pre>
|
|
3178
3177
|
<div class="terminal_caption">
|
|
3179
3178
|
compile</div>
|
|
3180
3179
|
<pre class="terminal">$ kwartz -l eperl ex-default.pdata
|
|
3181
|
-
name: <em><
|
|
3180
|
+
name: <em><strong><? if ($user) { !><?= $user !><? } else { !>Guest<? } !></strong></em>
|
|
3182
3181
|
</pre>
|
|
3183
3182
|
<br>
|
|
3184
3183
|
|
|
@@ -3197,27 +3196,27 @@ directives replace element or content with other element or content.
|
|
|
3197
3196
|
<h4 class="section3">Ruby, PHP, JSP, Perl</h4>
|
|
3198
3197
|
<div class="program_caption">
|
|
3199
3198
|
presentation data (ex-replace.pdata)</div>
|
|
3200
|
-
<pre class="program"><div <
|
|
3199
|
+
<pre class="program"><div <strong>id="mark:link"</strong>>
|
|
3201
3200
|
back to <a href="/">home</a>.
|
|
3202
3201
|
</div>
|
|
3203
3202
|
|
|
3204
3203
|
<!-- replace element with other element -->
|
|
3205
|
-
<p <
|
|
3204
|
+
<p <strong>id="replace_element_with_element:link"</strong>>
|
|
3206
3205
|
back to home
|
|
3207
3206
|
</p>
|
|
3208
3207
|
|
|
3209
3208
|
<!-- replace element with other content-->
|
|
3210
|
-
<p <
|
|
3209
|
+
<p <strong>id="replace_element_with_content:link"</strong>>
|
|
3211
3210
|
back to home
|
|
3212
3211
|
</p>
|
|
3213
3212
|
|
|
3214
3213
|
<!-- replace content with other element -->
|
|
3215
|
-
<p <
|
|
3214
|
+
<p <strong>id="replace_content_with_element:link"</strong>>
|
|
3216
3215
|
back to home
|
|
3217
3216
|
</p>
|
|
3218
3217
|
|
|
3219
3218
|
<!-- replace content with other content -->
|
|
3220
|
-
<p <
|
|
3219
|
+
<p <strong>id="replace_content_with_content:link"</strong>>
|
|
3221
3220
|
back to home
|
|
3222
3221
|
</p>
|
|
3223
3222
|
</pre>
|
|
@@ -3253,6 +3252,242 @@ compile</div>
|
|
|
3253
3252
|
<br>
|
|
3254
3253
|
|
|
3255
3254
|
|
|
3255
|
+
<a name="directive-replace2"></a>
|
|
3256
|
+
<h3 class="section2">replace_element_with, replace_content_with</h3>
|
|
3257
|
+
<p>'replace_element_with' and 'replace_content_with' directives replace element
|
|
3258
|
+
or content with other element or content.
|
|
3259
|
+
</p>
|
|
3260
|
+
<a name="directive-replace2-eruby"></a>
|
|
3261
|
+
<h4 class="section3">Ruby</h4>
|
|
3262
|
+
<div class="program_caption">
|
|
3263
|
+
presentation data (ex-replace2.pdata)</div>
|
|
3264
|
+
<pre class="program"><div <strong>id="mark:link"</strong>>
|
|
3265
|
+
back to <a href="/">home</a>.
|
|
3266
|
+
</div>
|
|
3267
|
+
|
|
3268
|
+
<!-- replace element with other element -->
|
|
3269
|
+
<p <strong>kw:d="replace_element_with: element(link)"</strong>>
|
|
3270
|
+
back to home
|
|
3271
|
+
</p>
|
|
3272
|
+
|
|
3273
|
+
<!-- replace element with other content-->
|
|
3274
|
+
<p <strong>kw:d="replace_element_with: content(link)"</strong>>
|
|
3275
|
+
back to home
|
|
3276
|
+
</p>
|
|
3277
|
+
|
|
3278
|
+
<!-- replace content with other element -->
|
|
3279
|
+
<p <strong>kw:d="replace_content_with: element(link)"</strong>>
|
|
3280
|
+
back to home
|
|
3281
|
+
</p>
|
|
3282
|
+
|
|
3283
|
+
<!-- replace content with other content -->
|
|
3284
|
+
<p <strong>kw:d="replace_content_with: content(link)"</strong>>
|
|
3285
|
+
back to home
|
|
3286
|
+
</p>
|
|
3287
|
+
</pre>
|
|
3288
|
+
<div class="terminal_caption">
|
|
3289
|
+
compile</div>
|
|
3290
|
+
<pre class="terminal">$ kwartz -l eruby ex-replace2.pdata
|
|
3291
|
+
<div>
|
|
3292
|
+
back to <a href="/">home</a>.
|
|
3293
|
+
</div>
|
|
3294
|
+
|
|
3295
|
+
<!-- replace element with other element -->
|
|
3296
|
+
<div>
|
|
3297
|
+
back to <a href="/">home</a>.
|
|
3298
|
+
</div>
|
|
3299
|
+
|
|
3300
|
+
<!-- replace element with other content-->
|
|
3301
|
+
back to <a href="/">home</a>.
|
|
3302
|
+
|
|
3303
|
+
<!-- replace content with other element -->
|
|
3304
|
+
<p>
|
|
3305
|
+
<div>
|
|
3306
|
+
back to <a href="/">home</a>.
|
|
3307
|
+
</div>
|
|
3308
|
+
</p>
|
|
3309
|
+
|
|
3310
|
+
<!-- replace content with other content -->
|
|
3311
|
+
<p>
|
|
3312
|
+
back to <a href="/">home</a>.
|
|
3313
|
+
</p>
|
|
3314
|
+
</pre>
|
|
3315
|
+
<br>
|
|
3316
|
+
|
|
3317
|
+
<a name="directive-replace2-php"></a>
|
|
3318
|
+
<h4 class="section3">PHP</h4>
|
|
3319
|
+
<div class="program_caption">
|
|
3320
|
+
presentation data (ex-replace2.pdata)</div>
|
|
3321
|
+
<pre class="program"><div kw:d="id(link)">
|
|
3322
|
+
back to <a href="/">home</a>.
|
|
3323
|
+
</div>
|
|
3324
|
+
|
|
3325
|
+
<!-- replace element with other element -->
|
|
3326
|
+
<p kw:d="replace_element_with(element(link))">
|
|
3327
|
+
back to home
|
|
3328
|
+
</p>
|
|
3329
|
+
|
|
3330
|
+
<!-- replace element with other content-->
|
|
3331
|
+
<p kw:d="replace_element_with(content(link))">
|
|
3332
|
+
back to home
|
|
3333
|
+
</p>
|
|
3334
|
+
|
|
3335
|
+
<!-- replace content with other element -->
|
|
3336
|
+
<p kw:d="replace_content_with(element(link))">
|
|
3337
|
+
back to home
|
|
3338
|
+
</p>
|
|
3339
|
+
|
|
3340
|
+
<!-- replace content with other content -->
|
|
3341
|
+
<p kw:d="replace_content_with(content(link))">
|
|
3342
|
+
back to home
|
|
3343
|
+
</p>
|
|
3344
|
+
</pre>
|
|
3345
|
+
<div class="terminal_caption">
|
|
3346
|
+
compile</div>
|
|
3347
|
+
<pre class="terminal">$ kwartz -l php ex-replace2.pdata
|
|
3348
|
+
<div>
|
|
3349
|
+
back to <a href="/">home</a>.
|
|
3350
|
+
</div>
|
|
3351
|
+
|
|
3352
|
+
<!-- replace element with other element -->
|
|
3353
|
+
<div>
|
|
3354
|
+
back to <a href="/">home</a>.
|
|
3355
|
+
</div>
|
|
3356
|
+
|
|
3357
|
+
<!-- replace element with other content-->
|
|
3358
|
+
back to <a href="/">home</a>.
|
|
3359
|
+
|
|
3360
|
+
<!-- replace content with other element -->
|
|
3361
|
+
<p>
|
|
3362
|
+
<div>
|
|
3363
|
+
back to <a href="/">home</a>.
|
|
3364
|
+
</div>
|
|
3365
|
+
</p>
|
|
3366
|
+
|
|
3367
|
+
<!-- replace content with other content -->
|
|
3368
|
+
<p>
|
|
3369
|
+
back to <a href="/">home</a>.
|
|
3370
|
+
</p>
|
|
3371
|
+
</pre>
|
|
3372
|
+
<br>
|
|
3373
|
+
|
|
3374
|
+
<a name="directive-replace2-jstl"></a>
|
|
3375
|
+
<h4 class="section3">JSP</h4>
|
|
3376
|
+
<div class="program_caption">
|
|
3377
|
+
presentation data (ex-replace2.pdata)</div>
|
|
3378
|
+
<pre class="program"><div kw:d="id(link)">
|
|
3379
|
+
back to <a href="/">home</a>.
|
|
3380
|
+
</div>
|
|
3381
|
+
|
|
3382
|
+
<!-- replace element with other element -->
|
|
3383
|
+
<p kw:d="replace_element_with(element(link))">
|
|
3384
|
+
back to home
|
|
3385
|
+
</p>
|
|
3386
|
+
|
|
3387
|
+
<!-- replace element with other content-->
|
|
3388
|
+
<p kw:d="replace_element_with(content(link))">
|
|
3389
|
+
back to home
|
|
3390
|
+
</p>
|
|
3391
|
+
|
|
3392
|
+
<!-- replace content with other element -->
|
|
3393
|
+
<p kw:d="replace_content_with(element(link))">
|
|
3394
|
+
back to home
|
|
3395
|
+
</p>
|
|
3396
|
+
|
|
3397
|
+
<!-- replace content with other content -->
|
|
3398
|
+
<p kw:d="replace_content_with(content(link))">
|
|
3399
|
+
back to home
|
|
3400
|
+
</p>
|
|
3401
|
+
</pre>
|
|
3402
|
+
<div class="terminal_caption">
|
|
3403
|
+
compile</div>
|
|
3404
|
+
<pre class="terminal">$ kwartz -l jstl ex-replace2.pdata
|
|
3405
|
+
<div>
|
|
3406
|
+
back to <a href="/">home</a>.
|
|
3407
|
+
</div>
|
|
3408
|
+
|
|
3409
|
+
<!-- replace element with other element -->
|
|
3410
|
+
<div>
|
|
3411
|
+
back to <a href="/">home</a>.
|
|
3412
|
+
</div>
|
|
3413
|
+
|
|
3414
|
+
<!-- replace element with other content-->
|
|
3415
|
+
back to <a href="/">home</a>.
|
|
3416
|
+
|
|
3417
|
+
<!-- replace content with other element -->
|
|
3418
|
+
<p>
|
|
3419
|
+
<div>
|
|
3420
|
+
back to <a href="/">home</a>.
|
|
3421
|
+
</div>
|
|
3422
|
+
</p>
|
|
3423
|
+
|
|
3424
|
+
<!-- replace content with other content -->
|
|
3425
|
+
<p>
|
|
3426
|
+
back to <a href="/">home</a>.
|
|
3427
|
+
</p>
|
|
3428
|
+
</pre>
|
|
3429
|
+
<br>
|
|
3430
|
+
|
|
3431
|
+
<a name="directive-replace2-eperl"></a>
|
|
3432
|
+
<h4 class="section3">Perl</h4>
|
|
3433
|
+
<div class="program_caption">
|
|
3434
|
+
presentation data (ex-replace2.pdata)</div>
|
|
3435
|
+
<pre class="program"><div kw:d="id(link)">
|
|
3436
|
+
back to <a href="/">home</a>.
|
|
3437
|
+
</div>
|
|
3438
|
+
|
|
3439
|
+
<!-- replace element with other element -->
|
|
3440
|
+
<p kw:d="replace_element_with(element(link))">
|
|
3441
|
+
back to home
|
|
3442
|
+
</p>
|
|
3443
|
+
|
|
3444
|
+
<!-- replace element with other content-->
|
|
3445
|
+
<p kw:d="replace_element_with(content(link))">
|
|
3446
|
+
back to home
|
|
3447
|
+
</p>
|
|
3448
|
+
|
|
3449
|
+
<!-- replace content with other element -->
|
|
3450
|
+
<p kw:d="replace_content_with(element(link))">
|
|
3451
|
+
back to home
|
|
3452
|
+
</p>
|
|
3453
|
+
|
|
3454
|
+
<!-- replace content with other content -->
|
|
3455
|
+
<p kw:d="replace_content_with(content(link))">
|
|
3456
|
+
back to home
|
|
3457
|
+
</p>
|
|
3458
|
+
</pre>
|
|
3459
|
+
<div class="terminal_caption">
|
|
3460
|
+
compile</div>
|
|
3461
|
+
<pre class="terminal">$ kwartz -l eperl ex-replace2.pdata
|
|
3462
|
+
<div>
|
|
3463
|
+
back to <a href="/">home</a>.
|
|
3464
|
+
</div>
|
|
3465
|
+
|
|
3466
|
+
<!-- replace element with other element -->
|
|
3467
|
+
<div>
|
|
3468
|
+
back to <a href="/">home</a>.
|
|
3469
|
+
</div>
|
|
3470
|
+
|
|
3471
|
+
<!-- replace element with other content-->
|
|
3472
|
+
back to <a href="/">home</a>.
|
|
3473
|
+
|
|
3474
|
+
<!-- replace content with other element -->
|
|
3475
|
+
<p>
|
|
3476
|
+
<div>
|
|
3477
|
+
back to <a href="/">home</a>.
|
|
3478
|
+
</div>
|
|
3479
|
+
</p>
|
|
3480
|
+
|
|
3481
|
+
<!-- replace content with other content -->
|
|
3482
|
+
<p>
|
|
3483
|
+
back to <a href="/">home</a>.
|
|
3484
|
+
</p>
|
|
3485
|
+
</pre>
|
|
3486
|
+
<br>
|
|
3487
|
+
|
|
3488
|
+
<br>
|
|
3489
|
+
|
|
3490
|
+
|
|
3256
3491
|
<br>
|
|
3257
3492
|
|
|
3258
3493
|
|