kwartz 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/ChangeLog +36 -1
  2. data/LGPL +504 -0
  3. data/README.txt +16 -2
  4. data/bin/kwartz +1 -1
  5. data/doc-api/classes/Kwartz.html +47 -1
  6. data/doc-api/classes/Kwartz/Assertion.html +6 -6
  7. data/doc-api/classes/Kwartz/AssertionError.html +6 -6
  8. data/doc-api/classes/Kwartz/AttrInfo.html +42 -42
  9. data/doc-api/classes/Kwartz/BaseError.html +12 -12
  10. data/doc-api/classes/Kwartz/BaseTranslator.html +210 -43
  11. data/doc-api/classes/Kwartz/CharacterType.html +24 -24
  12. data/doc-api/classes/Kwartz/CommandOptionError.html +7 -7
  13. data/doc-api/classes/Kwartz/CommandOptions.html +49 -49
  14. data/doc-api/classes/Kwartz/Config.html +6 -1
  15. data/doc-api/classes/Kwartz/ConvertError.html +14 -14
  16. data/doc-api/classes/Kwartz/Converter.html +31 -30
  17. data/doc-api/classes/Kwartz/CssStyleParser.html +79 -57
  18. data/doc-api/classes/Kwartz/Defun.html +313 -0
  19. data/doc-api/classes/Kwartz/DocumentRuleset.html +58 -58
  20. data/doc-api/classes/Kwartz/ElementExpander.html +32 -32
  21. data/doc-api/classes/Kwartz/ElementInfo.html +29 -29
  22. data/doc-api/classes/Kwartz/ElementRuleset.html +126 -96
  23. data/doc-api/classes/Kwartz/EperlHandler.html +108 -84
  24. data/doc-api/classes/Kwartz/EperlTranslator.html +7 -7
  25. data/doc-api/classes/Kwartz/ErubisHandler.html +2 -2
  26. data/doc-api/classes/Kwartz/ErubisTranslator.html +8 -8
  27. data/doc-api/classes/Kwartz/ErubyHandler.html +2 -220
  28. data/doc-api/classes/Kwartz/ErubyTranslator.html +7 -7
  29. data/doc-api/classes/Kwartz/ExpandStatement.html +20 -20
  30. data/doc-api/classes/Kwartz/Handler.html +122 -117
  31. data/doc-api/classes/Kwartz/HandlerArgument.html +215 -0
  32. data/doc-api/classes/Kwartz/Helper.html +112 -0
  33. data/doc-api/classes/Kwartz/Helper/ActionViewHelper.html +221 -0
  34. data/doc-api/classes/Kwartz/Helper/RailsTemplate.html +630 -0
  35. data/doc-api/classes/Kwartz/JstlHandler.html +208 -193
  36. data/doc-api/classes/Kwartz/JstlTranslator.html +15 -15
  37. data/doc-api/classes/Kwartz/KwartzError.html +6 -6
  38. data/doc-api/classes/Kwartz/Main.html +39 -23
  39. data/doc-api/classes/Kwartz/NativeExpression.html +18 -18
  40. data/doc-api/classes/Kwartz/NativeStatement.html +25 -25
  41. data/doc-api/classes/Kwartz/Node.html +6 -6
  42. data/doc-api/classes/Kwartz/PIErubisHandler.html +113 -0
  43. data/doc-api/classes/Kwartz/PIErubisTranslator.html +200 -0
  44. data/doc-api/classes/Kwartz/ParseError.html +6 -6
  45. data/doc-api/classes/Kwartz/PhpHandler.html +102 -83
  46. data/doc-api/classes/Kwartz/PhpTranslator.html +14 -14
  47. data/doc-api/classes/Kwartz/PresentationLogicParser.html +136 -128
  48. data/doc-api/classes/Kwartz/PrintStatement.html +19 -19
  49. data/doc-api/classes/Kwartz/RailsHandler.html +121 -118
  50. data/doc-api/classes/Kwartz/RailsTranslator.html +7 -7
  51. data/doc-api/classes/Kwartz/RubyHandler.html +349 -0
  52. data/doc-api/classes/Kwartz/RubyStyleParser.html +85 -85
  53. data/doc-api/classes/Kwartz/RubyTranslator.html +218 -0
  54. data/doc-api/classes/Kwartz/StatementHelper.html +479 -0
  55. data/doc-api/classes/Kwartz/StrutsTranslator.html +12 -12
  56. data/doc-api/classes/Kwartz/TagInfo.html +28 -28
  57. data/doc-api/classes/Kwartz/TextConverter.html +28 -28
  58. data/doc-api/classes/Kwartz/Translator.html +42 -42
  59. data/doc-api/classes/Kwartz/Util.html +284 -0
  60. data/doc-api/created.rid +1 -1
  61. data/doc-api/files/__/README_txt.html +30 -3
  62. data/doc-api/files/kwartz/assert_rb.html +1 -1
  63. data/doc-api/files/kwartz/binding/eperl_rb.html +2 -2
  64. data/doc-api/files/kwartz/binding/erubis_rb.html +3 -3
  65. data/doc-api/files/kwartz/binding/eruby_rb.html +3 -2
  66. data/doc-api/files/kwartz/binding/jstl_rb.html +2 -2
  67. data/doc-api/files/kwartz/binding/php_rb.html +2 -2
  68. data/doc-api/files/kwartz/binding/pierubis_rb.html +116 -0
  69. data/doc-api/files/kwartz/binding/rails_rb.html +2 -2
  70. data/doc-api/files/kwartz/binding/ruby_rb.html +115 -0
  71. data/doc-api/files/kwartz/binding/struts_rb.html +1 -1
  72. data/doc-api/files/kwartz/config_rb.html +2 -2
  73. data/doc-api/files/kwartz/converter_rb.html +3 -2
  74. data/doc-api/files/kwartz/defun_rb.html +116 -0
  75. data/doc-api/files/kwartz/error_rb.html +1 -1
  76. data/doc-api/files/kwartz/helper/rails_rb.html +123 -0
  77. data/doc-api/files/kwartz/main_rb.html +5 -2
  78. data/doc-api/files/kwartz/node_rb.html +2 -2
  79. data/doc-api/files/kwartz/parser_rb.html +2 -2
  80. data/doc-api/files/kwartz/translator_rb.html +2 -2
  81. data/doc-api/files/kwartz/util/assert-text-equal_rb.html +1 -1
  82. data/doc-api/files/kwartz/util/testcase-helper_rb.html +2 -2
  83. data/doc-api/files/kwartz/util_rb.html +107 -0
  84. data/doc-api/files/kwartz_rb.html +3 -2
  85. data/doc-api/fr_class_index.html +11 -0
  86. data/doc-api/fr_file_index.html +5 -0
  87. data/doc-api/fr_method_index.html +242 -190
  88. data/doc/p-pattern.html +94 -94
  89. data/doc/reference.html +847 -612
  90. data/doc/users-guide.html +744 -241
  91. data/examples/rails1/README +2 -2
  92. data/examples/rails1/application_helper.rb +2 -27
  93. data/examples/rails1/link_to.plogic +5 -5
  94. data/examples/rails1/list.plogic +2 -2
  95. data/examples/rails2/app/controllers/application.rb +14 -0
  96. data/examples/rails2/app/controllers/groups_controller.rb +47 -0
  97. data/examples/rails2/app/controllers/members_controller.rb +56 -0
  98. data/examples/rails2/app/helpers/application_helper.rb +6 -0
  99. data/examples/rails2/app/helpers/groups_helper.rb +2 -0
  100. data/examples/rails2/app/helpers/members_helper.rb +2 -0
  101. data/examples/rails2/app/models/group.rb +2 -0
  102. data/examples/rails2/app/models/member.rb +3 -0
  103. data/examples/rails2/app/views/groups/_form.html +30 -0
  104. data/examples/rails2/app/views/groups/_form.plogic +11 -0
  105. data/examples/rails2/app/views/groups/_link.plogic +19 -0
  106. data/examples/rails2/app/views/groups/_read.plogic +7 -0
  107. data/examples/rails2/app/views/groups/edit.cfg.yaml +2 -0
  108. data/examples/rails2/app/views/groups/edit.html +26 -0
  109. data/examples/rails2/app/views/groups/edit.plogic +9 -0
  110. data/examples/rails2/app/views/groups/list.html +48 -0
  111. data/examples/rails2/app/views/groups/list.plogic +32 -0
  112. data/examples/rails2/app/views/groups/new.cfg.yaml +2 -0
  113. data/examples/rails2/app/views/groups/new.html +27 -0
  114. data/examples/rails2/app/views/groups/new.plogic +9 -0
  115. data/examples/rails2/app/views/groups/show.html +27 -0
  116. data/examples/rails2/app/views/groups/show.plogic +2 -0
  117. data/examples/rails2/app/views/layouts/groups.html +23 -0
  118. data/examples/rails2/app/views/layouts/groups.plogic +11 -0
  119. data/examples/rails2/app/views/layouts/members.html +23 -0
  120. data/examples/rails2/app/views/layouts/members.plogic +11 -0
  121. data/examples/rails2/app/views/layouts/members2.html +24 -0
  122. data/examples/rails2/app/views/layouts/members2.plogic +11 -0
  123. data/examples/rails2/app/views/members/_form.plogic +27 -0
  124. data/examples/rails2/app/views/members/_link.plogic +19 -0
  125. data/examples/rails2/app/views/members/_read.plogic +29 -0
  126. data/examples/rails2/app/views/members/edit.cfg.yaml +6 -0
  127. data/examples/rails2/app/views/members/edit.html +27 -0
  128. data/examples/rails2/app/views/members/edit.plogic +10 -0
  129. data/examples/rails2/app/views/members/list.html +53 -0
  130. data/examples/rails2/app/views/members/list.plogic +32 -0
  131. data/examples/rails2/app/views/members/new.html +61 -0
  132. data/examples/rails2/app/views/members/new.plogic +17 -0
  133. data/examples/rails2/app/views/members/show.html +41 -0
  134. data/examples/rails2/app/views/members/show.plogic +3 -0
  135. data/examples/rails2/db/create-tables.mysql.sql +27 -0
  136. data/examples/rails2/db/create-tables.pgsql.sql +27 -0
  137. data/examples/rails2/db/insert-data.sql +21 -0
  138. data/examples/rails2/db/tabledef.yaml +51 -0
  139. data/kwartz.gemspec +4 -4
  140. data/lib/kwartz.rb +10 -2
  141. data/lib/kwartz/assert.rb +1 -1
  142. data/lib/kwartz/binding/eperl.rb +85 -61
  143. data/lib/kwartz/binding/erubis.rb +6 -8
  144. data/lib/kwartz/binding/eruby.rb +5 -120
  145. data/lib/kwartz/binding/jstl.rb +116 -101
  146. data/lib/kwartz/binding/php.rb +79 -60
  147. data/lib/kwartz/binding/pierubis.rb +58 -0
  148. data/lib/kwartz/binding/rails.rb +45 -42
  149. data/lib/kwartz/binding/ruby.rb +193 -0
  150. data/lib/kwartz/binding/struts.rb +1 -1
  151. data/lib/kwartz/config.rb +4 -3
  152. data/lib/kwartz/converter.rb +231 -68
  153. data/lib/kwartz/defun.rb +126 -0
  154. data/lib/kwartz/error.rb +1 -1
  155. data/lib/kwartz/helper/rails.rb +437 -0
  156. data/lib/kwartz/main.rb +30 -38
  157. data/lib/kwartz/node.rb +46 -31
  158. data/lib/kwartz/parser.rb +43 -15
  159. data/lib/kwartz/translator.rb +104 -6
  160. data/lib/kwartz/util.rb +113 -0
  161. data/lib/kwartz/util/assert-text-equal.rb +1 -1
  162. data/lib/kwartz/util/testcase-helper.rb +26 -8
  163. data/test/test-compile.rb +3 -3
  164. data/test/test-compile.yaml +135 -5
  165. data/test/test-converter.rb +16 -8
  166. data/test/test-converter.yaml +307 -76
  167. data/test/test-directives.rb +1 -1
  168. data/test/test-directives.yaml +964 -979
  169. data/test/test-main.rb +61 -146
  170. data/test/test-main.yaml +235 -0
  171. data/test/test-parser.rb +10 -12
  172. data/test/test-parser.yaml +484 -326
  173. data/test/test-rails.rb +1 -1
  174. data/test/test-rails.yaml +37 -37
  175. data/test/test-ruleset.rb +1 -1
  176. data/test/test-ruleset.yaml +34 -40
  177. data/test/test.rb +1 -1
  178. metadata +82 -3
  179. data/COPYING +0 -340
