kwartz 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/test/test-directives.rb
CHANGED
data/test/test-directives.yaml
CHANGED
@@ -1,790 +1,785 @@
|
|
1
|
-
|
1
|
+
###
|
2
2
|
- name: elem
|
3
3
|
subject: elem, Elem, ELEM
|
4
4
|
desc: |
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
'elem', 'Elem', and 'ELEM' directive replaces element by expression.
|
6
|
+
|
7
|
+
'Elem' directive escapes expression automatically, while 'ELEM' never escape it.
|
8
|
+
'elem' directive escapes expression when command-line option '-e' is specified
|
9
|
+
or PROPERTY_ESCAPE is true in configuration file.
|
10
10
|
|
11
11
|
pdata*:
|
12
12
|
eruby: |
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
<b {{*kw:d="elem: expr"*}}>foo</b>
|
14
|
+
<b {{*kw:d="Elem: expr"*}}>foo</b>
|
15
|
+
<b {{*kw:d="ELEM: expr"*}}>foo</b>
|
16
16
|
|
17
17
|
php: |
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
<b {{*kw:d="elem($expr)"*}}>foo</b>
|
19
|
+
<b {{*kw:d="Elem($expr)"*}}>foo</b>
|
20
|
+
<b {{*kw:d="ELEM($expr)"*}}>foo</b>
|
21
21
|
|
22
22
|
eperl: |
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
<b {{*kw:d="elem($expr)"*}}>foo</b>
|
24
|
+
<b {{*kw:d="Elem($expr)"*}}>foo</b>
|
25
|
+
<b {{*kw:d="ELEM($expr)"*}}>foo</b>
|
26
26
|
|
27
27
|
jstl: |
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
<b {{*kw:d="elem(expr)"*}}>foo</b>
|
29
|
+
<b {{*kw:d="Elem(expr)"*}}>foo</b>
|
30
|
+
<b {{*kw:d="ELEM(expr)"*}}>foo</b>
|
31
31
|
|
32
32
|
expected*:
|
33
33
|
eruby: |
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
{{*<%= expr %>*}}
|
35
|
+
{{*<%=h expr %>*}}
|
36
|
+
{{*<%= expr %>*}}
|
37
37
|
|
38
38
|
php: |
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
{{*<?php echo $expr; ?>*}}
|
40
|
+
{{*<?php echo htmlspecialchars($expr); ?>*}}
|
41
|
+
{{*<?php echo $expr; ?>*}}
|
42
42
|
|
43
43
|
eperl: |
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
{{*<?= $expr !>*}}
|
45
|
+
{{*<?= encode_entities($expr) !>*}}
|
46
|
+
{{*<?= $expr !>*}}
|
47
47
|
|
48
48
|
jstl: |
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
{{*${expr}*}}
|
50
|
+
{{*${expr}*}}
|
51
|
+
{{*<c:out value="${expr}" escapeXml="false"/>*}}
|
52
52
|
|
53
|
+
###
|
53
54
|
- name: stag
|
54
55
|
subject: stag, Stag, STAG
|
55
56
|
desc: |
|
56
|
-
|
57
|
+
'stag', 'Stag', and 'STAG' directive replaces start-tag by expression.
|
57
58
|
|
58
|
-
|
59
|
-
|
60
|
-
|
59
|
+
'Stag' directive escapes expression automatically, while 'STAG' never escape it.
|
60
|
+
'stag' directive escapes expression when command-line option '-e' is specified
|
61
|
+
or PROPERTY_ESCAPE is true in configuration file.
|
61
62
|
|
62
63
|
pdata*:
|
63
64
|
eruby: |
|
64
|
-
|
65
|
-
|
66
|
-
|
65
|
+
<b {{*kw:d="stag: expr"*}}>foo</b>
|
66
|
+
<b {{*kw:d="Stag: expr"*}}>foo</b>
|
67
|
+
<b {{*kw:d="STAG: expr"*}}>foo</b>
|
67
68
|
|
68
69
|
php: |
|
69
|
-
|
70
|
-
|
71
|
-
|
70
|
+
<b {{*kw:d="stag($expr)"*}}>foo</b>
|
71
|
+
<b {{*kw:d="Stag($expr)"*}}>foo</b>
|
72
|
+
<b {{*kw:d="STAG($expr)"*}}>foo</b>
|
72
73
|
|
73
74
|
eperl: |
|
74
|
-
|
75
|
-
|
76
|
-
|
75
|
+
<b {{*kw:d="stag($expr)"*}}>foo</b>
|
76
|
+
<b {{*kw:d="Stag($expr)"*}}>foo</b>
|
77
|
+
<b {{*kw:d="STAG($expr)"*}}>foo</b>
|
77
78
|
|
78
79
|
jstl: |
|
79
|
-
|
80
|
-
|
81
|
-
|
80
|
+
<b {{*kw:d="stag(expr)"*}}>foo</b>
|
81
|
+
<b {{*kw:d="Stag(expr)"*}}>foo</b>
|
82
|
+
<b {{*kw:d="STAG(expr)"*}}>foo</b>
|
82
83
|
|
83
84
|
expected*:
|
84
85
|
eruby: |
|
85
|
-
|
86
|
-
|
87
|
-
|
86
|
+
{{*<%= expr %>*}}foo</b>
|
87
|
+
{{*<%=h expr %>*}}foo</b>
|
88
|
+
{{*<%= expr %>*}}foo</b>
|
88
89
|
|
89
90
|
php: |
|
90
|
-
|
91
|
-
|
92
|
-
|
91
|
+
{{*<?php echo $expr; ?>*}}foo</b>
|
92
|
+
{{*<?php echo htmlspecialchars($expr); ?>*}}foo</b>
|
93
|
+
{{*<?php echo $expr; ?>*}}foo</b>
|
93
94
|
|
94
95
|
eperl: |
|
95
|
-
|
96
|
-
|
97
|
-
|
96
|
+
{{*<?= $expr !>*}}foo</b>
|
97
|
+
{{*<?= encode_entities($expr) !>*}}foo</b>
|
98
|
+
{{*<?= $expr !>*}}foo</b>
|
98
99
|
|
99
100
|
jstl: |
|
100
|
-
|
101
|
-
|
102
|
-
|
101
|
+
{{*${expr}*}}foo</b>
|
102
|
+
{{*${expr}*}}foo</b>
|
103
|
+
{{*<c:out value="${expr}" escapeXml="false"/>*}}foo</b>
|
103
104
|
|
104
105
|
- name: etag
|
105
106
|
subject: etag, Etag, ETAG
|
106
107
|
desc: |
|
107
|
-
|
108
|
+
'etag', 'Etag', and 'ETAG' directive replaces start-tag by expression.
|
108
109
|
|
109
|
-
|
110
|
-
|
111
|
-
|
110
|
+
'Etag' directive escapes expression automatically, while 'ETAG' never escape it.
|
111
|
+
'etag' directive escapes expression when command-line option '-e' is specified
|
112
|
+
or PROPERTY_ESCAPE is true in configuration file.
|
112
113
|
|
113
114
|
pdata*:
|
114
115
|
eruby: |
|
115
|
-
|
116
|
-
|
117
|
-
|
116
|
+
<b {{*kw:d="etag: expr"*}}>foo</b>
|
117
|
+
<b {{*kw:d="Etag: expr"*}}>foo</b>
|
118
|
+
<b {{*kw:d="ETAG: expr"*}}>foo</b>
|
118
119
|
|
119
120
|
php: |
|
120
|
-
|
121
|
-
|
122
|
-
|
121
|
+
<b {{*kw:d="etag($expr)"*}}>foo</b>
|
122
|
+
<b {{*kw:d="Etag($expr)"*}}>foo</b>
|
123
|
+
<b {{*kw:d="ETAG($expr)"*}}>foo</b>
|
123
124
|
|
124
125
|
eperl: |
|
125
|
-
|
126
|
-
|
127
|
-
|
126
|
+
<b {{*kw:d="etag($expr)"*}}>foo</b>
|
127
|
+
<b {{*kw:d="Etag($expr)"*}}>foo</b>
|
128
|
+
<b {{*kw:d="ETAG($expr)"*}}>foo</b>
|
128
129
|
|
129
130
|
jstl: |
|
130
|
-
|
131
|
-
|
132
|
-
|
131
|
+
<b {{*kw:d="etag(expr)"*}}>foo</b>
|
132
|
+
<b {{*kw:d="Etag(expr)"*}}>foo</b>
|
133
|
+
<b {{*kw:d="ETAG(expr)"*}}>foo</b>
|
133
134
|
|
134
135
|
expected*:
|
135
136
|
eruby: |
|
136
|
-
|
137
|
-
|
138
|
-
|
137
|
+
<b>foo{{*<%= expr %>*}}
|
138
|
+
<b>foo{{*<%=h expr %>*}}
|
139
|
+
<b>foo{{*<%= expr %>*}}
|
139
140
|
|
140
141
|
php: |
|
141
|
-
|
142
|
-
|
143
|
-
|
142
|
+
<b>foo{{*<?php echo $expr; ?>*}}
|
143
|
+
<b>foo{{*<?php echo htmlspecialchars($expr); ?>*}}
|
144
|
+
<b>foo{{*<?php echo $expr; ?>*}}
|
144
145
|
|
145
146
|
eperl: |
|
146
|
-
|
147
|
-
|
148
|
-
|
147
|
+
<b>foo{{*<?= $expr !>*}}
|
148
|
+
<b>foo{{*<?= encode_entities($expr) !>*}}
|
149
|
+
<b>foo{{*<?= $expr !>*}}
|
149
150
|
|
150
151
|
jstl: |
|
151
|
-
|
152
|
-
|
153
|
-
|
152
|
+
<b>foo{{*${expr}*}}
|
153
|
+
<b>foo{{*${expr}*}}
|
154
|
+
<b>foo{{*<c:out value="${expr}" escapeXml="false"/>*}}
|
154
155
|
|
155
|
-
|
156
|
+
###
|
156
157
|
- name: cont
|
157
158
|
subject: cont, Cont, CONT
|
158
159
|
desc: |
|
159
|
-
|
160
|
+
'cont', 'Cont', and 'CONT' directives replace content by expression.
|
160
161
|
|
161
|
-
|
162
|
-
|
163
|
-
|
162
|
+
'Cont' directive escapes expression automatically, while 'CONT' never escape it.
|
163
|
+
'cont' directive escapes expression when command-line option '-e' is specified
|
164
|
+
or PROPERTY_ESCAPE is true in configuration file.
|
164
165
|
|
165
166
|
pdata*:
|
166
167
|
eruby: |
|
167
|
-
|
168
|
-
|
169
|
-
|
168
|
+
<b {{*kw:d="cont: expr"*}}>foo</b>
|
169
|
+
<b {{*kw:d="Cont: expr"*}}>foo</b>
|
170
|
+
<b {{*kw:d="CONT: expr"*}}>foo</b>
|
170
171
|
|
171
172
|
php: |
|
172
|
-
|
173
|
-
|
174
|
-
|
173
|
+
<b {{*kw:d="cont($expr)"*}}>foo</b>
|
174
|
+
<b {{*kw:d="Cont($expr)"*}}>foo</b>
|
175
|
+
<b {{*kw:d="CONT($expr)"*}}>foo</b>
|
175
176
|
|
176
177
|
eperl: |
|
177
|
-
|
178
|
-
|
179
|
-
|
178
|
+
<b {{*kw:d="cont($expr)"*}}>foo</b>
|
179
|
+
<b {{*kw:d="Cont($expr)"*}}>foo</b>
|
180
|
+
<b {{*kw:d="CONT($expr)"*}}>foo</b>
|
180
181
|
|
181
182
|
jstl: |
|
182
|
-
|
183
|
-
|
184
|
-
|
183
|
+
<b {{*kw:d="cont(expr)"*}}>foo</b>
|
184
|
+
<b {{*kw:d="Cont(expr)"*}}>foo</b>
|
185
|
+
<b {{*kw:d="CONT(expr)"*}}>foo</b>
|
185
186
|
|
186
187
|
expected*:
|
187
188
|
eruby: |
|
188
|
-
|
189
|
-
|
190
|
-
|
189
|
+
<b>{{*<%= expr %>*}}</b>
|
190
|
+
<b>{{*<%=h expr %>*}}</b>
|
191
|
+
<b>{{*<%= expr %>*}}</b>
|
191
192
|
|
192
193
|
php: |
|
193
|
-
|
194
|
-
|
195
|
-
|
194
|
+
<b>{{*<?php echo $expr; ?>*}}</b>
|
195
|
+
<b>{{*<?php echo htmlspecialchars($expr); ?>*}}</b>
|
196
|
+
<b>{{*<?php echo $expr; ?>*}}</b>
|
196
197
|
|
197
198
|
eperl: |
|
198
|
-
|
199
|
-
|
200
|
-
|
199
|
+
<b>{{*<?= $expr !>*}}</b>
|
200
|
+
<b>{{*<?= encode_entities($expr) !>*}}</b>
|
201
|
+
<b>{{*<?= $expr !>*}}</b>
|
201
202
|
|
202
203
|
jstl: |
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
204
|
+
<b>{{*${expr}*}}</b>
|
205
|
+
<b>{{*${expr}*}}</b>
|
206
|
+
<b>{{*<c:out value="${expr}" escapeXml="false"/>*}}</b>
|
207
207
|
|
208
|
-
|
208
|
+
###
|
209
209
|
- name: value
|
210
210
|
subject: value, Value, VALUE
|
211
211
|
desc: |
|
212
|
-
|
213
|
-
|
212
|
+
'value', 'Value', and 'VALUE' directives are equivalent to
|
213
|
+
'cont', 'Cont', and 'CONT' directives respectively.
|
214
214
|
|
215
215
|
pdata*:
|
216
216
|
eruby: |
|
217
|
-
|
218
|
-
|
219
|
-
|
217
|
+
<b {{*kw:d="value: expr"*}}>foo</b>
|
218
|
+
<b {{*kw:d="Value: expr"*}}>foo</b>
|
219
|
+
<b {{*kw:d="VALUE: expr"*}}>foo</b>
|
220
220
|
|
221
221
|
php: |
|
222
|
-
|
223
|
-
|
224
|
-
|
222
|
+
<b {{*kw:d="value($expr)"*}}>foo</b>
|
223
|
+
<b {{*kw:d="Value($expr)"*}}>foo</b>
|
224
|
+
<b {{*kw:d="VALUE($expr)"*}}>foo</b>
|
225
225
|
|
226
226
|
eperl: |
|
227
|
-
|
228
|
-
|
229
|
-
|
227
|
+
<b {{*kw:d="value($expr)"*}}>foo</b>
|
228
|
+
<b {{*kw:d="Value($expr)"*}}>foo</b>
|
229
|
+
<b {{*kw:d="VALUE($expr)"*}}>foo</b>
|
230
230
|
|
231
231
|
jstl: |
|
232
|
-
|
233
|
-
|
234
|
-
|
232
|
+
<b {{*kw:d="value(expr)"*}}>foo</b>
|
233
|
+
<b {{*kw:d="Value(expr)"*}}>foo</b>
|
234
|
+
<b {{*kw:d="VALUE(expr)"*}}>foo</b>
|
235
235
|
|
236
236
|
expected*:
|
237
237
|
eruby: |
|
238
|
-
|
239
|
-
|
240
|
-
|
238
|
+
<b>{{*<%= expr %>*}}</b>
|
239
|
+
<b>{{*<%=h expr %>*}}</b>
|
240
|
+
<b>{{*<%= expr %>*}}</b>
|
241
241
|
|
242
242
|
php: |
|
243
|
-
|
244
|
-
|
245
|
-
|
243
|
+
<b>{{*<?php echo $expr; ?>*}}</b>
|
244
|
+
<b>{{*<?php echo htmlspecialchars($expr); ?>*}}</b>
|
245
|
+
<b>{{*<?php echo $expr; ?>*}}</b>
|
246
246
|
|
247
247
|
eperl: |
|
248
|
-
|
249
|
-
|
250
|
-
|
248
|
+
<b>{{*<?= $expr !>*}}</b>
|
249
|
+
<b>{{*<?= encode_entities($expr) !>*}}</b>
|
250
|
+
<b>{{*<?= $expr !>*}}</b>
|
251
251
|
|
252
252
|
jstl: |
|
253
|
-
|
254
|
-
|
255
|
-
|
253
|
+
<b>{{*${expr}*}}</b>
|
254
|
+
<b>{{*${expr}*}}</b>
|
255
|
+
<b>{{*<c:out value="${expr}" escapeXml="false"/>*}}</b>
|
256
256
|
|
257
|
-
|
258
|
-
##
|
257
|
+
###
|
259
258
|
- name: foreach
|
260
259
|
subject: foreach
|
261
260
|
desc: |
|
262
|
-
|
261
|
+
'foreach' directive interates element, while 'loop' directive iterates content.
|
263
262
|
|
264
263
|
pdata*:
|
265
264
|
eruby: |
|
266
|
-
|
267
|
-
|
268
|
-
|
265
|
+
<tr {{*kw:d="for item in list"*}}>
|
266
|
+
<td kw:d="cont item">foo</td>
|
267
|
+
</tr>
|
269
268
|
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
269
|
+
<tr {{*kw:d="for key,value in hash"*}}>
|
270
|
+
<td kw:d="cont key">key</td>
|
271
|
+
<td kw:d="cont value">value</td>
|
272
|
+
</tr>
|
274
273
|
|
275
274
|
php: |
|
276
|
-
|
277
|
-
|
278
|
-
|
275
|
+
<tr {{*kw:d="foreach($list as $item)"*}}>
|
276
|
+
<td kw:d="cont($item)">foo</td>
|
277
|
+
</tr>
|
279
278
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
279
|
+
<tr {{*kw:d="foreach($hash as $key=>$value)"*}}>
|
280
|
+
<td kw:d="cont($key)">key</td>
|
281
|
+
<td kw:d="cont($value)">value</td>
|
282
|
+
</tr>
|
284
283
|
|
285
284
|
eperl: |
|
286
|
-
|
287
|
-
|
288
|
-
|
285
|
+
<tr {{*kw:d="foreach($item in @list)"*}}>
|
286
|
+
<td kw:d="cont($item)">foo</td>
|
287
|
+
</tr>
|
289
288
|
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
289
|
+
<tr {{*kw:d="foreach($key,$value in %hash)"*}}>
|
290
|
+
<td kw:d="cont($key)">key</td>
|
291
|
+
<td kw:d="cont($value)">value</td>
|
292
|
+
</tr>
|
294
293
|
|
295
294
|
jstl: |
|
296
|
-
|
297
|
-
|
298
|
-
|
295
|
+
<tr {{*kw:d="for(item: list)"*}}>
|
296
|
+
<td kw:d="cont(item)">foo</td>
|
297
|
+
</tr>
|
299
298
|
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
299
|
+
<tr {{*kw:d="forEach('var'=>'v', 'items'=>'${params.list}', 'varStatus'=>'status')"*}}>
|
300
|
+
<td kw:d="cont(status.index)">1</td>
|
301
|
+
<td kw:d="cont(v)"></td>
|
302
|
+
</tr>
|
304
303
|
|
305
|
-
|
306
|
-
|
307
|
-
|
304
|
+
<tr {{*kw:d="forEach('var'=>'n', 'begin'=>1, 'end'=>10, 'step'=>2)"*}}>
|
305
|
+
<td kw:d="cont(n)">key</td>
|
306
|
+
</tr>
|
308
307
|
|
309
308
|
expected*:
|
310
309
|
eruby: |
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
310
|
+
{{*<% for item in list do %>*}}
|
311
|
+
<tr>
|
312
|
+
<td><%= item %></td>
|
313
|
+
</tr>
|
314
|
+
{{*<% end %>*}}
|
315
|
+
|
316
|
+
{{*<% hash.each do |key, value| %>*}}
|
317
|
+
<tr>
|
318
|
+
<td><%= key %></td>
|
319
|
+
<td><%= value %></td>
|
320
|
+
</tr>
|
321
|
+
{{*<% end %>*}}
|
323
322
|
|
324
323
|
php: |
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
324
|
+
{{*<?php foreach ($list as $item) { ?>*}}
|
325
|
+
<tr>
|
326
|
+
<td><?php echo $item; ?></td>
|
327
|
+
</tr>
|
328
|
+
{{*<?php } ?>*}}
|
329
|
+
|
330
|
+
{{*<?php foreach ($hash as $key=>$value) { ?>*}}
|
331
|
+
<tr>
|
332
|
+
<td><?php echo $key; ?></td>
|
333
|
+
<td><?php echo $value; ?></td>
|
334
|
+
</tr>
|
335
|
+
{{*<?php } ?>*}}
|
337
336
|
|
338
337
|
eperl: |
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
338
|
+
{{*<? foreach my $item (@list) { !>*}}
|
339
|
+
<tr>
|
340
|
+
<td><?= $item !></td>
|
341
|
+
</tr>
|
342
|
+
{{*<? } !>*}}
|
343
|
+
|
344
|
+
{{*<? foreach my $key (keys %hash) { !>*}}
|
345
|
+
{{*<? my $value = $hash{$key}; !>*}}
|
346
|
+
<tr>
|
347
|
+
<td><?= $key !></td>
|
348
|
+
<td><?= $value !></td>
|
349
|
+
</tr>
|
350
|
+
{{*<? } !>*}}
|
352
351
|
|
353
352
|
jstl: |
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
353
|
+
{{*<c:forEach var="item" items="${list}">*}}
|
354
|
+
<tr>
|
355
|
+
<td>${item}</td>
|
356
|
+
</tr>
|
357
|
+
{{*</c:forEach>*}}
|
358
|
+
|
359
|
+
{{*<c:forEach var="v" items="${params.list}" varStatus="status">*}}
|
360
|
+
<tr>
|
361
|
+
<td>${status.index}</td>
|
362
|
+
<td>${v}</td>
|
363
|
+
</tr>
|
364
|
+
{{*</c:forEach>*}}
|
365
|
+
|
366
|
+
{{*<c:forEach var="n" begin="1" end="10" step="2">*}}
|
367
|
+
<tr>
|
368
|
+
<td>${n}</td>
|
369
|
+
</tr>
|
370
|
+
{{*</c:forEach>*}}
|
371
|
+
|
372
|
+
###
|
375
373
|
- name: list
|
376
374
|
subject: list
|
377
375
|
desc: |
|
378
|
-
|
376
|
+
'list' directive interates content, while 'foreach' directive iterates element.
|
379
377
|
|
380
378
|
pdata*:
|
381
379
|
eruby: |
|
382
|
-
|
383
|
-
|
384
|
-
|
380
|
+
<tr {{*kw:d="list item in list"*}}>
|
381
|
+
<td kw:d="cont item">foo</td>
|
382
|
+
</tr>
|
385
383
|
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
384
|
+
<tr {{*kw:d="list key,value in hash"*}}>
|
385
|
+
<td kw:d="cont key">key</td>
|
386
|
+
<td kw:d="cont value">value</td>
|
387
|
+
</tr>
|
390
388
|
|
391
389
|
php: |
|
392
|
-
|
393
|
-
|
394
|
-
|
390
|
+
<tr {{*kw:d="list($list as $item)"*}}>
|
391
|
+
<td kw:d="cont($item)">foo</td>
|
392
|
+
</tr>
|
395
393
|
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
394
|
+
<tr {{*kw:d="list($hash as $key=>$value)"*}}>
|
395
|
+
<td kw:d="cont($key)">key</td>
|
396
|
+
<td kw:d="cont($value)">value</td>
|
397
|
+
</tr>
|
400
398
|
|
401
399
|
eperl: |
|
402
|
-
|
403
|
-
|
404
|
-
|
400
|
+
<tr {{*kw:d="list($item in @list)"*}}>
|
401
|
+
<td kw:d="cont($item)">foo</td>
|
402
|
+
</tr>
|
405
403
|
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
404
|
+
<tr {{*kw:d="list($key,$value in %hash)"*}}>
|
405
|
+
<td kw:d="cont($key)">key</td>
|
406
|
+
<td kw:d="cont($value)">value</td>
|
407
|
+
</tr>
|
410
408
|
|
411
409
|
jstl: |
|
412
|
-
|
413
|
-
|
414
|
-
|
410
|
+
<tr {{*kw:d="list(item: list)"*}}>
|
411
|
+
<td kw:d="cont(item)">foo</td>
|
412
|
+
</tr>
|
415
413
|
|
416
414
|
expected*:
|
417
415
|
eruby: |
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
416
|
+
<tr>
|
417
|
+
{{*<% for item in list do %>*}}
|
418
|
+
<td><%= item %></td>
|
419
|
+
{{*<% end %>*}}
|
420
|
+
</tr>
|
421
|
+
|
422
|
+
<tr>
|
423
|
+
{{*<% hash.each do |key, value| %>*}}
|
424
|
+
<td><%= key %></td>
|
425
|
+
<td><%= value %></td>
|
426
|
+
{{*<% end %>*}}
|
427
|
+
</tr>
|
430
428
|
|
431
429
|
php: |
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
430
|
+
<tr>
|
431
|
+
{{*<?php foreach ($list as $item) { ?>*}}
|
432
|
+
<td><?php echo $item; ?></td>
|
433
|
+
{{*<?php } ?>*}}
|
434
|
+
</tr>
|
435
|
+
|
436
|
+
<tr>
|
437
|
+
{{*<?php foreach ($hash as $key=>$value) { ?>*}}
|
438
|
+
<td><?php echo $key; ?></td>
|
439
|
+
<td><?php echo $value; ?></td>
|
440
|
+
{{*<?php } ?>*}}
|
441
|
+
</tr>
|
444
442
|
|
445
443
|
eperl: |
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
444
|
+
<tr>
|
445
|
+
{{*<? foreach my $item (@list) { !>*}}
|
446
|
+
<td><?= $item !></td>
|
447
|
+
{{*<? } !>*}}
|
448
|
+
</tr>
|
449
|
+
|
450
|
+
<tr>
|
451
|
+
{{*<? foreach my $key (keys %hash) { !>*}}
|
452
|
+
{{*<? my $value = $hash{$key}; !>*}}
|
453
|
+
<td><?= $key !></td>
|
454
|
+
<td><?= $value !></td>
|
455
|
+
{{*<? } !>*}}
|
456
|
+
</tr>
|
459
457
|
|
460
458
|
jstl: |
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
459
|
+
<tr>
|
460
|
+
{{*<c:forEach var="item" items="${list}">*}}
|
461
|
+
<td>${item}</td>
|
462
|
+
{{*</c:forEach>*}}
|
463
|
+
</tr>
|
468
464
|
|
465
|
+
###
|
469
466
|
- name: foreach_ctr
|
470
467
|
subject: Foreach, List
|
471
468
|
desc: |
|
472
|
-
|
473
|
-
|
469
|
+
'Foreach' and 'List' directives iterate element or content with loop counter
|
470
|
+
(starting with 1).
|
474
471
|
|
475
472
|
pdata*:
|
476
473
|
eruby: |
|
477
|
-
|
478
|
-
|
479
|
-
|
474
|
+
<tr {{*kw:d="For item in list"*}}>
|
475
|
+
<td kw:d="cont item">foo</td>
|
476
|
+
</tr>
|
480
477
|
|
481
|
-
|
482
|
-
|
483
|
-
|
478
|
+
<tr {{*kw:d="List item in list"*}}>
|
479
|
+
<td kw:d="cont item">foo</td>
|
480
|
+
</tr>
|
484
481
|
|
485
482
|
php: |
|
486
|
-
|
487
|
-
|
488
|
-
|
483
|
+
<tr {{*kw:d="Foreach($list as $item)"*}}>
|
484
|
+
<td kw:d="cont($item)">foo</td>
|
485
|
+
</tr>
|
489
486
|
|
490
|
-
|
491
|
-
|
492
|
-
|
487
|
+
<tr {{*kw:d="List($list as $item)"*}}>
|
488
|
+
<td kw:d="cont($item)">foo</td>
|
489
|
+
</tr>
|
493
490
|
|
494
491
|
eperl: |
|
495
|
-
|
496
|
-
|
497
|
-
|
492
|
+
<tr {{*kw:d="Foreach($item in @list)"*}}>
|
493
|
+
<td kw:d="cont($item)">foo</td>
|
494
|
+
</tr>
|
498
495
|
|
499
|
-
|
500
|
-
|
501
|
-
|
496
|
+
<tr {{*kw:d="List($item in @list)"*}}>
|
497
|
+
<td kw:d="cont($item)">foo</td>
|
498
|
+
</tr>
|
502
499
|
|
503
500
|
jstl: |
|
504
|
-
|
505
|
-
|
506
|
-
|
501
|
+
<tr {{*kw:d="For(item: list)"*}}>
|
502
|
+
<td kw:d="cont(item)">foo</td>
|
503
|
+
</tr>
|
507
504
|
|
508
|
-
|
509
|
-
|
510
|
-
|
505
|
+
<tr {{*kw:d="List(item: list)"*}}>
|
506
|
+
<td kw:d="cont(item)">foo</td>
|
507
|
+
</tr>
|
511
508
|
|
512
509
|
expected*:
|
513
510
|
eruby: |
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
511
|
+
{{*<% item_ctr = 0 %>*}}
|
512
|
+
{{*<% for item in list do %>*}}
|
513
|
+
{{*<% item_ctr += 1 %>*}}
|
514
|
+
<tr>
|
515
|
+
<td><%= item %></td>
|
516
|
+
</tr>
|
517
|
+
{{*<% end %>*}}
|
518
|
+
|
519
|
+
<tr>
|
520
|
+
{{*<% item_ctr = 0 %>*}}
|
521
|
+
{{*<% for item in list do %>*}}
|
522
|
+
{{*<% item_ctr += 1 %>*}}
|
523
|
+
<td><%= item %></td>
|
524
|
+
{{*<% end %>*}}
|
525
|
+
</tr>
|
529
526
|
|
530
527
|
php: |
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
528
|
+
{{*<?php $item_ctr = 0; ?>*}}
|
529
|
+
{{*<?php foreach ($list as $item) { ?>*}}
|
530
|
+
{{*<?php $item_ctr++; ?>*}}
|
531
|
+
<tr>
|
532
|
+
<td><?php echo $item; ?></td>
|
533
|
+
</tr>
|
534
|
+
{{*<?php } ?>*}}
|
535
|
+
|
536
|
+
<tr>
|
537
|
+
{{*<?php $item_ctr = 0; ?>*}}
|
538
|
+
{{*<?php foreach ($list as $item) { ?>*}}
|
539
|
+
{{*<?php $item_ctr++; ?>*}}
|
540
|
+
<td><?php echo $item; ?></td>
|
541
|
+
{{*<?php } ?>*}}
|
542
|
+
</tr>
|
546
543
|
|
547
544
|
eperl: |
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
545
|
+
{{*<? my $item_ctr = 0; !>*}}
|
546
|
+
{{*<? foreach my $item (@list) { !>*}}
|
547
|
+
{{*<? $item_ctr++; !>*}}
|
548
|
+
<tr>
|
549
|
+
<td><?= $item !></td>
|
550
|
+
</tr>
|
551
|
+
{{*<? } !>*}}
|
552
|
+
|
553
|
+
<tr>
|
554
|
+
{{*<? my $item_ctr = 0; !>*}}
|
555
|
+
{{*<? foreach my $item (@list) { !>*}}
|
556
|
+
{{*<? $item_ctr++; !>*}}
|
557
|
+
<td><?= $item !></td>
|
558
|
+
{{*<? } !>*}}
|
559
|
+
</tr>
|
563
560
|
|
564
561
|
jstl: |
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
562
|
+
{{*<c:forEach var="item" items="${list}" varStatus="item_status">*}}
|
563
|
+
{{*<c:set var="item_ctr" value="${item_status.count}"/>*}}
|
564
|
+
<tr>
|
565
|
+
<td>${item}</td>
|
566
|
+
</tr>
|
567
|
+
{{*</c:forEach>*}}
|
568
|
+
|
569
|
+
<tr>
|
570
|
+
{{*<c:forEach var="item" items="${list}" varStatus="item_status">*}}
|
571
|
+
{{*<c:set var="item_ctr" value="${item_status.count}"/>*}}
|
572
|
+
<td>${item}</td>
|
573
|
+
{{*</c:forEach>*}}
|
574
|
+
</tr>
|
575
|
+
|
576
|
+
###
|
580
577
|
- name: foreach_tgl
|
581
578
|
subject: FOREACH, LIST
|
582
579
|
desc: |
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
580
|
+
'FOREACH' and 'LIST' directives iterate element or content with loop counter
|
581
|
+
and toggle variable.
|
582
|
+
Toggle values are "'odd'" and "'even'" in default.
|
583
|
+
You can change them by command-line option '--odd' and '--even'
|
584
|
+
or by properties(PROPERTY_ODD, PROPERTY_EVEN) in configuration file.
|
588
585
|
|
589
586
|
pdata*:
|
590
587
|
eruby: |
|
591
|
-
|
592
|
-
|
593
|
-
|
588
|
+
<tr {{*kw:d="FOR item in list"*}}>
|
589
|
+
<td kw:d="cont item">foo</td>
|
590
|
+
</tr>
|
594
591
|
|
595
|
-
|
596
|
-
|
597
|
-
|
592
|
+
<tr {{*kw:d="LIST item in list"*}}>
|
593
|
+
<td kw:d="cont item">foo</td>
|
594
|
+
</tr>
|
598
595
|
|
599
596
|
php: |
|
600
|
-
|
601
|
-
|
602
|
-
|
597
|
+
<tr {{*kw:d="FOREACH($list as $item)"*}}>
|
598
|
+
<td kw:d="cont($item)">foo</td>
|
599
|
+
</tr>
|
603
600
|
|
604
|
-
|
605
|
-
|
606
|
-
|
601
|
+
<tr {{*kw:d="LIST($list as $item)"*}}>
|
602
|
+
<td kw:d="cont($item)">foo</td>
|
603
|
+
</tr>
|
607
604
|
|
608
605
|
eperl: |
|
609
|
-
|
610
|
-
|
611
|
-
|
606
|
+
<tr {{*kw:d="FOREACH($item in @list)"*}}>
|
607
|
+
<td kw:d="cont($item)">foo</td>
|
608
|
+
</tr>
|
612
609
|
|
613
|
-
|
614
|
-
|
615
|
-
|
610
|
+
<tr {{*kw:d="LIST($item in @list)"*}}>
|
611
|
+
<td kw:d="cont($item)">foo</td>
|
612
|
+
</tr>
|
616
613
|
|
617
614
|
jstl: |
|
618
|
-
|
619
|
-
|
620
|
-
|
615
|
+
<tr {{*kw:d="FOR(item: list)"*}}>
|
616
|
+
<td kw:d="cont(item)">foo</td>
|
617
|
+
</tr>
|
621
618
|
|
622
|
-
|
623
|
-
|
624
|
-
|
619
|
+
<tr {{*kw:d="LIST(item: list)"*}}>
|
620
|
+
<td kw:d="cont(item)">foo</td>
|
621
|
+
</tr>
|
625
622
|
|
626
623
|
expected*:
|
627
624
|
eruby: |
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
625
|
+
{{*<% item_ctr = 0 %>*}}
|
626
|
+
{{*<% for item in list do %>*}}
|
627
|
+
{{*<% item_ctr += 1 %>*}}
|
628
|
+
{{*<% item_tgl = item_ctr%2==0 ? 'even' : 'odd' %>*}}
|
629
|
+
<tr>
|
630
|
+
<td><%= item %></td>
|
631
|
+
</tr>
|
632
|
+
{{*<% end %>*}}
|
633
|
+
|
634
|
+
<tr>
|
635
|
+
{{*<% item_ctr = 0 %>*}}
|
636
|
+
{{*<% for item in list do %>*}}
|
637
|
+
{{*<% item_ctr += 1 %>*}}
|
638
|
+
{{*<% item_tgl = item_ctr%2==0 ? 'even' : 'odd' %>*}}
|
639
|
+
<td><%= item %></td>
|
640
|
+
{{*<% end %>*}}
|
641
|
+
</tr>
|
645
642
|
|
646
643
|
php: |
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
644
|
+
{{*<?php $item_ctr = 0; ?>*}}
|
645
|
+
{{*<?php foreach ($list as $item) { ?>*}}
|
646
|
+
{{*<?php $item_ctr++; ?>*}}
|
647
|
+
{{*<?php $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; ?>*}}
|
648
|
+
<tr>
|
649
|
+
<td><?php echo $item; ?></td>
|
650
|
+
</tr>
|
651
|
+
{{*<?php } ?>*}}
|
652
|
+
|
653
|
+
<tr>
|
654
|
+
{{*<?php $item_ctr = 0; ?>*}}
|
655
|
+
{{*<?php foreach ($list as $item) { ?>*}}
|
656
|
+
{{*<?php $item_ctr++; ?>*}}
|
657
|
+
{{*<?php $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; ?>*}}
|
658
|
+
<td><?php echo $item; ?></td>
|
659
|
+
{{*<?php } ?>*}}
|
660
|
+
</tr>
|
664
661
|
|
665
662
|
eperl: |
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
663
|
+
{{*<? my $item_ctr = 0; !>*}}
|
664
|
+
{{*<? foreach my $item (@list) { !>*}}
|
665
|
+
{{*<? $item_ctr++; !>*}}
|
666
|
+
{{*<? my $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; !>*}}
|
667
|
+
<tr>
|
668
|
+
<td><?= $item !></td>
|
669
|
+
</tr>
|
670
|
+
{{*<? } !>*}}
|
671
|
+
|
672
|
+
<tr>
|
673
|
+
{{*<? my $item_ctr = 0; !>*}}
|
674
|
+
{{*<? foreach my $item (@list) { !>*}}
|
675
|
+
{{*<? $item_ctr++; !>*}}
|
676
|
+
{{*<? my $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; !>*}}
|
677
|
+
<td><?= $item !></td>
|
678
|
+
{{*<? } !>*}}
|
679
|
+
</tr>
|
683
680
|
|
684
681
|
jstl: |
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
##
|
682
|
+
{{*<c:forEach var="item" items="${list}" varStatus="item_status">*}}
|
683
|
+
{{*<c:set var="item_ctr" value="${item_status.count}"/>*}}
|
684
|
+
{{*<c:set var="item_tgl" value="${item_status.count%2==0 ? 'even' : 'odd'}"/>*}}
|
685
|
+
<tr>
|
686
|
+
<td>${item}</td>
|
687
|
+
</tr>
|
688
|
+
{{*</c:forEach>*}}
|
689
|
+
|
690
|
+
<tr>
|
691
|
+
{{*<c:forEach var="item" items="${list}" varStatus="item_status">*}}
|
692
|
+
{{*<c:set var="item_ctr" value="${item_status.count}"/>*}}
|
693
|
+
{{*<c:set var="item_tgl" value="${item_status.count%2==0 ? 'even' : 'odd'}"/>*}}
|
694
|
+
<td>${item}</td>
|
695
|
+
{{*</c:forEach>*}}
|
696
|
+
</tr>
|
697
|
+
|
698
|
+
###
|
703
699
|
- name: while
|
704
700
|
subject: while, loop
|
705
701
|
desc: |
|
706
|
-
|
707
|
-
|
702
|
+
'while' and 'loop' directive iterates element or content
|
703
|
+
until conditional expression is false.
|
708
704
|
|
709
|
-
|
710
|
-
|
705
|
+
JSTL doesn't support these directives because JSTL doesn't have
|
706
|
+
'while' custom tag.
|
711
707
|
|
712
708
|
pdata*:
|
713
709
|
eruby: |
|
714
|
-
|
715
|
-
|
716
|
-
|
710
|
+
<tr {{*kw:d="while (item = dbh.fetch) != nil"*}}>
|
711
|
+
<td kw:d="cont item.name">foo</td>
|
712
|
+
</tr>
|
717
713
|
|
718
|
-
|
719
|
-
|
720
|
-
|
714
|
+
<tr {{*kw:d="loop (item = dbh.fetch) != nil"*}}>
|
715
|
+
<td kw:d="cont item.name">foo</td>
|
716
|
+
</tr>
|
721
717
|
|
722
718
|
php: |
|
723
|
-
|
724
|
-
|
725
|
-
|
719
|
+
<tr {{*kw:d="while(($item = $dbh->fetch()) != null)"*}}>
|
720
|
+
<td kw:d="cont($item->name)">foo</td>
|
721
|
+
</tr>
|
726
722
|
|
727
|
-
|
728
|
-
|
729
|
-
|
723
|
+
<tr {{*kw:d="loop(($item = $dbh->fetch()) != null)"*}}>
|
724
|
+
<td kw:d="cont($item->name)">foo</td>
|
725
|
+
</tr>
|
730
726
|
|
731
727
|
eperl: |
|
732
|
-
|
733
|
-
|
734
|
-
|
728
|
+
<tr {{*kw:d="while(($item = $dbh->fetch()) != null)"*}}>
|
729
|
+
<td kw:d="cont($item->name)">foo</td>
|
730
|
+
</tr>
|
735
731
|
|
736
|
-
|
737
|
-
|
738
|
-
|
732
|
+
<tr {{*kw:d="loop(($item = $dbh->fetch()) != null)"*}}>
|
733
|
+
<td kw:d="cont($item->name)">foo</td>
|
734
|
+
</tr>
|
739
735
|
|
740
736
|
jstl: |
|
741
|
-
|
737
|
+
*** not supported ***
|
742
738
|
|
743
739
|
expected*:
|
744
740
|
eruby: |
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
741
|
+
{{*<% while (item = dbh.fetch) != nil do %>*}}
|
742
|
+
<tr>
|
743
|
+
<td><%= item.name %></td>
|
744
|
+
</tr>
|
745
|
+
{{*<% end %>*}}
|
746
|
+
|
747
|
+
<tr>
|
748
|
+
{{*<% while (item = dbh.fetch) != nil do %>*}}
|
749
|
+
<td><%= item.name %></td>
|
750
|
+
{{*<% end %>*}}
|
751
|
+
</tr>
|
756
752
|
|
757
753
|
php: |
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
754
|
+
{{*<?php while (($item = $dbh->fetch()) != null) { ?>*}}
|
755
|
+
<tr>
|
756
|
+
<td><?php echo $item->name; ?></td>
|
757
|
+
</tr>
|
758
|
+
{{*<?php } ?>*}}
|
759
|
+
|
760
|
+
<tr>
|
761
|
+
{{*<?php while (($item = $dbh->fetch()) != null) { ?>*}}
|
762
|
+
<td><?php echo $item->name; ?></td>
|
763
|
+
{{*<?php } ?>*}}
|
764
|
+
</tr>
|
769
765
|
|
770
766
|
eperl: |
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
767
|
+
{{*<? while (($item = $dbh->fetch()) != null) { !>*}}
|
768
|
+
<tr>
|
769
|
+
<td><?= $item->name !></td>
|
770
|
+
</tr>
|
771
|
+
{{*<? } !>*}}
|
772
|
+
|
773
|
+
<tr>
|
774
|
+
{{*<? while (($item = $dbh->fetch()) != null) { !>*}}
|
775
|
+
<td><?= $item->name !></td>
|
776
|
+
{{*<? } !>*}}
|
777
|
+
</tr>
|
782
778
|
|
783
779
|
jstl: |
|
784
|
-
|
785
|
-
|
786
|
-
|
780
|
+
*** not supported ***
|
787
781
|
|
782
|
+
###
|
788
783
|
- name: if
|
789
784
|
subject: if-then-else
|
790
785
|
desc: |
|
@@ -795,487 +790,477 @@
|
|
795
790
|
|
796
791
|
pdata*:
|
797
792
|
eruby: |
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
793
|
+
<div {{*kw:d="if status=='error'"*}}>
|
794
|
+
<p class="error" kw:d="cont mesg">error</p>
|
795
|
+
</div>
|
796
|
+
<div {{*kw:d="elsif status=='warning'"*}}>
|
797
|
+
<p class="warning" kw:d="cont mesg">waring</p>
|
798
|
+
</div>
|
799
|
+
<div {{*kw:d="else"*}}>
|
800
|
+
<p kw:d="cont mesg">mesg</p>
|
801
|
+
</div>
|
807
802
|
|
808
803
|
php: |
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
804
|
+
<div {{*kw:d="if($status=='error')"*}}>
|
805
|
+
<p class="error" kw:d="cont($mesg)">error</p>
|
806
|
+
</div>
|
807
|
+
<div {{*kw:d="elseif($status=='warning')"*}}>
|
808
|
+
<p class="warning" kw:d="cont($mesg)">waring</p>
|
809
|
+
</div>
|
810
|
+
<div {{*kw:d="else"*}}>
|
811
|
+
<p kw:d="cont($mesg)">mesg</p>
|
812
|
+
</div>
|
818
813
|
|
819
814
|
eperl: |
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
815
|
+
<div {{*kw:d="if($status=='error')"*}}>
|
816
|
+
<p class="error" kw:d="cont($mesg)">error</p>
|
817
|
+
</div>
|
818
|
+
<div {{*kw:d="elsif($status=='warning')"*}}>
|
819
|
+
<p class="warning" kw:d="cont($mesg)">waring</p>
|
820
|
+
</div>
|
821
|
+
<div {{*kw:d="else"*}}>
|
822
|
+
<p kw:d="cont($mesg)">mesg</p>
|
823
|
+
</div>
|
829
824
|
|
830
825
|
jstl: |
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
826
|
+
<div {{*kw:d="if(status=='error')"*}}>
|
827
|
+
<p class="error" kw:d="cont(mesg)">error</p>
|
828
|
+
</div>
|
829
|
+
<div {{*kw:d="elseif(status=='warning')"*}}>
|
830
|
+
<p class="warning" kw:d="cont(mesg)">waring</p>
|
831
|
+
</div>
|
832
|
+
<div {{*kw:d="else"*}}>
|
833
|
+
<p kw:d="cont(mesg)">mesg</p>
|
834
|
+
</div>
|
840
835
|
|
841
836
|
expected*:
|
842
837
|
eruby: |
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
838
|
+
{{*<% if status=='error' then %>*}}
|
839
|
+
<div>
|
840
|
+
<p class="error"><%= mesg %></p>
|
841
|
+
</div>
|
842
|
+
{{*<% elsif status=='warning' then %>*}}
|
843
|
+
<div>
|
844
|
+
<p class="warning"><%= mesg %></p>
|
845
|
+
</div>
|
846
|
+
{{*<% else %>*}}
|
847
|
+
<div>
|
848
|
+
<p><%= mesg %></p>
|
849
|
+
</div>
|
850
|
+
{{*<% end %>*}}
|
856
851
|
|
857
852
|
php: |
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
853
|
+
{{*<?php if ($status=='error') { ?>*}}
|
854
|
+
<div>
|
855
|
+
<p class="error"><?php echo $mesg; ?></p>
|
856
|
+
</div>
|
857
|
+
{{*<?php } elseif ($status=='warning') { ?>*}}
|
858
|
+
<div>
|
859
|
+
<p class="warning"><?php echo $mesg; ?></p>
|
860
|
+
</div>
|
861
|
+
{{*<?php } else { ?>*}}
|
862
|
+
<div>
|
863
|
+
<p><?php echo $mesg; ?></p>
|
864
|
+
</div>
|
865
|
+
{{*<?php } ?>*}}
|
871
866
|
|
872
867
|
eperl: |
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
868
|
+
{{*<? if ($status=='error') { !>*}}
|
869
|
+
<div>
|
870
|
+
<p class="error"><?= $mesg !></p>
|
871
|
+
</div>
|
872
|
+
{{*<? } elsif ($status=='warning') { !>*}}
|
873
|
+
<div>
|
874
|
+
<p class="warning"><?= $mesg !></p>
|
875
|
+
</div>
|
876
|
+
{{*<? } else { !>*}}
|
877
|
+
<div>
|
878
|
+
<p><?= $mesg !></p>
|
879
|
+
</div>
|
880
|
+
{{*<? } !>*}}
|
886
881
|
|
887
882
|
jstl: |
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
##
|
883
|
+
{{*<c:choose><c:when test="${status=='error'}">*}}
|
884
|
+
<div>
|
885
|
+
<p class="error">${mesg}</p>
|
886
|
+
</div>
|
887
|
+
{{*</c:when><c:when test="${status=='warning'}">*}}
|
888
|
+
<div>
|
889
|
+
<p class="warning">${mesg}</p>
|
890
|
+
</div>
|
891
|
+
{{*</c:when><c:otherwise>*}}
|
892
|
+
<div>
|
893
|
+
<p>${mesg}</p>
|
894
|
+
</div>
|
895
|
+
{{*</c:otherwise></c:choose>*}}
|
896
|
+
|
897
|
+
###
|
904
898
|
- name: set
|
905
899
|
subject: set
|
906
900
|
desc: |
|
907
|
-
|
901
|
+
'set' directive executes any expression.
|
908
902
|
|
909
903
|
pdata*:
|
910
904
|
eruby: |
|
911
|
-
|
912
|
-
|
913
|
-
|
905
|
+
<tr {{*kw:d="set color=i%2==0 ? 'red' : 'blue'"*}}>
|
906
|
+
<td kw:d="cont: color">red</td>
|
907
|
+
</tr>
|
914
908
|
|
915
909
|
php: |
|
916
|
-
|
917
|
-
|
918
|
-
|
910
|
+
<tr {{*kw:d="set($color=$i%2==0 ? 'red' : 'blue')"*}}>
|
911
|
+
<td kw:d="cont($color)">red</td>
|
912
|
+
</tr>
|
919
913
|
|
920
914
|
eperl: |
|
921
|
-
|
922
|
-
|
923
|
-
|
915
|
+
<tr {{*kw:d="set($color=i%2==0 ? 'red' : 'blue')"*}}>
|
916
|
+
<td kw:d="cont($color)">red</td>
|
917
|
+
</tr>
|
924
918
|
|
925
919
|
jstl: |
|
926
|
-
|
927
|
-
|
928
|
-
|
920
|
+
<tr {{*kw:d="set(color=i%2==0 ? 'red' : 'blue')"*}}>
|
921
|
+
<td kw:d="cont(color)">red</td>
|
922
|
+
</tr>
|
929
923
|
|
930
924
|
expected*:
|
931
925
|
eruby: |
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
926
|
+
{{*<% color=i%2==0 ? 'red' : 'blue' %>*}}
|
927
|
+
<tr>
|
928
|
+
<td><%= color %></td>
|
929
|
+
</tr>
|
936
930
|
|
937
931
|
php: |
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
932
|
+
{{*<?php $color=$i%2==0 ? 'red' : 'blue'; ?>*}}
|
933
|
+
<tr>
|
934
|
+
<td><?php echo $color; ?></td>
|
935
|
+
</tr>
|
942
936
|
|
943
937
|
eperl: |
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
938
|
+
{{*<? $color=i%2==0 ? 'red' : 'blue'; !>*}}
|
939
|
+
<tr>
|
940
|
+
<td><?= $color !></td>
|
941
|
+
</tr>
|
948
942
|
|
949
943
|
jstl: |
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
944
|
+
{{*<c:set var="color=i%2=" value="${0 ? 'red' : 'blue'}"/>*}}
|
945
|
+
<tr>
|
946
|
+
<td>${color}</td>
|
947
|
+
</tr>
|
955
948
|
|
956
|
-
|
949
|
+
###
|
957
950
|
- name: mark
|
958
951
|
subject: mark
|
959
952
|
desc: |
|
960
|
-
|
961
|
-
|
962
|
-
|
953
|
+
'mark' directive marks the element by name.
|
954
|
+
Name is used as selector of ruleset in presentation logic file.
|
955
|
+
Id attribute is equivalent to 'mark' directive if other direcitve is not specified.
|
963
956
|
|
964
|
-
|
957
|
+
'mark' directive is language-independent when used with id attribute.
|
965
958
|
|
966
959
|
pdata*:
|
967
960
|
eruby: |
|
968
|
-
|
969
|
-
|
970
|
-
|
961
|
+
<ul {{*id="mark:list"*}}>
|
962
|
+
<li {{*kw:d="id: item"*}}>foo</li>
|
963
|
+
</ul>
|
971
964
|
|
972
965
|
php: |
|
973
|
-
|
974
|
-
|
975
|
-
|
966
|
+
<ul {{*id="mark:list"*}}>
|
967
|
+
<li {{*kw:d="id(item)"*}}>foo</li>
|
968
|
+
</ul>
|
976
969
|
|
977
970
|
eperl: |
|
978
|
-
|
979
|
-
|
980
|
-
|
971
|
+
<ul {{*id="mark:list"*}}>
|
972
|
+
<li {{*kw:d="id(item)"*}}>foo</li>
|
973
|
+
</ul>
|
981
974
|
|
982
975
|
jstl: |
|
983
|
-
|
984
|
-
|
985
|
-
|
976
|
+
<ul {{*id="mark:list"*}}>
|
977
|
+
<li {{*kw:d="id(item)"*}}>foo</li>
|
978
|
+
</ul>
|
986
979
|
|
987
980
|
expected*:
|
988
981
|
eruby: |
|
989
|
-
|
990
|
-
|
991
|
-
|
982
|
+
<ul>
|
983
|
+
<li>foo</li>
|
984
|
+
</ul>
|
992
985
|
|
993
986
|
php: |
|
994
|
-
|
995
|
-
|
996
|
-
|
987
|
+
<ul>
|
988
|
+
<li>foo</li>
|
989
|
+
</ul>
|
997
990
|
|
998
991
|
eperl: |
|
999
|
-
|
1000
|
-
|
1001
|
-
|
992
|
+
<ul>
|
993
|
+
<li>foo</li>
|
994
|
+
</ul>
|
1002
995
|
|
1003
996
|
jstl: |
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
997
|
+
<ul>
|
998
|
+
<li>foo</li>
|
999
|
+
</ul>
|
1007
1000
|
|
1008
|
-
|
1009
|
-
##
|
1001
|
+
###
|
1010
1002
|
- name: attr
|
1011
1003
|
subject: attr, Attr, ATTR
|
1012
1004
|
desc: |
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1005
|
+
'attr', 'Attr', and 'ATTR' directives replace attribute value with expression.
|
1006
|
+
'Attr' directive escapes expression automatically, while 'ATTR' never escape it.
|
1007
|
+
'attr' directive escapes expression when command-line option '-e' is specified
|
1008
|
+
or PROPERTY_ESCAPE is true in configuration file.
|
1017
1009
|
|
1018
|
-
|
1019
|
-
|
1010
|
+
More than one directives are available in an element with separating by ';',
|
1011
|
+
and available with other directive.
|
1020
1012
|
|
1021
1013
|
pdata*:
|
1022
1014
|
eruby: |
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1015
|
+
<tr class="odd"
|
1016
|
+
kw:d="FOR v in list; {{*attr: 'class' v_tgl; attr: 'style' style*}}">
|
1017
|
+
<td kw:d="cont v.name">foo</td>
|
1018
|
+
</tr>
|
1027
1019
|
|
1028
1020
|
php: |
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1021
|
+
<tr class="odd"
|
1022
|
+
kw:d="FOREACH($list as $v); {{*attr('class',$v_tgl); attr('style',$style)*}}">
|
1023
|
+
<td kw:d="cont($v->name)">foo</td>
|
1024
|
+
</tr>
|
1033
1025
|
|
1034
1026
|
eperl: |
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1027
|
+
<tr class="odd"
|
1028
|
+
kw:d="FOREACH($v in @list); {{*attr('class',$v_tgl); attr('style',$style)*}}">
|
1029
|
+
<td kw:d="cont($v->name)">foo</td>
|
1030
|
+
</tr>
|
1039
1031
|
|
1040
1032
|
jstl: |
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1033
|
+
<tr class="odd"
|
1034
|
+
kw:d="FOR(v: list); {{*attr('class',v_tgl); attr('style',style)*}}">
|
1035
|
+
<td kw:d="cont(v.name)">foo</td>
|
1036
|
+
</tr>
|
1045
1037
|
|
1046
1038
|
expected*:
|
1047
1039
|
eruby: |
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1040
|
+
<% v_ctr = 0 %>
|
1041
|
+
<% for v in list do %>
|
1042
|
+
<% v_ctr += 1 %>
|
1043
|
+
<% v_tgl = v_ctr%2==0 ? 'even' : 'odd' %>
|
1044
|
+
<tr {{*class="<%= v_tgl %>"*}} {{*style="<%= style %>">*}}
|
1045
|
+
<td><%= v.name %></td>
|
1046
|
+
</tr>
|
1047
|
+
<% end %>
|
1056
1048
|
|
1057
1049
|
php: |
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1050
|
+
<?php $v_ctr = 0; ?>
|
1051
|
+
<?php foreach ($list as $v) { ?>
|
1052
|
+
<?php $v_ctr++; ?>
|
1053
|
+
<?php $v_tgl = $v_ctr%2==0 ? 'even' : 'odd'; ?>
|
1054
|
+
<tr {{*class="<?php echo $v_tgl; ?>"*}} {{*style="<?php echo $style; ?>"*}}>
|
1055
|
+
<td><?php echo $v->name; ?></td>
|
1056
|
+
</tr>
|
1057
|
+
<?php } ?>
|
1066
1058
|
|
1067
1059
|
eperl: |
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1060
|
+
<? my $v_ctr = 0; !>
|
1061
|
+
<? foreach my $v (@list) { !>
|
1062
|
+
<? $v_ctr++; !>
|
1063
|
+
<? my $v_tgl = $v_ctr%2==0 ? 'even' : 'odd'; !>
|
1064
|
+
<tr {{*class="<?= $v_tgl !>"*}} {{*style="<?= $style !>"*}}>
|
1065
|
+
<td><?= $v->name !></td>
|
1066
|
+
</tr>
|
1067
|
+
<? } !>
|
1076
1068
|
|
1077
1069
|
jstl: |
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
##
|
1070
|
+
<c:forEach var="v" items="${list}" varStatus="v_status">
|
1071
|
+
<c:set var="v_ctr" value="${v_status.count}"/>
|
1072
|
+
<c:set var="v_tgl" value="${v_status.count%2==0 ? 'even' : 'odd'}"/>
|
1073
|
+
<tr {{*class="${v_tgl}"*}} {{*style="${style}"*}}>
|
1074
|
+
<td>${v.name}</td>
|
1075
|
+
</tr>
|
1076
|
+
</c:forEach>
|
1077
|
+
|
1078
|
+
###
|
1088
1079
|
- name: append
|
1089
1080
|
subject: append, Append, APPEND
|
1090
1081
|
desc: |
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1082
|
+
'append', 'Append', and 'APPEND' directives append expression at the end of start-tag.
|
1083
|
+
'Append' directive escapes expression automatically, while 'APPEND' never escape it.
|
1084
|
+
'append' directive escapes expression when command-line option '-e' is specified
|
1085
|
+
or PROPERTY_ESCAPE is true in configuration file.
|
1095
1086
|
|
1096
|
-
|
1097
|
-
|
1087
|
+
More than one directives are available in an element with separating by ';',
|
1088
|
+
and available with other directive.
|
1098
1089
|
|
1099
1090
|
pdata*:
|
1100
1091
|
eruby: |
|
1101
|
-
|
1102
|
-
|
1092
|
+
<input type="checkbox"
|
1093
|
+
{{*kw:d="append: flag1 ? ' checked=\'checked\'' : ''"*}}>
|
1103
1094
|
# <input type="checkbox" name="flag" value="y"
|
1104
|
-
#
|
1095
|
+
# kw:d="append: flag1 ? ' checked=\'checked\'' : ''">
|
1105
1096
|
|
1106
1097
|
php: |
|
1107
|
-
|
1108
|
-
|
1098
|
+
<input type="checkbox"
|
1099
|
+
{{*kw:d="append($flag1 ? ' checked=\'checked\'' : '')"*}}>
|
1109
1100
|
# <input type="checkbox" name="flag" value="y"
|
1110
|
-
#
|
1101
|
+
# kw:d="append($flag1 ? ' checked=\'checked\'' : '')">
|
1111
1102
|
|
1112
1103
|
eperl: |
|
1113
|
-
|
1114
|
-
|
1104
|
+
<input type="checkbox"
|
1105
|
+
{{*kw:d="append($flag1 ? ' checked=\'checked\'' : '')"*}}>
|
1115
1106
|
# <input type="checkbox" name="flag" value="y"
|
1116
|
-
#
|
1107
|
+
# kw:d="append($flag1 ? ' checked=\'checked\'' : '')">
|
1117
1108
|
|
1118
1109
|
jstl: |
|
1119
|
-
|
1120
|
-
|
1110
|
+
<input type="checkbox"
|
1111
|
+
{{*kw:d="append(flag1 ? ' checked=\'checked\'' : '')"*}}>
|
1121
1112
|
# <input type="checkbox" name="flag" value="y"
|
1122
|
-
#
|
1113
|
+
# kw:d="append(flag1 ? ' checked=\'checked\'' : '')">
|
1123
1114
|
|
1124
1115
|
expected*:
|
1125
1116
|
eruby: |
|
1126
|
-
|
1117
|
+
<input type="checkbox"{{*<%= flag1 ? ' checked=\'checked\'' : '' %>*}}>
|
1127
1118
|
# <input type="checkbox" name="flag" value="y"<%= flag1 ? ' checked=\'checked\'' : '' %>>
|
1128
1119
|
|
1129
1120
|
php: |
|
1130
|
-
|
1121
|
+
<input type="checkbox"{{*<?php echo $flag1 ? ' checked=\'checked\'' : ''; ?>*}}>
|
1131
1122
|
# <input type="checkbox" name="flag" value="y"<?php echo $flag1 ? ' checked=\'checked\'' : ''; ?>>
|
1132
1123
|
|
1133
1124
|
eperl: |
|
1134
|
-
|
1125
|
+
<input type="checkbox"{{*<?= $flag1 ? ' checked=\'checked\'' : '' !>*}}>
|
1135
1126
|
# <input type="checkbox" name="flag" value="y"<?= $flag1 ? ' checked=\'checked\'' : '' !>>
|
1136
1127
|
|
1137
1128
|
jstl: |
|
1138
|
-
|
1129
|
+
<input type="checkbox"{{*${flag1 ? ' checked=\'checked\'' : ''}*}}>
|
1139
1130
|
# <input type="checkbox" name="flag" value="y"${flag1 ? ' checked=\'checked\'' : ''}>
|
1140
1131
|
|
1141
|
-
|
1142
|
-
|
1143
|
-
##
|
1132
|
+
###
|
1144
1133
|
- name: dummy
|
1145
1134
|
subject: dummy
|
1146
1135
|
desc: |
|
1147
|
-
|
1148
|
-
|
1136
|
+
'dummy' directive removes the element.
|
1137
|
+
It is very useful when preview the HTML design in browser.
|
1149
1138
|
|
1150
|
-
|
1139
|
+
'dummy' directive is language-independent when used with id attribute.
|
1151
1140
|
|
1152
1141
|
pdata*:
|
1153
1142
|
eruby: |
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1143
|
+
<ul>
|
1144
|
+
<li>foo</li>
|
1145
|
+
<li {{*id="dummy:d1"*}}>bar</li>
|
1146
|
+
<li {{*kw:d="dummy:"*}}>baz</li>
|
1147
|
+
</ul>
|
1159
1148
|
|
1160
1149
|
php: |
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1150
|
+
<ul>
|
1151
|
+
<li>foo</li>
|
1152
|
+
<li {{*id="dummy:d1"*}}>bar</li>
|
1153
|
+
<li {{*kw:d="dummy()"*}}>baz</li>
|
1154
|
+
</ul>
|
1166
1155
|
|
1167
1156
|
eperl: |
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1157
|
+
<ul>
|
1158
|
+
<li>foo</li>
|
1159
|
+
<li {{*id="dummy:d1"*}}>bar</li>
|
1160
|
+
<li {{*kw:d="dummy()"*}}>baz</li>
|
1161
|
+
</ul>
|
1173
1162
|
|
1174
1163
|
jstl: |
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1164
|
+
<ul>
|
1165
|
+
<li>foo</li>
|
1166
|
+
<li {{*id="dummy:d1"*}}>bar</li>
|
1167
|
+
<li {{*kw:d="dummy()"*}}>baz</li>
|
1168
|
+
</ul>
|
1180
1169
|
|
1181
1170
|
expected*:
|
1182
1171
|
eruby: |
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1172
|
+
<ul>
|
1173
|
+
<li>foo</li>
|
1174
|
+
</ul>
|
1186
1175
|
|
1187
1176
|
php: |
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1177
|
+
<ul>
|
1178
|
+
<li>foo</li>
|
1179
|
+
</ul>
|
1191
1180
|
|
1192
1181
|
eperl: |
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1182
|
+
<ul>
|
1183
|
+
<li>foo</li>
|
1184
|
+
</ul>
|
1196
1185
|
|
1197
1186
|
jstl: |
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1187
|
+
<ul>
|
1188
|
+
<li>foo</li>
|
1189
|
+
</ul>
|
1202
1190
|
|
1203
|
-
|
1204
|
-
##
|
1191
|
+
###
|
1205
1192
|
- name: default
|
1206
1193
|
subject: default, Default, DEFAULT
|
1207
1194
|
desc: |
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1195
|
+
'default', 'Default', and 'DEFAULT' directive replaces content by expression
|
1196
|
+
only if expression is not nil, false, nor empty string.
|
1197
|
+
|
1198
|
+
'Default' directive escapes expression automatically, while 'DEFAULT' never escape it.
|
1199
|
+
'default' directive escapes expression when command-line option '-e' is specified
|
1200
|
+
or PROPERTY_ESCAPE is true in configuration file.
|
1214
1201
|
|
1215
1202
|
pdata*:
|
1216
1203
|
eruby: |
|
1217
|
-
|
1204
|
+
name: <em {{*kw:d="default: user"*}}>Guest</em>
|
1218
1205
|
|
1219
1206
|
php: |
|
1220
|
-
|
1207
|
+
name: <em {{*kw:d="default($user)"*}}>Guest</em>
|
1221
1208
|
|
1222
1209
|
eperl: |
|
1223
|
-
|
1210
|
+
name: <em {{*kw:d="default($user)"*}}>Guest</em>
|
1224
1211
|
|
1225
1212
|
jstl: |
|
1226
|
-
|
1213
|
+
name: <em {{*kw:d="default(user)"*}}>Guest</em>
|
1227
1214
|
|
1228
1215
|
expected*:
|
1229
1216
|
eruby: |
|
1230
|
-
|
1217
|
+
name: <em>{{*<% if (user) && !(user).to_s.empty? then %><%= user %><% else %>Guest<% end %>*}}</em>
|
1231
1218
|
|
1232
1219
|
php: |
|
1233
|
-
|
1220
|
+
name: <em>{{*<?php if ($user) { ?><?php echo $user; ?><?php } else { ?>Guest<?php } ?>*}}</em>
|
1234
1221
|
|
1235
1222
|
eperl: |
|
1236
|
-
|
1223
|
+
name: <em>{{*<? if ($user) { !><?= $user !><? } else { !>Guest<? } !>*}}</em>
|
1237
1224
|
|
1238
1225
|
jstl: |
|
1239
|
-
|
1226
|
+
name: <em>{{*<c:out value="${user}" default="Guest"/>*}}</em>
|
1240
1227
|
|
1241
|
-
|
1242
|
-
|
1243
|
-
##
|
1228
|
+
###
|
1244
1229
|
- name: replace
|
1245
1230
|
common: yes
|
1246
1231
|
subject: replace_element/content_with_element/content
|
1247
1232
|
desc: |
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1233
|
+
'replace_element_with_element', 'replace_element_with_content',
|
1234
|
+
'replace_content_with_element', and 'replace_content_with_content'
|
1235
|
+
directives replace element or content with other element or content.
|
1236
|
+
|
1237
|
+
These directives are language-independent when used with id attribute.
|
1253
1238
|
|
1254
1239
|
pdata*:
|
1255
1240
|
eruby: &replace1_pdata|
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1241
|
+
<div {{*id="mark:link"*}}>
|
1242
|
+
back to <a href="/">home</a>.
|
1243
|
+
</div>
|
1244
|
+
|
1245
|
+
<!-- replace element with other element -->
|
1246
|
+
<p {{*id="replace_element_with_element:link"*}}>
|
1247
|
+
back to home
|
1248
|
+
</p>
|
1249
|
+
|
1250
|
+
<!-- replace element with other content-->
|
1251
|
+
<p {{*id="replace_element_with_content:link"*}}>
|
1252
|
+
back to home
|
1253
|
+
</p>
|
1254
|
+
|
1255
|
+
<!-- replace content with other element -->
|
1256
|
+
<p {{*id="replace_content_with_element:link"*}}>
|
1257
|
+
back to home
|
1258
|
+
</p>
|
1259
|
+
|
1260
|
+
<!-- replace content with other content -->
|
1261
|
+
<p {{*id="replace_content_with_content:link"*}}>
|
1262
|
+
back to home
|
1263
|
+
</p>
|
1279
1264
|
|
1280
1265
|
php: *replace1_pdata
|
1281
1266
|
|
@@ -1285,29 +1270,29 @@
|
|
1285
1270
|
|
1286
1271
|
expected*:
|
1287
1272
|
eruby: &replace1_expected |
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1273
|
+
<div>
|
1274
|
+
back to <a href="/">home</a>.
|
1275
|
+
</div>
|
1276
|
+
|
1277
|
+
<!-- replace element with other element -->
|
1278
|
+
<div>
|
1279
|
+
back to <a href="/">home</a>.
|
1280
|
+
</div>
|
1281
|
+
|
1282
|
+
<!-- replace element with other content-->
|
1283
|
+
back to <a href="/">home</a>.
|
1284
|
+
|
1285
|
+
<!-- replace content with other element -->
|
1286
|
+
<p>
|
1287
|
+
<div>
|
1288
|
+
back to <a href="/">home</a>.
|
1289
|
+
</div>
|
1290
|
+
</p>
|
1291
|
+
|
1292
|
+
<!-- replace content with other content -->
|
1293
|
+
<p>
|
1294
|
+
back to <a href="/">home</a>.
|
1295
|
+
</p>
|
1311
1296
|
|
1312
1297
|
php: *replace1_expected
|
1313
1298
|
|
@@ -1315,97 +1300,97 @@
|
|
1315
1300
|
|
1316
1301
|
jstl: *replace1_expected
|
1317
1302
|
|
1303
|
+
###
|
1304
|
+
- name: replace2
|
1305
|
+
hide: yes
|
1306
|
+
subject: replace_element_with, replace_content_with
|
1307
|
+
desc: |
|
1308
|
+
'replace_element_with' and 'replace_content_with' directives replace element
|
1309
|
+
or content with other element or content.
|
1310
|
+
|
1311
|
+
pdata*:
|
1312
|
+
eruby: |
|
1313
|
+
<div {{*id="mark:link"*}}>
|
1314
|
+
back to <a href="/">home</a>.
|
1315
|
+
</div>
|
1316
|
+
|
1317
|
+
<!-- replace element with other element -->
|
1318
|
+
<p {{*kw:d="replace_element_with: element(link)"*}}>
|
1319
|
+
back to home
|
1320
|
+
</p>
|
1321
|
+
|
1322
|
+
<!-- replace element with other content-->
|
1323
|
+
<p {{*kw:d="replace_element_with: content(link)"*}}>
|
1324
|
+
back to home
|
1325
|
+
</p>
|
1326
|
+
|
1327
|
+
<!-- replace content with other element -->
|
1328
|
+
<p {{*kw:d="replace_content_with: element(link)"*}}>
|
1329
|
+
back to home
|
1330
|
+
</p>
|
1331
|
+
|
1332
|
+
<!-- replace content with other content -->
|
1333
|
+
<p {{*kw:d="replace_content_with: content(link)"*}}>
|
1334
|
+
back to home
|
1335
|
+
</p>
|
1336
|
+
|
1337
|
+
php: &replace_pdata |
|
1338
|
+
<div kw:d="id(link)">
|
1339
|
+
back to <a href="/">home</a>.
|
1340
|
+
</div>
|
1341
|
+
|
1342
|
+
<!-- replace element with other element -->
|
1343
|
+
<p kw:d="replace_element_with(element(link))">
|
1344
|
+
back to home
|
1345
|
+
</p>
|
1346
|
+
|
1347
|
+
<!-- replace element with other content-->
|
1348
|
+
<p kw:d="replace_element_with(content(link))">
|
1349
|
+
back to home
|
1350
|
+
</p>
|
1351
|
+
|
1352
|
+
<!-- replace content with other element -->
|
1353
|
+
<p kw:d="replace_content_with(element(link))">
|
1354
|
+
back to home
|
1355
|
+
</p>
|
1356
|
+
|
1357
|
+
<!-- replace content with other content -->
|
1358
|
+
<p kw:d="replace_content_with(content(link))">
|
1359
|
+
back to home
|
1360
|
+
</p>
|
1361
|
+
|
1362
|
+
eperl: *replace_pdata
|
1363
|
+
|
1364
|
+
jstl: *replace_pdata
|
1318
1365
|
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
# </p>
|
1351
|
-
#
|
1352
|
-
# php: &replace_pdata |
|
1353
|
-
# <div title="id(link)">
|
1354
|
-
# back to <a href="/">home</a>.
|
1355
|
-
# </div>
|
1356
|
-
#
|
1357
|
-
# <!-- replace element with other element -->
|
1358
|
-
# <p title="replace_element_with(element(link))">
|
1359
|
-
# back to home
|
1360
|
-
# </p>
|
1361
|
-
#
|
1362
|
-
# <!-- replace element with other content-->
|
1363
|
-
# <p title="replace_element_with(content(link))">
|
1364
|
-
# back to home
|
1365
|
-
# </p>
|
1366
|
-
#
|
1367
|
-
# <!-- replace content with other element -->
|
1368
|
-
# <p title="replace_content_with(element(link))">
|
1369
|
-
# back to home
|
1370
|
-
# </p>
|
1371
|
-
#
|
1372
|
-
# <!-- replace content with other content -->
|
1373
|
-
# <p title="replace_content_with(content(link))">
|
1374
|
-
# back to home
|
1375
|
-
# </p>
|
1376
|
-
#
|
1377
|
-
# eperl: *replace_pdata
|
1378
|
-
#
|
1379
|
-
# jstl: *replace_pdata
|
1380
|
-
#
|
1381
|
-
# expected*:
|
1382
|
-
# eruby: &expected1 |
|
1383
|
-
# <div>
|
1384
|
-
# back to <a href="/">home</a>.
|
1385
|
-
# </div>
|
1386
|
-
#
|
1387
|
-
# <!-- replace element with other element -->
|
1388
|
-
# <div>
|
1389
|
-
# back to <a href="/">home</a>.
|
1390
|
-
# </div>
|
1391
|
-
#
|
1392
|
-
# <!-- replace element with other content-->
|
1393
|
-
# back to <a href="/">home</a>.
|
1394
|
-
#
|
1395
|
-
# <!-- replace content with other element -->
|
1396
|
-
# <p>
|
1397
|
-
# <div>
|
1398
|
-
# back to <a href="/">home</a>.
|
1399
|
-
# </div>
|
1400
|
-
# </p>
|
1401
|
-
#
|
1402
|
-
# <!-- replace content with other content -->
|
1403
|
-
# <p>
|
1404
|
-
# back to <a href="/">home</a>.
|
1405
|
-
# </p>
|
1406
|
-
#
|
1407
|
-
# php: *expected1
|
1408
|
-
#
|
1409
|
-
# eperl: *expected1
|
1410
|
-
#
|
1411
|
-
# jstl: *expected1
|
1366
|
+
expected*:
|
1367
|
+
eruby: &expected1 |
|
1368
|
+
<div>
|
1369
|
+
back to <a href="/">home</a>.
|
1370
|
+
</div>
|
1371
|
+
|
1372
|
+
<!-- replace element with other element -->
|
1373
|
+
<div>
|
1374
|
+
back to <a href="/">home</a>.
|
1375
|
+
</div>
|
1376
|
+
|
1377
|
+
<!-- replace element with other content-->
|
1378
|
+
back to <a href="/">home</a>.
|
1379
|
+
|
1380
|
+
<!-- replace content with other element -->
|
1381
|
+
<p>
|
1382
|
+
<div>
|
1383
|
+
back to <a href="/">home</a>.
|
1384
|
+
</div>
|
1385
|
+
</p>
|
1386
|
+
|
1387
|
+
<!-- replace content with other content -->
|
1388
|
+
<p>
|
1389
|
+
back to <a href="/">home</a>.
|
1390
|
+
</p>
|
1391
|
+
|
1392
|
+
php: *expected1
|
1393
|
+
|
1394
|
+
eperl: *expected1
|
1395
|
+
|
1396
|
+
jstl: *expected1
|