@@ -1,6 +1,6 @@
1
1
  ###
2
2
  ### $Rev: 117 $
3
- ### $Release: 3.0.0 $
3
+ ### $Release: 3.1.0 $
4
4
  ### copyright(c) 2004-2006 kuwata-lab.com all rights reserved
5
5
  ###
6
6
 
@@ -1,790 +1,785 @@
1
- ##
1
+ ###
2
2
  - name: elem
3
3
  subject: elem, Elem, ELEM
4
4
  desc: |
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.
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
- <b {{*title="elem: expr"*}}>foo</b>
14
- <b {{*title="Elem: expr"*}}>foo</b>
15
- <b {{*title="ELEM: expr"*}}>foo</b>
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
- <b {{*title="elem($expr)"*}}>foo</b>
19
- <b {{*title="Elem($expr)"*}}>foo</b>
20
- <b {{*title="ELEM($expr)"*}}>foo</b>
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
- <b {{*title="elem($expr)"*}}>foo</b>
24
- <b {{*title="Elem($expr)"*}}>foo</b>
25
- <b {{*title="ELEM($expr)"*}}>foo</b>
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
- <b {{*title="elem(expr)"*}}>foo</b>
29
- <b {{*title="Elem(expr)"*}}>foo</b>
30
- <b {{*title="ELEM(expr)"*}}>foo</b>
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
- {{*<%= expr %>*}}
35
- {{*<%=h expr %>*}}
36
- {{*<%= expr %>*}}
34
+ {{*<%= expr %>*}}
35
+ {{*<%=h expr %>*}}
36
+ {{*<%= expr %>*}}
37
37
 
38
38
  php: |
39
- {{*<?php echo $expr; ?>*}}
40
- {{*<?php echo htmlspecialchars($expr); ?>*}}
41
- {{*<?php echo $expr; ?>*}}
39
+ {{*<?php echo $expr; ?>*}}
40
+ {{*<?php echo htmlspecialchars($expr); ?>*}}
41
+ {{*<?php echo $expr; ?>*}}
42
42
 
43
43
  eperl: |
44
- {{*<?= $expr !>*}}
45
- {{*<?= encode_entities($expr) !>*}}
46
- {{*<?= $expr !>*}}
44
+ {{*<?= $expr !>*}}
45
+ {{*<?= encode_entities($expr) !>*}}
46
+ {{*<?= $expr !>*}}
47
47
 
48
48
  jstl: |
49
- {{*${expr}*}}
50
- {{*${expr}*}}
51
- {{*<c:out value="${expr}" escapeXml="false"/>*}}
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
- 'stag', 'Stag', and 'STAG' directive replaces start-tag by expression.
57
+ 'stag', 'Stag', and 'STAG' directive replaces start-tag by expression.
57
58
 
58
- 'Stag' directive escapes expression automatically, while 'STAG' never escape it.
59
- 'stag' directive escapes expression when command-line option '-e' is specified
60
- or PROPERTY_ESCAPE is true in configuration file.
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
- <b {{*title="stag: expr"*}}>foo</b>
65
- <b {{*title="Stag: expr"*}}>foo</b>
66
- <b {{*title="STAG: expr"*}}>foo</b>
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
- <b {{*title="stag($expr)"*}}>foo</b>
70
- <b {{*title="Stag($expr)"*}}>foo</b>
71
- <b {{*title="STAG($expr)"*}}>foo</b>
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
- <b {{*title="stag($expr)"*}}>foo</b>
75
- <b {{*title="Stag($expr)"*}}>foo</b>
76
- <b {{*title="STAG($expr)"*}}>foo</b>
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
- <b {{*title="stag(expr)"*}}>foo</b>
80
- <b {{*title="Stag(expr)"*}}>foo</b>
81
- <b {{*title="STAG(expr)"*}}>foo</b>
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
- {{*<%= expr %>*}}foo</b>
86
- {{*<%=h expr %>*}}foo</b>
87
- {{*<%= expr %>*}}foo</b>
86
+ {{*<%= expr %>*}}foo</b>
87
+ {{*<%=h expr %>*}}foo</b>
88
+ {{*<%= expr %>*}}foo</b>
88
89
 
89
90
  php: |
90
- {{*<?php echo $expr; ?>*}}foo</b>
91
- {{*<?php echo htmlspecialchars($expr); ?>*}}foo</b>
92
- {{*<?php echo $expr; ?>*}}foo</b>
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
- {{*<?= $expr !>*}}foo</b>
96
- {{*<?= encode_entities($expr) !>*}}foo</b>
97
- {{*<?= $expr !>*}}foo</b>
96
+ {{*<?= $expr !>*}}foo</b>
97
+ {{*<?= encode_entities($expr) !>*}}foo</b>
98
+ {{*<?= $expr !>*}}foo</b>
98
99
 
99
100
  jstl: |
100
- {{*${expr}*}}foo</b>
101
- {{*${expr}*}}foo</b>
102
- {{*<c:out value="${expr}" escapeXml="false"/>*}}foo</b>
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
- 'etag', 'Etag', and 'ETAG' directive replaces start-tag by expression.
108
+ 'etag', 'Etag', and 'ETAG' directive replaces start-tag by expression.
108
109
 
109
- 'Etag' directive escapes expression automatically, while 'ETAG' never escape it.
110
- 'etag' directive escapes expression when command-line option '-e' is specified
111
- or PROPERTY_ESCAPE is true in configuration file.
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
- <b {{*title="etag: expr"*}}>foo</b>
116
- <b {{*title="Etag: expr"*}}>foo</b>
117
- <b {{*title="ETAG: expr"*}}>foo</b>
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
- <b {{*title="etag($expr)"*}}>foo</b>
121
- <b {{*title="Etag($expr)"*}}>foo</b>
122
- <b {{*title="ETAG($expr)"*}}>foo</b>
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
- <b {{*title="etag($expr)"*}}>foo</b>
126
- <b {{*title="Etag($expr)"*}}>foo</b>
127
- <b {{*title="ETAG($expr)"*}}>foo</b>
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
- <b {{*title="etag(expr)"*}}>foo</b>
131
- <b {{*title="Etag(expr)"*}}>foo</b>
132
- <b {{*title="ETAG(expr)"*}}>foo</b>
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
- <b>foo{{*<%= expr %>*}}
137
- <b>foo{{*<%=h expr %>*}}
138
- <b>foo{{*<%= expr %>*}}
137
+ <b>foo{{*<%= expr %>*}}
138
+ <b>foo{{*<%=h expr %>*}}
139
+ <b>foo{{*<%= expr %>*}}
139
140
 
140
141
  php: |
141
- <b>foo{{*<?php echo $expr; ?>*}}
142
- <b>foo{{*<?php echo htmlspecialchars($expr); ?>*}}
143
- <b>foo{{*<?php echo $expr; ?>*}}
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
- <b>foo{{*<?= $expr !>*}}
147
- <b>foo{{*<?= encode_entities($expr) !>*}}
148
- <b>foo{{*<?= $expr !>*}}
147
+ <b>foo{{*<?= $expr !>*}}
148
+ <b>foo{{*<?= encode_entities($expr) !>*}}
149
+ <b>foo{{*<?= $expr !>*}}
149
150
 
150
151
  jstl: |
151
- <b>foo{{*${expr}*}}
152
- <b>foo{{*${expr}*}}
153
- <b>foo{{*<c:out value="${expr}" escapeXml="false"/>*}}
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
- 'cont', 'Cont', and 'CONT' directives replace content by expression.
160
+ 'cont', 'Cont', and 'CONT' directives replace content by expression.
160
161
 
161
- 'Cont' directive escapes expression automatically, while 'CONT' never escape it.
162
- 'cont' directive escapes expression when command-line option '-e' is specified
163
- or PROPERTY_ESCAPE is true in configuration file.
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
- <b {{*title="cont: expr"*}}>foo</b>
168
- <b {{*title="Cont: expr"*}}>foo</b>
169
- <b {{*title="CONT: expr"*}}>foo</b>
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
- <b {{*title="cont($expr)"*}}>foo</b>
173
- <b {{*title="Cont($expr)"*}}>foo</b>
174
- <b {{*title="CONT($expr)"*}}>foo</b>
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
- <b {{*title="cont($expr)"*}}>foo</b>
178
- <b {{*title="Cont($expr)"*}}>foo</b>
179
- <b {{*title="CONT($expr)"*}}>foo</b>
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
- <b {{*title="cont(expr)"*}}>foo</b>
183
- <b {{*title="Cont(expr)"*}}>foo</b>
184
- <b {{*title="CONT(expr)"*}}>foo</b>
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
- <b>{{*<%= expr %>*}}</b>
189
- <b>{{*<%=h expr %>*}}</b>
190
- <b>{{*<%= expr %>*}}</b>
189
+ <b>{{*<%= expr %>*}}</b>
190
+ <b>{{*<%=h expr %>*}}</b>
191
+ <b>{{*<%= expr %>*}}</b>
191
192
 
192
193
  php: |
193
- <b>{{*<?php echo $expr; ?>*}}</b>
194
- <b>{{*<?php echo htmlspecialchars($expr); ?>*}}</b>
195
- <b>{{*<?php echo $expr; ?>*}}</b>
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
- <b>{{*<?= $expr !>*}}</b>
199
- <b>{{*<?= encode_entities($expr) !>*}}</b>
200
- <b>{{*<?= $expr !>*}}</b>
199
+ <b>{{*<?= $expr !>*}}</b>
200
+ <b>{{*<?= encode_entities($expr) !>*}}</b>
201
+ <b>{{*<?= $expr !>*}}</b>
201
202
 
202
203
  jstl: |
203
- <b>{{*${expr}*}}</b>
204
- <b>{{*${expr}*}}</b>
205
- <b>{{*<c:out value="${expr}" escapeXml="false"/>*}}</b>
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
- 'value', 'Value', and 'VALUE' directives are equivalent to
213
- 'cont', 'Cont', and 'CONT' directives respectively.
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
- <b {{*title="value: expr"*}}>foo</b>
218
- <b {{*title="Value: expr"*}}>foo</b>
219
- <b {{*title="VALUE: expr"*}}>foo</b>
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
- <b {{*title="value($expr)"*}}>foo</b>
223
- <b {{*title="Value($expr)"*}}>foo</b>
224
- <b {{*title="VALUE($expr)"*}}>foo</b>
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
- <b {{*title="value($expr)"*}}>foo</b>
228
- <b {{*title="Value($expr)"*}}>foo</b>
229
- <b {{*title="VALUE($expr)"*}}>foo</b>
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
- <b {{*title="value(expr)"*}}>foo</b>
233
- <b {{*title="Value(expr)"*}}>foo</b>
234
- <b {{*title="VALUE(expr)"*}}>foo</b>
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
- <b>{{*<%= expr %>*}}</b>
239
- <b>{{*<%=h expr %>*}}</b>
240
- <b>{{*<%= expr %>*}}</b>
238
+ <b>{{*<%= expr %>*}}</b>
239
+ <b>{{*<%=h expr %>*}}</b>
240
+ <b>{{*<%= expr %>*}}</b>
241
241
 
242
242
  php: |
243
- <b>{{*<?php echo $expr; ?>*}}</b>
244
- <b>{{*<?php echo htmlspecialchars($expr); ?>*}}</b>
245
- <b>{{*<?php echo $expr; ?>*}}</b>
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
- <b>{{*<?= $expr !>*}}</b>
249
- <b>{{*<?= encode_entities($expr) !>*}}</b>
250
- <b>{{*<?= $expr !>*}}</b>
248
+ <b>{{*<?= $expr !>*}}</b>
249
+ <b>{{*<?= encode_entities($expr) !>*}}</b>
250
+ <b>{{*<?= $expr !>*}}</b>
251
251
 
252
252
  jstl: |
253
- <b>{{*${expr}*}}</b>
254
- <b>{{*${expr}*}}</b>
255
- <b>{{*<c:out value="${expr}" escapeXml="false"/>*}}</b>
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
- 'foreach' directive interates element, while 'loop' directive iterates content.
261
+ 'foreach' directive interates element, while 'loop' directive iterates content.
263
262
 
264
263
  pdata*:
265
264
  eruby: |
266
- <tr {{*title="for item in list"*}}>
267
- <td title="cont item">foo</td>
268
- </tr>
265
+ <tr {{*kw:d="for item in list"*}}>
266
+ <td kw:d="cont item">foo</td>
267
+ </tr>
269
268
 
270
- <tr {{*title="for key,value in hash"*}}>
271
- <td title="cont key">key</td>
272
- <td title="cont value">value</td>
273
- </tr>
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
- <tr {{*title="foreach($list as $item)"*}}>
277
- <td title="cont($item)">foo</td>
278
- </tr>
275
+ <tr {{*kw:d="foreach($list as $item)"*}}>
276
+ <td kw:d="cont($item)">foo</td>
277
+ </tr>
279
278
 
280
- <tr {{*title="foreach($hash as $key=>$value)"*}}>
281
- <td title="cont($key)">key</td>
282
- <td title="cont($value)">value</td>
283
- </tr>
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
- <tr {{*title="foreach($item in @list)"*}}>
287
- <td title="cont($item)">foo</td>
288
- </tr>
285
+ <tr {{*kw:d="foreach($item in @list)"*}}>
286
+ <td kw:d="cont($item)">foo</td>
287
+ </tr>
289
288
 
290
- <tr {{*title="foreach($key,$value in %hash)"*}}>
291
- <td title="cont($key)">key</td>
292
- <td title="cont($value)">value</td>
293
- </tr>
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
- <tr {{*title="for(item: list)"*}}>
297
- <td title="cont(item)">foo</td>
298
- </tr>
295
+ <tr {{*kw:d="for(item: list)"*}}>
296
+ <td kw:d="cont(item)">foo</td>
297
+ </tr>
299
298
 
300
- <tr {{*title="forEach(:var=>'v', :items=>:'params.list', :varStatus=>'status')"*}}>
301
- <td title="cont(status.index)">1</td>
302
- <td title="cont(v)"></td>
303
- </tr>
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
- <tr {{*title="forEach(:var=>'n', :begin=>1, :end=>10, :step=>2)"*}}>
306
- <td title="cont(n)">key</td>
307
- </tr>
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
- {{*<% for item in list do %>*}}
312
- <tr>
313
- <td><%= item %></td>
314
- </tr>
315
- {{*<% end %>*}}
316
-
317
- {{*<% hash.each do |key, value| %>*}}
318
- <tr>
319
- <td><%= key %></td>
320
- <td><%= value %></td>
321
- </tr>
322
- {{*<% end %>*}}
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
- {{*<?php foreach ($list as $item) { ?>*}}
326
- <tr>
327
- <td><?php echo $item; ?></td>
328
- </tr>
329
- {{*<?php } ?>*}}
330
-
331
- {{*<?php foreach ($hash as $key=>$value) { ?>*}}
332
- <tr>
333
- <td><?php echo $key; ?></td>
334
- <td><?php echo $value; ?></td>
335
- </tr>
336
- {{*<?php } ?>*}}
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
- {{*<? foreach my $item (@list) { !>*}}
340
- <tr>
341
- <td><?= $item !></td>
342
- </tr>
343
- {{*<? } !>*}}
344
-
345
- {{*<? foreach my $key (keys %hash) { !>*}}
346
- {{*<? my $value = $hash{$key}; !>*}}
347
- <tr>
348
- <td><?= $key !></td>
349
- <td><?= $value !></td>
350
- </tr>
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
- {{*<c:forEach var="item" items="${list}">*}}
355
- <tr>
356
- <td>${item}</td>
357
- </tr>
358
- {{*</c:forEach>*}}
359
-
360
- {{*<c:forEach var="v" items="${params.list}" varStatus="status">*}}
361
- <tr>
362
- <td>${status.index}</td>
363
- <td>${v}</td>
364
- </tr>
365
- {{*</c:forEach>*}}
366
-
367
- {{*<c:forEach var="n" begin="1" end="10" step="2">*}}
368
- <tr>
369
- <td>${n}</td>
370
- </tr>
371
- {{*</c:forEach>*}}
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
- 'list' directive interates content, while 'foreach' directive iterates element.
376
+ 'list' directive interates content, while 'foreach' directive iterates element.
379
377
 
380
378
  pdata*:
381
379
  eruby: |
382
- <tr {{*title="list item in list"*}}>
383
- <td title="cont item">foo</td>
384
- </tr>
380
+ <tr {{*kw:d="list item in list"*}}>
381
+ <td kw:d="cont item">foo</td>
382
+ </tr>
385
383
 
386
- <tr {{*title="list key,value in hash"*}}>
387
- <td title="cont key">key</td>
388
- <td title="cont value">value</td>
389
- </tr>
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
- <tr {{*title="list($list as $item)"*}}>
393
- <td title="cont($item)">foo</td>
394
- </tr>
390
+ <tr {{*kw:d="list($list as $item)"*}}>
391
+ <td kw:d="cont($item)">foo</td>
392
+ </tr>
395
393
 
396
- <tr {{*title="list($hash as $key=>$value)"*}}>
397
- <td title="cont($key)">key</td>
398
- <td title="cont($value)">value</td>
399
- </tr>
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
- <tr {{*title="list($item in @list)"*}}>
403
- <td title="cont($item)">foo</td>
404
- </tr>
400
+ <tr {{*kw:d="list($item in @list)"*}}>
401
+ <td kw:d="cont($item)">foo</td>
402
+ </tr>
405
403
 
406
- <tr {{*title="list($key,$value in %hash)"*}}>
407
- <td title="cont($key)">key</td>
408
- <td title="cont($value)">value</td>
409
- </tr>
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
- <tr {{*title="list(item: list)"*}}>
413
- <td title="cont(item)">foo</td>
414
- </tr>
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
- <tr>
419
- {{*<% for item in list do %>*}}
420
- <td><%= item %></td>
421
- {{*<% end %>*}}
422
- </tr>
423
-
424
- <tr>
425
- {{*<% hash.each do |key, value| %>*}}
426
- <td><%= key %></td>
427
- <td><%= value %></td>
428
- {{*<% end %>*}}
429
- </tr>
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
- <tr>
433
- {{*<?php foreach ($list as $item) { ?>*}}
434
- <td><?php echo $item; ?></td>
435
- {{*<?php } ?>*}}
436
- </tr>
437
-
438
- <tr>
439
- {{*<?php foreach ($hash as $key=>$value) { ?>*}}
440
- <td><?php echo $key; ?></td>
441
- <td><?php echo $value; ?></td>
442
- {{*<?php } ?>*}}
443
- </tr>
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
- <tr>
447
- {{*<? foreach my $item (@list) { !>*}}
448
- <td><?= $item !></td>
449
- {{*<? } !>*}}
450
- </tr>
451
-
452
- <tr>
453
- {{*<? foreach my $key (keys %hash) { !>*}}
454
- {{*<? my $value = $hash{$key}; !>*}}
455
- <td><?= $key !></td>
456
- <td><?= $value !></td>
457
- {{*<? } !>*}}
458
- </tr>
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
- <tr>
462
- {{*<c:forEach var="item" items="${list}">*}}
463
- <td>${item}</td>
464
- {{*</c:forEach>*}}
465
- </tr>
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
- 'Foreach' and 'List' directives iterate element or content with loop counter
473
- (starting with 1).
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
- <tr {{*title="For item in list"*}}>
478
- <td title="cont item">foo</td>
479
- </tr>
474
+ <tr {{*kw:d="For item in list"*}}>
475
+ <td kw:d="cont item">foo</td>
476
+ </tr>
480
477
 
481
- <tr {{*title="List item in list"*}}>
482
- <td title="cont item">foo</td>
483
- </tr>
478
+ <tr {{*kw:d="List item in list"*}}>
479
+ <td kw:d="cont item">foo</td>
480
+ </tr>
484
481
 
485
482
  php: |
486
- <tr {{*title="Foreach($list as $item)"*}}>
487
- <td title="cont($item)">foo</td>
488
- </tr>
483
+ <tr {{*kw:d="Foreach($list as $item)"*}}>
484
+ <td kw:d="cont($item)">foo</td>
485
+ </tr>
489
486
 
490
- <tr {{*title="List($list as $item)"*}}>
491
- <td title="cont($item)">foo</td>
492
- </tr>
487
+ <tr {{*kw:d="List($list as $item)"*}}>
488
+ <td kw:d="cont($item)">foo</td>
489
+ </tr>
493
490
 
494
491
  eperl: |
495
- <tr {{*title="Foreach($item in @list)"*}}>
496
- <td title="cont($item)">foo</td>
497
- </tr>
492
+ <tr {{*kw:d="Foreach($item in @list)"*}}>
493
+ <td kw:d="cont($item)">foo</td>
494
+ </tr>
498
495
 
499
- <tr {{*title="List($item in @list)"*}}>
500
- <td title="cont($item)">foo</td>
501
- </tr>
496
+ <tr {{*kw:d="List($item in @list)"*}}>
497
+ <td kw:d="cont($item)">foo</td>
498
+ </tr>
502
499
 
503
500
  jstl: |
504
- <tr {{*title="For(item: list)"*}}>
505
- <td title="cont(item)">foo</td>
506
- </tr>
501
+ <tr {{*kw:d="For(item: list)"*}}>
502
+ <td kw:d="cont(item)">foo</td>
503
+ </tr>
507
504
 
508
- <tr {{*title="List(item: list)"*}}>
509
- <td title="cont(item)">foo</td>
510
- </tr>
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
- {{*<% item_ctr = 0 %>*}}
515
- {{*<% for item in list do %>*}}
516
- {{*<% item_ctr += 1 %>*}}
517
- <tr>
518
- <td><%= item %></td>
519
- </tr>
520
- {{*<% end %>*}}
521
-
522
- <tr>
523
- {{*<% item_ctr = 0 %>*}}
524
- {{*<% for item in list do %>*}}
525
- {{*<% item_ctr += 1 %>*}}
526
- <td><%= item %></td>
527
- {{*<% end %>*}}
528
- </tr>
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
- {{*<?php $item_ctr = 0; ?>*}}
532
- {{*<?php foreach ($list as $item) { ?>*}}
533
- {{*<?php $item_ctr++; ?>*}}
534
- <tr>
535
- <td><?php echo $item; ?></td>
536
- </tr>
537
- {{*<?php } ?>*}}
538
-
539
- <tr>
540
- {{*<?php $item_ctr = 0; ?>*}}
541
- {{*<?php foreach ($list as $item) { ?>*}}
542
- {{*<?php $item_ctr++; ?>*}}
543
- <td><?php echo $item; ?></td>
544
- {{*<?php } ?>*}}
545
- </tr>
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
- {{*<? my $item_ctr = 0; !>*}}
549
- {{*<? foreach my $item (@list) { !>*}}
550
- {{*<? $item_ctr++; !>*}}
551
- <tr>
552
- <td><?= $item !></td>
553
- </tr>
554
- {{*<? } !>*}}
555
-
556
- <tr>
557
- {{*<? my $item_ctr = 0; !>*}}
558
- {{*<? foreach my $item (@list) { !>*}}
559
- {{*<? $item_ctr++; !>*}}
560
- <td><?= $item !></td>
561
- {{*<? } !>*}}
562
- </tr>
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
- {{*<c:forEach var="item" items="${list}" varStatus="item_status">*}}
566
- {{*<c:set var="item_ctr" value="${item_status.count}" />*}}
567
- <tr>
568
- <td>${item}</td>
569
- </tr>
570
- {{*</c:forEach>*}}
571
-
572
- <tr>
573
- {{*<c:forEach var="item" items="${list}" varStatus="item_status">*}}
574
- {{*<c:set var="item_ctr" value="${item_status.count}" />*}}
575
- <td>${item}</td>
576
- {{*</c:forEach>*}}
577
- </tr>
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
- 'FOREACH' and 'LIST' directives iterate element or content with loop counter
584
- and toggle variable.
585
- Toggle values are "'odd'" and "'even'" in default.
586
- You can change them by command-line option '--odd' and '--even'
587
- or by properties(PROPERTY_ODD, PROPERTY_EVEN) in configuration file.
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
- <tr {{*title="FOR item in list"*}}>
592
- <td title="cont item">foo</td>
593
- </tr>
588
+ <tr {{*kw:d="FOR item in list"*}}>
589
+ <td kw:d="cont item">foo</td>
590
+ </tr>
594
591
 
595
- <tr {{*title="LIST item in list"*}}>
596
- <td title="cont item">foo</td>
597
- </tr>
592
+ <tr {{*kw:d="LIST item in list"*}}>
593
+ <td kw:d="cont item">foo</td>
594
+ </tr>
598
595
 
599
596
  php: |
600
- <tr {{*title="FOREACH($list as $item)"*}}>
601
- <td title="cont($item)">foo</td>
602
- </tr>
597
+ <tr {{*kw:d="FOREACH($list as $item)"*}}>
598
+ <td kw:d="cont($item)">foo</td>
599
+ </tr>
603
600
 
604
- <tr {{*title="LIST($list as $item)"*}}>
605
- <td title="cont($item)">foo</td>
606
- </tr>
601
+ <tr {{*kw:d="LIST($list as $item)"*}}>
602
+ <td kw:d="cont($item)">foo</td>
603
+ </tr>
607
604
 
608
605
  eperl: |
609
- <tr {{*title="FOREACH($item in @list)"*}}>
610
- <td title="cont($item)">foo</td>
611
- </tr>
606
+ <tr {{*kw:d="FOREACH($item in @list)"*}}>
607
+ <td kw:d="cont($item)">foo</td>
608
+ </tr>
612
609
 
613
- <tr {{*title="LIST($item in @list)"*}}>
614
- <td title="cont($item)">foo</td>
615
- </tr>
610
+ <tr {{*kw:d="LIST($item in @list)"*}}>
611
+ <td kw:d="cont($item)">foo</td>
612
+ </tr>
616
613
 
617
614
  jstl: |
618
- <tr {{*title="FOR(item: list)"*}}>
619
- <td title="cont(item)">foo</td>
620
- </tr>
615
+ <tr {{*kw:d="FOR(item: list)"*}}>
616
+ <td kw:d="cont(item)">foo</td>
617
+ </tr>
621
618
 
622
- <tr {{*title="LIST(item: list)"*}}>
623
- <td title="cont(item)">foo</td>
624
- </tr>
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
- {{*<% item_ctr = 0 %>*}}
629
- {{*<% for item in list do %>*}}
630
- {{*<% item_ctr += 1 %>*}}
631
- {{*<% item_tgl = item_ctr%2==0 ? 'even' : 'odd' %>*}}
632
- <tr>
633
- <td><%= item %></td>
634
- </tr>
635
- {{*<% end %>*}}
636
-
637
- <tr>
638
- {{*<% item_ctr = 0 %>*}}
639
- {{*<% for item in list do %>*}}
640
- {{*<% item_ctr += 1 %>*}}
641
- {{*<% item_tgl = item_ctr%2==0 ? 'even' : 'odd' %>*}}
642
- <td><%= item %></td>
643
- {{*<% end %>*}}
644
- </tr>
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
- {{*<?php $item_ctr = 0; ?>*}}
648
- {{*<?php foreach ($list as $item) { ?>*}}
649
- {{*<?php $item_ctr++; ?>*}}
650
- {{*<?php $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; ?>*}}
651
- <tr>
652
- <td><?php echo $item; ?></td>
653
- </tr>
654
- {{*<?php } ?>*}}
655
-
656
- <tr>
657
- {{*<?php $item_ctr = 0; ?>*}}
658
- {{*<?php foreach ($list as $item) { ?>*}}
659
- {{*<?php $item_ctr++; ?>*}}
660
- {{*<?php $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; ?>*}}
661
- <td><?php echo $item; ?></td>
662
- {{*<?php } ?>*}}
663
- </tr>
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
- {{*<? my $item_ctr = 0; !>*}}
667
- {{*<? foreach my $item (@list) { !>*}}
668
- {{*<? $item_ctr++; !>*}}
669
- {{*<? my $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; !>*}}
670
- <tr>
671
- <td><?= $item !></td>
672
- </tr>
673
- {{*<? } !>*}}
674
-
675
- <tr>
676
- {{*<? my $item_ctr = 0; !>*}}
677
- {{*<? foreach my $item (@list) { !>*}}
678
- {{*<? $item_ctr++; !>*}}
679
- {{*<? my $item_tgl = $item_ctr%2==0 ? 'even' : 'odd'; !>*}}
680
- <td><?= $item !></td>
681
- {{*<? } !>*}}
682
- </tr>
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
- {{*<c:forEach var="item" items="${list}" varStatus="item_status">*}}
686
- {{*<c:set var="item_ctr" value="${item_status.count}" />*}}
687
- {{*<c:set var="item_tgl" value="${item_status.count%2==0 ? 'even' : 'odd'}" />*}}
688
- <tr>
689
- <td>${item}</td>
690
- </tr>
691
- {{*</c:forEach>*}}
692
-
693
- <tr>
694
- {{*<c:forEach var="item" items="${list}" varStatus="item_status">*}}
695
- {{*<c:set var="item_ctr" value="${item_status.count}" />*}}
696
- {{*<c:set var="item_tgl" value="${item_status.count%2==0 ? 'even' : 'odd'}" />*}}
697
- <td>${item}</td>
698
- {{*</c:forEach>*}}
699
- </tr>
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
- 'while' and 'loop' directive iterates element or content
707
- until conditional expression is false.
702
+ 'while' and 'loop' directive iterates element or content
703
+ until conditional expression is false.
708
704
 
709
- JSTL doesn't support these directives because JSTL doesn't have
710
- 'while' custom tag.
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
- <tr {{*title="while (item = dbh.fetch) != nil"*}}>
715
- <td title="cont item.name">foo</td>
716
- </tr>
710
+ <tr {{*kw:d="while (item = dbh.fetch) != nil"*}}>
711
+ <td kw:d="cont item.name">foo</td>
712
+ </tr>
717
713
 
718
- <tr {{*title="loop (item = dbh.fetch) != nil"*}}>
719
- <td title="cont item.name">foo</td>
720
- </tr>
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
- <tr {{*title="while(($item = $dbh->fetch()) != null)"*}}>
724
- <td title="cont($item->name)">foo</td>
725
- </tr>
719
+ <tr {{*kw:d="while(($item = $dbh->fetch()) != null)"*}}>
720
+ <td kw:d="cont($item->name)">foo</td>
721
+ </tr>
726
722
 
727
- <tr {{*title="loop(($item = $dbh->fetch()) != null)"*}}>
728
- <td title="cont($item->name)">foo</td>
729
- </tr>
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
- <tr {{*title="while(($item = $dbh->fetch()) != null)"*}}>
733
- <td title="cont($item->name)">foo</td>
734
- </tr>
728
+ <tr {{*kw:d="while(($item = $dbh->fetch()) != null)"*}}>
729
+ <td kw:d="cont($item->name)">foo</td>
730
+ </tr>
735
731
 
736
- <tr {{*title="loop(($item = $dbh->fetch()) != null)"*}}>
737
- <td title="cont($item->name)">foo</td>
738
- </tr>
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
- *** not supported ***
737
+ *** not supported ***
742
738
 
743
739
  expected*:
744
740
  eruby: |
745
- {{*<% while (item = dbh.fetch) != nil do %>*}}
746
- <tr>
747
- <td><%= item.name %></td>
748
- </tr>
749
- {{*<% end %>*}}
750
-
751
- <tr>
752
- {{*<% while (item = dbh.fetch) != nil do %>*}}
753
- <td><%= item.name %></td>
754
- {{*<% end %>*}}
755
- </tr>
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
- {{*<?php while (($item = $dbh->fetch()) != null) { ?>*}}
759
- <tr>
760
- <td><?php echo $item->name; ?></td>
761
- </tr>
762
- {{*<?php } ?>*}}
763
-
764
- <tr>
765
- {{*<?php while (($item = $dbh->fetch()) != null) { ?>*}}
766
- <td><?php echo $item->name; ?></td>
767
- {{*<?php } ?>*}}
768
- </tr>
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
- {{*<? while (($item = $dbh->fetch()) != null) { !>*}}
772
- <tr>
773
- <td><?= $item->name !></td>
774
- </tr>
775
- {{*<? } !>*}}
776
-
777
- <tr>
778
- {{*<? while (($item = $dbh->fetch()) != null) { !>*}}
779
- <td><?= $item->name !></td>
780
- {{*<? } !>*}}
781
- </tr>
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
- *** not supported ***
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
- <div {{*title="if status=='error'"*}}>
799
- <p class="error" title="cont mesg">error</p>
800
- </div>
801
- <div {{*title="elsif status=='warning'"*}}>
802
- <p class="warning" title="cont mesg">waring</p>
803
- </div>
804
- <div {{*title="else"*}}>
805
- <p title="cont mesg">mesg</p>
806
- </div>
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
- <div {{*title="if($status=='error')"*}}>
810
- <p class="error" title="cont($mesg)">error</p>
811
- </div>
812
- <div {{*title="elseif($status=='warning')"*}}>
813
- <p class="warning" title="cont($mesg)">waring</p>
814
- </div>
815
- <div {{*title="else"*}}>
816
- <p title="cont($mesg)">mesg</p>
817
- </div>
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
- <div {{*title="if($status=='error')"*}}>
821
- <p class="error" title="cont($mesg)">error</p>
822
- </div>
823
- <div {{*title="elsif($status=='warning')"*}}>
824
- <p class="warning" title="cont($mesg)">waring</p>
825
- </div>
826
- <div {{*title="else"*}}>
827
- <p title="cont($mesg)">mesg</p>
828
- </div>
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
- <div {{*title="if(status=='error')"*}}>
832
- <p class="error" title="cont(mesg)">error</p>
833
- </div>
834
- <div {{*title="elseif(status=='warning')"*}}>
835
- <p class="warning" title="cont(mesg)">waring</p>
836
- </div>
837
- <div {{*title="else"*}}>
838
- <p title="cont(mesg)">mesg</p>
839
- </div>
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
- {{*<% if status=='error' then %>*}}
844
- <div>
845
- <p class="error"><%= mesg %></p>
846
- </div>
847
- {{*<% elsif status=='warning' then %>*}}
848
- <div>
849
- <p class="warning"><%= mesg %></p>
850
- </div>
851
- {{*<% else %>*}}
852
- <div>
853
- <p><%= mesg %></p>
854
- </div>
855
- {{*<% end %>*}}
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
- {{*<?php if ($status=='error') { ?>*}}
859
- <div>
860
- <p class="error"><?php echo $mesg; ?></p>
861
- </div>
862
- {{*<?php } elseif ($status=='warning') { ?>*}}
863
- <div>
864
- <p class="warning"><?php echo $mesg; ?></p>
865
- </div>
866
- {{*<?php } else { ?>*}}
867
- <div>
868
- <p><?php echo $mesg; ?></p>
869
- </div>
870
- {{*<?php } ?>*}}
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
- {{*<? if ($status=='error') { !>*}}
874
- <div>
875
- <p class="error"><?= $mesg !></p>
876
- </div>
877
- {{*<? } elsif ($status=='warning') { !>*}}
878
- <div>
879
- <p class="warning"><?= $mesg !></p>
880
- </div>
881
- {{*<? } else { !>*}}
882
- <div>
883
- <p><?= $mesg !></p>
884
- </div>
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
- {{*<c:choose><c:when test="${status=='error'}">*}}
889
- <div>
890
- <p class="error">${mesg}</p>
891
- </div>
892
- {{*</c:when><c:when test="${status=='warning'}">*}}
893
- <div>
894
- <p class="warning">${mesg}</p>
895
- </div>
896
- {{*</c:when><c:otherwise>*}}
897
- <div>
898
- <p>${mesg}</p>
899
- </div>
900
- {{*</c:otherwise></c:choose>*}}
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
- 'set' directive executes any expression.
901
+ 'set' directive executes any expression.
908
902
 
909
903
  pdata*:
910
904
  eruby: |
911
- <tr {{*title="set color=i%2==0 ? 'red' : 'blue'"*}}>
912
- <td title="cont: color">red</td>
913
- </tr>
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
- <tr {{*title="set($color=$i%2==0 ? 'red' : 'blue')"*}}>
917
- <td title="cont($color)">red</td>
918
- </tr>
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
- <tr {{*title="set($color=i%2==0 ? 'red' : 'blue')"*}}>
922
- <td title="cont($color)">red</td>
923
- </tr>
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
- <tr {{*title="set(color=i%2==0 ? 'red' : 'blue')"*}}>
927
- <td title="cont(color)">red</td>
928
- </tr>
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
- {{*<% color=i%2==0 ? 'red' : 'blue' %>*}}
933
- <tr>
934
- <td><%= color %></td>
935
- </tr>
926
+ {{*<% color=i%2==0 ? 'red' : 'blue' %>*}}
927
+ <tr>
928
+ <td><%= color %></td>
929
+ </tr>
936
930
 
937
931
  php: |
938
- {{*<?php $color=$i%2==0 ? 'red' : 'blue'; ?>*}}
939
- <tr>
940
- <td><?php echo $color; ?></td>
941
- </tr>
932
+ {{*<?php $color=$i%2==0 ? 'red' : 'blue'; ?>*}}
933
+ <tr>
934
+ <td><?php echo $color; ?></td>
935
+ </tr>
942
936
 
943
937
  eperl: |
944
- {{*<? $color=i%2==0 ? 'red' : 'blue'; !>*}}
945
- <tr>
946
- <td><?= $color !></td>
947
- </tr>
938
+ {{*<? $color=i%2==0 ? 'red' : 'blue'; !>*}}
939
+ <tr>
940
+ <td><?= $color !></td>
941
+ </tr>
948
942
 
949
943
  jstl: |
950
- {{*<c:set var="color=i%2=" value="${0 ? 'red' : 'blue'}" />*}}
951
- <tr>
952
- <td>${color}</td>
953
- </tr>
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
- 'mark' directive marks the element by name.
961
- Name is used as selector of ruleset in presentation logic file.
962
- Id attribute is equivalent to 'mark' directive if other direcitve is not specified.
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
- 'mark' directive is language-independent when used with id attribute.
957
+ 'mark' directive is language-independent when used with id attribute.
965
958
 
966
959
  pdata*:
967
960
  eruby: |
968
- <ul {{*id="mark:list"*}}>
969
- <li {{*title="id: item"*}}>foo</li>
970
- </ul>
961
+ <ul {{*id="mark:list"*}}>
962
+ <li {{*kw:d="id: item"*}}>foo</li>
963
+ </ul>
971
964
 
972
965
  php: |
973
- <ul {{*id="mark:list"*}}>
974
- <li {{*title="id(item)"*}}>foo</li>
975
- </ul>
966
+ <ul {{*id="mark:list"*}}>
967
+ <li {{*kw:d="id(item)"*}}>foo</li>
968
+ </ul>
976
969
 
977
970
  eperl: |
978
- <ul {{*id="mark:list"*}}>
979
- <li {{*title="id(item)"*}}>foo</li>
980
- </ul>
971
+ <ul {{*id="mark:list"*}}>
972
+ <li {{*kw:d="id(item)"*}}>foo</li>
973
+ </ul>
981
974
 
982
975
  jstl: |
983
- <ul {{*id="mark:list"*}}>
984
- <li {{*title="id(item)"*}}>foo</li>
985
- </ul>
976
+ <ul {{*id="mark:list"*}}>
977
+ <li {{*kw:d="id(item)"*}}>foo</li>
978
+ </ul>
986
979
 
987
980
  expected*:
988
981
  eruby: |
989
- <ul>
990
- <li>foo</li>
991
- </ul>
982
+ <ul>
983
+ <li>foo</li>
984
+ </ul>
992
985
 
993
986
  php: |
994
- <ul>
995
- <li>foo</li>
996
- </ul>
987
+ <ul>
988
+ <li>foo</li>
989
+ </ul>
997
990
 
998
991
  eperl: |
999
- <ul>
1000
- <li>foo</li>
1001
- </ul>
992
+ <ul>
993
+ <li>foo</li>
994
+ </ul>
1002
995
 
1003
996
  jstl: |
1004
- <ul>
1005
- <li>foo</li>
1006
- </ul>
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
- 'attr', 'Attr', and 'ATTR' directives replace attribute value with expression.
1014
- 'Attr' directive escapes expression automatically, while 'ATTR' never escape it.
1015
- 'attr' directive escapes expression when command-line option '-e' is specified
1016
- or PROPERTY_ESCAPE is true in configuration file.
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
- More than one directives are available in an element with separating by ';',
1019
- and available with other directive.
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
- <tr class="odd"
1024
- title="FOR v in list; {{*attr: 'class' v_tgl; attr: 'style' style*}}">
1025
- <td title="cont v.name">foo</td>
1026
- </tr>
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
- <tr class="odd"
1030
- title="FOREACH($list as $v); {{*attr('class',$v_tgl); attr('style',$style)*}}">
1031
- <td title="cont($v->name)">foo</td>
1032
- </tr>
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
- <tr class="odd"
1036
- title="FOREACH($v in @list); {{*attr('class',$v_tgl); attr('style',$style)*}}">
1037
- <td title="cont($v->name)">foo</td>
1038
- </tr>
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
- <tr class="odd"
1042
- title="FOR(v: list); {{*attr('class',v_tgl); attr('style',style)*}}">
1043
- <td title="cont(v.name)">foo</td>
1044
- </tr>
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
- <% v_ctr = 0 %>
1049
- <% for v in list do %>
1050
- <% v_ctr += 1 %>
1051
- <% v_tgl = v_ctr%2==0 ? 'even' : 'odd' %>
1052
- <tr {{*class="<%= v_tgl %>"*}} {{*style="<%= style %>">*}}
1053
- <td><%= v.name %></td>
1054
- </tr>
1055
- <% end %>
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
- <?php $v_ctr = 0; ?>
1059
- <?php foreach ($list as $v) { ?>
1060
- <?php $v_ctr++; ?>
1061
- <?php $v_tgl = $v_ctr%2==0 ? 'even' : 'odd'; ?>
1062
- <tr {{*class="<?php echo $v_tgl; ?>"*}} {{*style="<?php echo $style; ?>"*}}>
1063
- <td><?php echo $v->name; ?></td>
1064
- </tr>
1065
- <?php } ?>
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
- <? my $v_ctr = 0; !>
1069
- <? foreach my $v (@list) { !>
1070
- <? $v_ctr++; !>
1071
- <? my $v_tgl = $v_ctr%2==0 ? 'even' : 'odd'; !>
1072
- <tr {{*class="<?= $v_tgl !>"*}} {{*style="<?= $style !>"*}}>
1073
- <td><?= $v->name !></td>
1074
- </tr>
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
- <c:forEach var="v" items="${list}" varStatus="v_status">
1079
- <c:set var="v_ctr" value="${v_status.count}" />
1080
- <c:set var="v_tgl" value="${v_status.count%2==0 ? 'even' : 'odd'}" />
1081
- <tr {{*class="${v_tgl}"*}} {{*style="${style}"*}}>
1082
- <td>${v.name}</td>
1083
- </tr>
1084
- </c:forEach>
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
- 'append', 'Append', and 'APPEND' directives append expression at the end of start-tag.
1092
- 'Append' directive escapes expression automatically, while 'APPEND' never escape it.
1093
- 'append' directive escapes expression when command-line option '-e' is specified
1094
- or PROPERTY_ESCAPE is true in configuration file.
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
- More than one directives are available in an element with separating by ';',
1097
- and available with other directive.
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
- <input type="checkbox"
1102
- {{*title="append: flag1 ? ' checked=\'checked\'' : ''"*}}>
1092
+ <input type="checkbox"
1093
+ {{*kw:d="append: flag1 ? ' checked=\'checked\'' : ''"*}}>
1103
1094
  # <input type="checkbox" name="flag" value="y"
1104
- # title="append: flag1 ? ' checked=\'checked\'' : ''">
1095
+ # kw:d="append: flag1 ? ' checked=\'checked\'' : ''">
1105
1096
 
1106
1097
  php: |
1107
- <input type="checkbox"
1108
- {{*title="append($flag1 ? ' checked=\'checked\'' : '')"*}}>
1098
+ <input type="checkbox"
1099
+ {{*kw:d="append($flag1 ? ' checked=\'checked\'' : '')"*}}>
1109
1100
  # <input type="checkbox" name="flag" value="y"
1110
- # title="append($flag1 ? ' checked=\'checked\'' : '')">
1101
+ # kw:d="append($flag1 ? ' checked=\'checked\'' : '')">
1111
1102
 
1112
1103
  eperl: |
1113
- <input type="checkbox"
1114
- {{*title="append($flag1 ? ' checked=\'checked\'' : '')"*}}>
1104
+ <input type="checkbox"
1105
+ {{*kw:d="append($flag1 ? ' checked=\'checked\'' : '')"*}}>
1115
1106
  # <input type="checkbox" name="flag" value="y"
1116
- # title="append($flag1 ? ' checked=\'checked\'' : '')">
1107
+ # kw:d="append($flag1 ? ' checked=\'checked\'' : '')">
1117
1108
 
1118
1109
  jstl: |
1119
- <input type="checkbox"
1120
- {{*title="append(flag1 ? ' checked=\'checked\'' : '')"*}}>
1110
+ <input type="checkbox"
1111
+ {{*kw:d="append(flag1 ? ' checked=\'checked\'' : '')"*}}>
1121
1112
  # <input type="checkbox" name="flag" value="y"
1122
- # title="append(flag1 ? ' checked=\'checked\'' : '')">
1113
+ # kw:d="append(flag1 ? ' checked=\'checked\'' : '')">
1123
1114
 
1124
1115
  expected*:
1125
1116
  eruby: |
1126
- <input type="checkbox"{{*<%= flag1 ? ' checked=\'checked\'' : '' %>*}}>
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
- <input type="checkbox"{{*<?php echo $flag1 ? ' checked=\'checked\'' : ''; ?>*}}>
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
- <input type="checkbox"{{*<?= $flag1 ? ' checked=\'checked\'' : '' !>*}}>
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
- <input type="checkbox"{{*${flag1 ? ' checked=\'checked\'' : ''}*}}>
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
- 'dummy' directive removes the element.
1148
- It is very useful when preview the HTML design in browser.
1136
+ 'dummy' directive removes the element.
1137
+ It is very useful when preview the HTML design in browser.
1149
1138
 
1150
- 'dummy' directive is language-independent when used with id attribute.
1139
+ 'dummy' directive is language-independent when used with id attribute.
1151
1140
 
1152
1141
  pdata*:
1153
1142
  eruby: |
1154
- <ul>
1155
- <li>foo</li>
1156
- <li {{*id="dummy:d1"*}}>bar</li>
1157
- <li {{*title="dummy:"*}}>baz</li>
1158
- </ul>
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
- <ul>
1162
- <li>foo</li>
1163
- <li {{*id="dummy:d1"*}}>bar</li>
1164
- <li {{*title="dummy()"*}}>baz</li>
1165
- </ul>
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
- <ul>
1169
- <li>foo</li>
1170
- <li {{*id="dummy:d1"*}}>bar</li>
1171
- <li {{*title="dummy()"*}}>baz</li>
1172
- </ul>
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
- <ul>
1176
- <li>foo</li>
1177
- <li {{*id="dummy:d1"*}}>bar</li>
1178
- <li {{*title="dummy()"*}}>baz</li>
1179
- </ul>
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
- <ul>
1184
- <li>foo</li>
1185
- </ul>
1172
+ <ul>
1173
+ <li>foo</li>
1174
+ </ul>
1186
1175
 
1187
1176
  php: |
1188
- <ul>
1189
- <li>foo</li>
1190
- </ul>
1177
+ <ul>
1178
+ <li>foo</li>
1179
+ </ul>
1191
1180
 
1192
1181
  eperl: |
1193
- <ul>
1194
- <li>foo</li>
1195
- </ul>
1182
+ <ul>
1183
+ <li>foo</li>
1184
+ </ul>
1196
1185
 
1197
1186
  jstl: |
1198
- <ul>
1199
- <li>foo</li>
1200
- </ul>
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
- 'default', 'Default', and 'DEFAULT' directive replaces content by expression
1209
- only if expression is not nil, false, nor empty string.
1210
-
1211
- 'Default' directive escapes expression automatically, while 'DEFAULT' never escape it.
1212
- 'default' directive escapes expression when command-line option '-e' is specified
1213
- or PROPERTY_ESCAPE is true in configuration file.
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
- name: <em {{*title="default: user"*}}>Guest</em>
1204
+ name: <em {{*kw:d="default: user"*}}>Guest</em>
1218
1205
 
1219
1206
  php: |
1220
- name: <em {{*title="default($user)"*}}>Guest</em>
1207
+ name: <em {{*kw:d="default($user)"*}}>Guest</em>
1221
1208
 
1222
1209
  eperl: |
1223
- name: <em {{*title="default($user)"*}}>Guest</em>
1210
+ name: <em {{*kw:d="default($user)"*}}>Guest</em>
1224
1211
 
1225
1212
  jstl: |
1226
- name: <em {{*title="default(user)"*}}>Guest</em>
1213
+ name: <em {{*kw:d="default(user)"*}}>Guest</em>
1227
1214
 
1228
1215
  expected*:
1229
1216
  eruby: |
1230
- name: <em>{{*<% if (user) && !(user).to_s.empty? then %><%= user %><% else %>Guest<% end %>*}}</em>
1217
+ name: <em>{{*<% if (user) && !(user).to_s.empty? then %><%= user %><% else %>Guest<% end %>*}}</em>
1231
1218
 
1232
1219
  php: |
1233
- name: <em>{{*<?php if ($user) { ?><?php echo $user; ?><?php } else { ?>Guest<?php } ?>*}}</em>
1220
+ name: <em>{{*<?php if ($user) { ?><?php echo $user; ?><?php } else { ?>Guest<?php } ?>*}}</em>
1234
1221
 
1235
1222
  eperl: |
1236
- name: <em>{{*<? if ($user) { !><?= $user !><? } else { !>Guest<? } !>*}}</em>
1223
+ name: <em>{{*<? if ($user) { !><?= $user !><? } else { !>Guest<? } !>*}}</em>
1237
1224
 
1238
1225
  jstl: |
1239
- name: <em>{{*<c:out value="${user}" default="Guest" />*}}</em>
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
- 'replace_element_with_element', 'replace_element_with_content',
1249
- 'replace_content_with_element', and 'replace_content_with_content'
1250
- directives replace element or content with other element or content.
1251
-
1252
- These directives are language-independent when used with id attribute.
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
- <div {{*id="mark:link"*}}>
1257
- back to <a href="/">home</a>.
1258
- </div>
1259
-
1260
- <!-- replace element with other element -->
1261
- <p {{*id="replace_element_with_element:link"*}}>
1262
- back to home
1263
- </p>
1264
-
1265
- <!-- replace element with other content-->
1266
- <p {{*id="replace_element_with_content:link"*}}>
1267
- back to home
1268
- </p>
1269
-
1270
- <!-- replace content with other element -->
1271
- <p {{*id="replace_content_with_element:link"*}}>
1272
- back to home
1273
- </p>
1274
-
1275
- <!-- replace content with other content -->
1276
- <p {{*id="replace_content_with_content:link"*}}>
1277
- back to home
1278
- </p>
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
- <div>
1289
- back to <a href="/">home</a>.
1290
- </div>
1291
-
1292
- <!-- replace element with other element -->
1293
- <div>
1294
- back to <a href="/">home</a>.
1295
- </div>
1296
-
1297
- <!-- replace element with other content-->
1298
- back to <a href="/">home</a>.
1299
-
1300
- <!-- replace content with other element -->
1301
- <p>
1302
- <div>
1303
- back to <a href="/">home</a>.
1304
- </div>
1305
- </p>
1306
-
1307
- <!-- replace content with other content -->
1308
- <p>
1309
- back to <a href="/">home</a>.
1310
- </p>
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
- #- name: replace2
1320
- # hide: yes
1321
- # subject: replace_element_with, replace_content_with
1322
- # desc: |
1323
- # 'replace_element_with' and 'replace_content_with' directives replace element or content
1324
- # with other element or content.
1325
- #
1326
- # pdata*:
1327
- # eruby: |
1328
- # <div {{*id="mark:link"*}}>
1329
- # back to <a href="/">home</a>.
1330
- # </div>
1331
- #
1332
- # <!-- replace element with other element -->
1333
- # <p {{*title="replace_element_with: element(link)"*}}>
1334
- # back to home
1335
- # </p>
1336
- #
1337
- # <!-- replace element with other content-->
1338
- # <p {{*title="replace_element_with: content(link)"*}}>
1339
- # back to home
1340
- # </p>
1341
- #
1342
- # <!-- replace content with other element -->
1343
- # <p {{*title="replace_content_with: element(link)"*}}>
1344
- # back to home
1345
- # </p>
1346
- #
1347
- # <!-- replace content with other content -->
1348
- # <p {{*title="replace_content_with: content(link)"*}}>
1349
- # back to home
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