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
@@ -16,12 +16,12 @@
16
16
  <div align="left"><h1>Presentation Pattern Catalog</h1></div>
17
17
  <div align="left">
18
18
  Makoto Kuwata &lt;kwa(at)kuwata-lab.com&gt;<br>
19
- last update: $Date: 2006-05-31 11:14:08 +0900 (Wed, 31 May 2006) $<br>
19
+ last update: $Date: 2006-09-18 10:43:06 +0900 (Mon, 18 Sep 2006) $<br>
20
20
  </div>
21
21
 
22
22
  <a name="preface"></a>
23
23
  <h2 class="section1">Preface</h2>
24
- <p>Kwartz is the template system which realized the concept of '<b>Independence of Presentation Logic (IoPL)</b>.'
24
+ <p>Kwartz is the template system which realized the concept of '<strong>Independence of Presentation Logic (IoPL)</strong>.'
25
25
  This concept enables to use complex presentation logics without breaking HTML design at all.
26
26
  </p>
27
27
  <p>There are several patterns which help you to separate presentation logic from presentation data well.
@@ -107,7 +107,7 @@ This is named 'Replace Element with Value Pattern.'
107
107
  <a name="replace1.pdata"></a>
108
108
  <div class="program_caption">
109
109
  Presentation Data:</div>
110
- <pre class="program">Hello &lt;span <b>id="mark:user"</b>&gt;World&lt;/span&gt;!
110
+ <pre class="program">Hello &lt;span <strong>id="mark:user"</strong>&gt;World&lt;/span&gt;!
111
111
  </pre>
112
112
  <a name="replace1.plogic"></a>
113
113
  <div class="program_caption">
@@ -115,14 +115,14 @@ Presentation Logic:</div>
115
115
  <pre class="program">/* print value of variable 'username' instead of the element */
116
116
  #user {
117
117
  logic: {
118
- <b>print username</b>
118
+ <strong>print username</strong>
119
119
  }
120
120
  }
121
121
  </pre>
122
122
  <a name="replace1.expected"></a>
123
123
  <div class="output_caption">
124
124
  Output Script:</div>
125
- <pre class="output">Hello <b>&lt;%= username %&gt;</b>!
125
+ <pre class="output">Hello <strong>&lt;%= username %&gt;</strong>!
126
126
  </pre>
127
127
  <br>
128
128
 
@@ -138,7 +138,7 @@ Output Script:</div>
138
138
  <p>The output script will be:
139
139
  </p>
140
140
  <a name="replace1a.expected"></a>
141
- <pre class="output">Hello <b>&lt;%= username %&gt;</b>!
141
+ <pre class="output">Hello <strong>&lt;%= username %&gt;</strong>!
142
142
  </pre>
143
143
  <br>
144
144
 
@@ -165,7 +165,7 @@ This is named 'Replace Content with Value Pattern.'
165
165
  <a name="replace2.pdata"></a>
166
166
  <div class="program_caption">
167
167
  Presentation Data:</div>
168
- <pre class="program">&lt;h1 <b>id="mark:title"</b>&gt;Example&lt;/h1&gt;
168
+ <pre class="program">&lt;h1 <strong>id="mark:title"</strong>&gt;Example&lt;/h1&gt;
169
169
  </pre>
170
170
  <a name="replace2.plogic"></a>
171
171
  <div class="program_caption">
@@ -174,7 +174,7 @@ Presentation Logic:</div>
174
174
  #title {
175
175
  logic: {
176
176
  _stag # start-tag
177
- <b>print title </b>
177
+ <strong>print title </strong>
178
178
  _etag # end-tag
179
179
  }
180
180
  }
@@ -192,18 +192,18 @@ Output Script:</div>
192
192
  </p>
193
193
  <a name="replace2a.plogic"></a>
194
194
  <pre class="program">#title {
195
- <b>cont: title;</b>
195
+ <strong>cont: title;</strong>
196
196
  /* or value: title; */
197
197
  }
198
198
  </pre>
199
199
  <p>The output will be:
200
200
  </p>
201
201
  <a name="replace2a.expected"></a>
202
- <pre class="output">&lt;h1&gt;<b>&lt;%= title %&gt;</b>&lt;/h1&gt;
202
+ <pre class="output">&lt;h1&gt;<strong>&lt;%= title %&gt;</strong>&lt;/h1&gt;
203
203
  </pre>
204
- <p>Kwartz Directive '<code>title="cont: <i>expr</i>"</code>' or '<code>title="value: <i>expr</i>"</code>' lets you to use this pattern without presentation logic file.
204
+ <p>Kwartz Directive '<code>kw:d="cont: <em>expr</em>"</code>' or '<code>kw:d="value: <em>expr</em>"</code>' lets you to use this pattern without presentation logic file.
205
205
  </p>
206
- <pre class="program">&lt;h1 <b>id="value: title"</b>&gt;Example&lt;/h1&gt;
206
+ <pre class="program">&lt;h1 <strong>id="value: title"</strong>&gt;Example&lt;/h1&gt;
207
207
  </pre>
208
208
  <br>
209
209
 
@@ -236,7 +236,7 @@ displayed when username is null or empty.
236
236
  <a name="replace5.pdata"></a>
237
237
  <div class="program_caption">
238
238
  Presentation Data:</div>
239
- <pre class="program">Hello &lt;span <b>id="mark:user"</b>&gt;World&lt;/span&gt;!
239
+ <pre class="program">Hello &lt;span <strong>id="mark:user"</strong>&gt;World&lt;/span&gt;!
240
240
  </pre>
241
241
  <a name="replace5.plogic"></a>
242
242
  <div class="program_caption">
@@ -245,9 +245,9 @@ Presentation Logic:</div>
245
245
  #user {
246
246
  logic: {
247
247
  if username &amp;&amp; !username.empty?
248
- <b>print username</b>
248
+ <strong>print username</strong>
249
249
  else
250
- <b>_cont</b> # print content text
250
+ <strong>_cont</strong> # print content text
251
251
  end
252
252
  }
253
253
  }
@@ -264,10 +264,10 @@ World&lt;% end %&gt;
264
264
 
265
265
  <a name="default-content-suppliment"></a>
266
266
  <h4 class="section3">Suppliement</h4>
267
- <p>Directive 'title="default: <i>expr</i>"' is for Default Content Pattern.
267
+ <p>Directive 'kw:d="default: <em>expr</em>"' is for Default Content Pattern.
268
268
  </p>
269
269
  <a name="replace5a.pdata"></a>
270
- <pre class="program">Hello &lt;span <b>title="default: user"</b>&gt;World&lt;/span&gt;!
270
+ <pre class="program">Hello &lt;span <strong>kw:d="default: user"</strong>&gt;World&lt;/span&gt;!
271
271
  </pre>
272
272
  <p>The output is:
273
273
  </p>
@@ -300,13 +300,13 @@ or 'Replace Element with Content Pattern'.
300
300
  <a name="replace3.pdata"></a>
301
301
  <div class="program_caption">
302
302
  Presentation Data:</div>
303
- <pre class="program">&lt;div <b>id="mark:links"</b>&gt;
303
+ <pre class="program">&lt;div <strong>id="mark:links"</strong>&gt;
304
304
  &lt;a href="/"&gt;HOME&lt;/a&gt; | &lt;a href="/doc"&gt;Document&lt;/a&gt; | &lt;a href="/faq"&gt;FAQ&lt;/a&gt;
305
305
  &lt;/div&gt;
306
306
 
307
307
  &lt;p&gt;Welcome to my Home Page!&lt;/p&gt;
308
308
 
309
- &lt;div <b>id="mark:links2"</b>&gt;
309
+ &lt;div <strong>id="mark:links2"</strong>&gt;
310
310
  Home | Document | FAQ
311
311
  &lt;/div&gt;
312
312
  </pre>
@@ -316,11 +316,11 @@ Presentation Logic:</div>
316
316
  <pre class="program">/* replace the element 'links2' with the element 'links' */
317
317
  #links2 {
318
318
  logic: {
319
- <b>_element(links)</b>
319
+ <strong>_element(links)</strong>
320
320
  }
321
321
  }
322
322
  </pre>
323
- <p><code>_element(<i>name</i>)</code> represents the element which is marked with <code>id="mark:<i>name</i>"</code> or <code>id="<i>name</i>"</code>.
323
+ <p><code>_element(<em>name</em>)</code> represents the element which is marked with <code>id="mark:<em>name</em>"</code> or <code>id="<em>name</em>"</code>.
324
324
  </p>
325
325
  <a name="replace3.expected"></a>
326
326
  <div class="output_caption">
@@ -335,7 +335,7 @@ Output Script:</div>
335
335
  &lt;a href="/"&gt;HOME&lt;/a&gt; | &lt;a href="/doc"&gt;Document&lt;/a&gt; | &lt;a href="/faq"&gt;FAQ&lt;/a&gt;
336
336
  &lt;/div&gt;
337
337
  </pre>
338
- <p>Use '_content(<i>name</i>)' instead of '_element(<i>name</i>)'
338
+ <p>Use '_content(<em>name</em>)' instead of '_element(<em>name</em>)'
339
339
  if you want to reuse content of other element.
340
340
  </p>
341
341
  <a name="replace3a.plogic"></a>
@@ -344,7 +344,7 @@ Presentation Logic:</div>
344
344
  <pre class="program">/* replace the element 'links2' with the content 'links' */
345
345
  #links2 {
346
346
  logic: {
347
- <b>_content(links)</b>
347
+ <strong>_content(links)</strong>
348
348
  }
349
349
  }
350
350
  </pre>
@@ -352,19 +352,19 @@ Presentation Logic:</div>
352
352
 
353
353
  <a name="replace-elem-with-elem-supplement"></a>
354
354
  <h4 class="section3">Supplement</h4>
355
- <p>Directive '<code>id="replace_element_with_element: <i>name</i>"</code>' and '<code>id="replace_element_with_content: <i>name</i>"</code>' lets you to use this pattern without presentation logic file.
355
+ <p>Directive '<code>id="replace_element_with_element: <em>name</em>"</code>' and '<code>id="replace_element_with_content: <em>name</em>"</code>' lets you to use this pattern without presentation logic file.
356
356
  </p>
357
- <pre class="program">&lt;div <b>id="mark:links"</b>&gt;
357
+ <pre class="program">&lt;div <strong>id="mark:links"</strong>&gt;
358
358
  &lt;a href="/"&gt;HOME&lt;/a&gt; | &lt;a href="/doc"&gt;Document&lt;/a&gt; | &lt;a href="/faq"&gt;FAQ&lt;/a&gt;
359
359
  &lt;/div&gt;
360
360
 
361
361
  &lt;p&gt;Welcome to my Home Page!&lt;/p&gt;
362
362
 
363
- &lt;div <b>id="replace_element_with_element: links"</b>&gt;
363
+ &lt;div <strong>id="replace_element_with_element: links"</strong>&gt;
364
364
  Home | Document | FAQ
365
365
  &lt;/div&gt;
366
366
  </pre>
367
- <p>The command-line option '<code>-i <i>file</i>,<i>file2</i>,...</code>' enables you
367
+ <p>The command-line option '<code>-i <em>file</em>,<em>file2</em>,...</code>' enables you
368
368
  to use elements described in other files.
369
369
  See Kwartz Users' Guide for details.
370
370
  </p>
@@ -406,12 +406,12 @@ Presentation Data(contents.html):</div>
406
406
  &lt;body&gt;
407
407
 
408
408
  &lt;p&gt;menu:&lt;/p&gt;
409
- &lt;ul <b>id="mark:menu"</b>&gt;
410
- &lt;li&gt;&lt;a href="..." <b>id="mark:menu_item"</b>&gt;menu1&lt;/a&gt;&lt;/li&gt;
409
+ &lt;ul <strong>id="mark:menu"</strong>&gt;
410
+ &lt;li&gt;&lt;a href="..." <strong>id="mark:menu_item"</strong>&gt;menu1&lt;/a&gt;&lt;/li&gt;
411
411
  &lt;/ul&gt;
412
412
 
413
413
  &lt;p&gt;article:&lt;/p&gt;
414
- &lt;div <b>id="mark:article"</b>&gt;
414
+ &lt;div <strong>id="mark:article"</strong>&gt;
415
415
  &lt;h2&gt;What is Kwartz?&lt;/h2&gt;
416
416
  &lt;p&gt;Kwartz is a template system, which realized the concept
417
417
  &lt;strong&gt;`Independence of Presentation Logic&lt;/strong&gt;.
@@ -456,7 +456,7 @@ Presentation Data(layout.html):</div>
456
456
 
457
457
  &lt;!-- menu part --&gt;
458
458
  &lt;td class="menu" width="100" valign="top"
459
- <b>id="mark:placeholder_menu"</b>&gt;
459
+ <strong>id="mark:placeholder_menu"</strong>&gt;
460
460
  &lt;ul&gt;
461
461
  &lt;li&gt;menu1&lt;/li&gt;
462
462
  &lt;li&gt;menu2&lt;/li&gt;
@@ -466,7 +466,7 @@ Presentation Data(layout.html):</div>
466
466
 
467
467
  &lt;!-- article part --&gt;
468
468
  &lt;td class="article" width="400" valign="top"
469
- <b>id="mark:placeholder_article"</b>&gt;
469
+ <strong>id="mark:placeholder_article"</strong>&gt;
470
470
  aaa&lt;br&gt;
471
471
  bbb&lt;br&gt;
472
472
  ccc&lt;br&gt;
@@ -493,7 +493,7 @@ Presentation Logic(layout.plogic):</div>
493
493
  #placeholder_menu {
494
494
  logic: {
495
495
  _stag
496
- <b>_element(menu)</b>
496
+ <strong>_element(menu)</strong>
497
497
  _etag
498
498
  }
499
499
  }
@@ -502,17 +502,17 @@ Presentation Logic(layout.plogic):</div>
502
502
  #placeholder_article {
503
503
  logic: {
504
504
  _stag
505
- <b>_content(article)</b>
505
+ <strong>_content(article)</strong>
506
506
  _etag
507
507
  }
508
508
  }
509
509
  </pre>
510
- <p>Compilation requires the command-line option <code>-i <i>file1,file2,...</i></code>
510
+ <p>Compilation requires the command-line option <code>-i <em>file1,file2,...</em></code>
511
511
  which enables to import elements defined in other files.
512
512
  </p>
513
513
  <p>Compile:
514
514
  </p>
515
- <pre class="terminal">$ kwartz -l eruby <b>-i contents.html</b> -p contens.plogic,layout.plogic layout.html
515
+ <pre class="terminal">$ kwartz -l eruby <strong>-i contents.html</strong> -p contens.plogic,layout.plogic layout.html
516
516
  </pre>
517
517
  <a name="layout.expected"></a>
518
518
  <div class="output_caption">
@@ -563,14 +563,14 @@ Output Script:</div>
563
563
 
564
564
  <a name="replace-cont-with-elem-supplement"></a>
565
565
  <h4 class="section3">Supplement</h4>
566
- <p>Kwartz Directive '<code>id="replace_content_with_element:<i>name</i>"</code>' and '<code>id="replace_content_with_content:<i>name</i>"</code>' lets you to use this pattern without presentation logic file(layout.plogic).
566
+ <p>Kwartz Directive '<code>id="replace_content_with_element:<em>name</em>"</code>' and '<code>id="replace_content_with_content:<em>name</em>"</code>' lets you to use this pattern without presentation logic file(layout.plogic).
567
567
  </p>
568
568
  <div class="program_caption">
569
569
  Presentation Data(layout.html):</div>
570
570
  <pre class="program"> :
571
571
  &lt;!-- menu part --&gt;
572
572
  &lt;td class="menu" width="100" valign="top"
573
- <b>id="replace_content_with_element:menu"</b>&gt;
573
+ <strong>id="replace_content_with_element:menu"</strong>&gt;
574
574
  &lt;ul&gt;
575
575
  &lt;li&gt;menu1&lt;/li&gt;
576
576
  &lt;li&gt;menu2&lt;/li&gt;
@@ -580,7 +580,7 @@ Presentation Data(layout.html):</div>
580
580
 
581
581
  &lt;!-- article part --&gt;
582
582
  &lt;td class="article" width="400" valign="top"&gt;
583
- <b>id="replace_content_with_content:article"</b>&gt;
583
+ <strong>id="replace_content_with_content:article"</strong>&gt;
584
584
  aaa&lt;br&gt;
585
585
  bbb&lt;br&gt;
586
586
  ccc&lt;br&gt;
@@ -620,7 +620,7 @@ This pattern is named 'Delete Element Pattern' or 'Dummy Element Pattern.'
620
620
  Presentation Data:</div>
621
621
  <pre class="program">&lt;ul&gt;
622
622
  &lt;li&gt;foo&lt;/li&gt;
623
- &lt;li <b>id="dummy"</b>&gt;bar&lt;/li&gt;
623
+ &lt;li <strong>id="dummy"</strong>&gt;bar&lt;/li&gt;
624
624
  &lt;/ul&gt;
625
625
  </pre>
626
626
  <a name="dummy_elem.plogic"></a>
@@ -643,13 +643,13 @@ Output Script:</div>
643
643
 
644
644
  <a name="delete-elem-supplement"></a>
645
645
  <h4 class="section3">Supplement</h4>
646
- <p>Kwartz directive '<code>id="dummy:<i>str</i>"</code>' lets you to use this pattern without presentation logic file.
646
+ <p>Kwartz directive '<code>id="dummy:<em>str</em>"</code>' lets you to use this pattern without presentation logic file.
647
647
  </p>
648
648
  <div class="program_caption">
649
649
  Presentation Data:</div>
650
650
  <pre class="program">&lt;ul&gt;
651
651
  &lt;li&gt;foo&lt;/li&gt;
652
- &lt;li <b>id="dummy:d1"</b>&gt;bar&lt;/li&gt;
652
+ &lt;li <strong>id="dummy:d1"</strong>&gt;bar&lt;/li&gt;
653
653
  &lt;/ul&gt;
654
654
  </pre>
655
655
  <br>
@@ -678,7 +678,7 @@ This pattern is named 'Delete Tag Pattern' or 'Dummy Tag Pattern.'
678
678
  <a name="dummy_tag.pdata"></a>
679
679
  <div class="program_caption">
680
680
  Presentation Data:</div>
681
- <pre class="program">&lt;a href="..." <b>id="mark:next"</b>&gt;Next&lt;/a&gt;
681
+ <pre class="program">&lt;a href="..." <strong>id="mark:next"</strong>&gt;Next&lt;/a&gt;
682
682
  </pre>
683
683
  <a name="dummy_tag.plogic"></a>
684
684
  <div class="program_caption">
@@ -688,7 +688,7 @@ Presentation Logic:</div>
688
688
  attrs: "href" url;
689
689
  logic: {
690
690
  if !url || url.empty?
691
- <b>_cont</b>
691
+ <strong>_cont</strong>
692
692
  else
693
693
  _stag
694
694
  _cont
@@ -737,8 +737,8 @@ This pattern is very useful for all these situations.
737
737
  <div class="program_caption">
738
738
  Presentation Data:</div>
739
739
  <pre class="program">&lt;table&gt;
740
- &lt;tr <b>id="mark:list"</b>&gt;
741
- &lt;td title="value: item"&gt;item&lt;/td&gt;
740
+ &lt;tr <strong>id="mark:list"</strong>&gt;
741
+ &lt;td kw:d="value: item"&gt;item&lt;/td&gt;
742
742
  &lt;/tr&gt;
743
743
  &lt;/table&gt;
744
744
  </pre>
@@ -748,11 +748,11 @@ Presentation Logic:</div>
748
748
  <pre class="program">/* iterate element */
749
749
  #list {
750
750
  logic: {
751
- <b>for item in list</b>
751
+ <strong>for item in list</strong>
752
752
  _stag
753
753
  _cont
754
754
  _etag
755
- <b>end</b>
755
+ <strong>end</strong>
756
756
  }
757
757
  }
758
758
  </pre>
@@ -771,12 +771,12 @@ Output Script:</div>
771
771
 
772
772
  <a name="iterate-elem-supplement"></a>
773
773
  <h4 class="section3">Supplement</h4>
774
- <p>Kwartz directive <code>title="for <i>item</i> in <i>list</i>"</code> lets you to use this pattern without presentation logic file.
774
+ <p>Kwartz directive <code>kw:d="for <em>item</em> in <em>list</em>"</code> lets you to use this pattern without presentation logic file.
775
775
  See reference manual for details.
776
776
  </p>
777
777
  <pre class="program">&lt;table&gt;
778
- &lt;tr <b>title="for item in list"</b>&gt;
779
- &lt;td title="value: item"&gt;item&lt;/td&gt;
778
+ &lt;tr <strong>kw:d="for item in list"</strong>&gt;
779
+ &lt;td kw:d="value: item"&gt;item&lt;/td&gt;
780
780
  &lt;/tr&gt;
781
781
  &lt;/table&gt;
782
782
  </pre>
@@ -805,9 +805,9 @@ This pattern is named 'Iterate Content' pattern.
805
805
  <a name="iterate_cont.pdata"></a>
806
806
  <div class="program_caption">
807
807
  Presentation Data:</div>
808
- <pre class="program">&lt;dl <b>id="mark:list"</b>&gt;
809
- &lt;dt title="value: item.text"&gt;text&lt;/dt&gt;
810
- &lt;dd title="value: item.desc"&gt;description&lt;/dd&gt;
808
+ <pre class="program">&lt;dl <strong>id="mark:list"</strong>&gt;
809
+ &lt;dt kw:d="value: item.text"&gt;text&lt;/dt&gt;
810
+ &lt;dd kw:d="value: item.desc"&gt;description&lt;/dd&gt;
811
811
  &lt;/dl&gt;
812
812
  </pre>
813
813
  <a name="iterate_cont.plogic"></a>
@@ -817,9 +817,9 @@ Presentation Logic:</div>
817
817
  #list {
818
818
  logic: {
819
819
  _stag
820
- <b>for item in items</b>
820
+ <strong>for item in items</strong>
821
821
  _cont
822
- <b>end</b>
822
+ <strong>end</strong>
823
823
  _etag
824
824
  }
825
825
  }
@@ -838,12 +838,12 @@ Output Script:</div>
838
838
 
839
839
  <a name="iterate-cont-supplement"></a>
840
840
  <h4 class="section3">Supplement</h4>
841
- <p>Kwartz directive <code>title="list <i>item</i> in <i>list</i>"</code> lets you to use this pattern without presentation logic file.
841
+ <p>Kwartz directive <code>kw:d="list <em>item</em> in <em>list</em>"</code> lets you to use this pattern without presentation logic file.
842
842
  See reference manual for details.
843
843
  </p>
844
- <pre class="program">&lt;dl <b>title="list item in items"</b>&gt;
845
- &lt;dt title="value: item.text"&gt;text&lt;/dt&gt;
846
- &lt;dd title="value: item.desc"&gt;description&lt;/dd&gt;
844
+ <pre class="program">&lt;dl <strong>kw:d="list item in items"</strong>&gt;
845
+ &lt;dt kw:d="value: item.text"&gt;text&lt;/dt&gt;
846
+ &lt;dd kw:d="value: item.desc"&gt;description&lt;/dd&gt;
847
847
  &lt;/dl&gt;
848
848
  </pre>
849
849
  <br>
@@ -877,9 +877,9 @@ This pattern is named 'Select Element Pattern' or 'Select Content Pattern'.
877
877
  <div class="program_caption">
878
878
  Presentation Data:</div>
879
879
  <pre class="program">&lt;div id="mark:message"&gt;
880
- &lt;span style="color:red" <b>id="mark:error"</b>&gt;ERROR!&lt;/span&gt;
881
- &lt;span style="color:blue" <b>id="mark:warning"</b>&gt;Warning:&lt;/span&gt;
882
- &lt;span style="color:black" <b>id="mark:good"</b>&gt;No error.&lt;/span&gt;
880
+ &lt;span style="color:red" <strong>id="mark:error"</strong>&gt;ERROR!&lt;/span&gt;
881
+ &lt;span style="color:blue" <strong>id="mark:warning"</strong>&gt;Warning:&lt;/span&gt;
882
+ &lt;span style="color:black" <strong>id="mark:good"</strong>&gt;No error.&lt;/span&gt;
883
883
  &lt;/div&gt;
884
884
  </pre>
885
885
  <a name="select_elem.plogic"></a>
@@ -889,11 +889,11 @@ Presentation Logic:</div>
889
889
  #message {
890
890
  logic: {
891
891
  if status == 'error'
892
- <b>_element(error)</b> # ERROR!
892
+ <strong>_element(error)</strong> # ERROR!
893
893
  else if (status == 'warning')
894
- <b>_element(warning)</b> # Warning:
894
+ <strong>_element(warning)</strong> # Warning:
895
895
  else
896
- <b>_element(good)</b> # No error.
896
+ <strong>_element(good)</strong> # No error.
897
897
  end
898
898
  }
899
899
  }
@@ -913,13 +913,13 @@ Output Script:</div>
913
913
 
914
914
  <a name="select-elem-supplement"></a>
915
915
  <h4 class="section3">Supplement</h4>
916
- <p> Kwartz directive '<code>title="if <i>condition</i>"</code>', '<code>title="elsif <i>condition</i>"</code>',
917
- and '<code>title="else"</code>' let you to use this pattern without presentation logic file.
916
+ <p> Kwartz directive '<code>kw:d="if <em>condition</em>"</code>', '<code>kw:d="elsif <em>condition</em>"</code>',
917
+ and '<code>kw:d="else"</code>' let you to use this pattern without presentation logic file.
918
918
  </p>
919
919
  <pre class="program">&lt;div&gt;
920
- &lt;span style="color:red" <b>title="if status=='error'"</b>&gt;ERROR!&lt;/span&gt;
921
- &lt;span style="color:blue" <b>title="elsif status=='warning'"</b>&gt;Warning:&lt;/span&gt;
922
- &lt;span style="color:black" <b>title="else"</b>&gt;No error.&lt;/span&gt;
920
+ &lt;span style="color:red" <strong>kw:d="if status=='error'"</strong>&gt;ERROR!&lt;/span&gt;
921
+ &lt;span style="color:blue" <strong>kw:d="elsif status=='warning'"</strong>&gt;Warning:&lt;/span&gt;
922
+ &lt;span style="color:black" <strong>kw:d="else"</strong>&gt;No error.&lt;/span&gt;
923
923
  &lt;/div&gt;
924
924
  </pre>
925
925
  <br>
@@ -954,13 +954,13 @@ In 'Pick-up Element' pattern, necessary elements are marked and leaved so that d
954
954
  Presentation Data:</div>
955
955
  <pre class="program">&lt;html&gt;
956
956
  &lt;body&gt;
957
- &lt;div <b>id="breadcrumbs"</b>&gt;
958
- &lt;a href="/" <b>id="mark:crumb"</b>&gt;Home&lt;/a&gt;
959
- &lt;span <b>id="mark:separator"</b>&gt;&amp;gt;&lt;/span&gt;
957
+ &lt;div <strong>id="breadcrumbs"</strong>&gt;
958
+ &lt;a href="/" <strong>id="mark:crumb"</strong>&gt;Home&lt;/a&gt;
959
+ &lt;span <strong>id="mark:separator"</strong>&gt;&amp;gt;&lt;/span&gt;
960
960
  &lt;a href="/aaa/"&gt;AAA&lt;/a&gt; &amp;lt;
961
961
  &lt;a href="/aaa/bbb/"&gt;BBB&lt;/a&gt; &amp;lgt;
962
962
  &lt;a href="/aaa/bbb/ccc"&gt;CCC&lt;/a&gt; &amp;lgt;
963
- &lt;strong <b>id="mark:title"</b>&gt;title&lt;/strong&gt;
963
+ &lt;strong <strong>id="mark:title"</strong>&gt;title&lt;/strong&gt;
964
964
  &lt;/div&gt;
965
965
  &lt;/body&gt;
966
966
  &lt;/html&gt;
@@ -971,10 +971,10 @@ Presentation Logic:</div>
971
971
  <pre class="program">#breadcrumbs {
972
972
  logic: {
973
973
  for item in list
974
- <b>_element(crumb)</b> # print &lt;a&gt;...&lt;/a&gt;
975
- <b>_content(separator)</b> # print '&amp;gt;'
974
+ <strong>_element(crumb)</strong> # print &lt;a&gt;...&lt;/a&gt;
975
+ <strong>_content(separator)</strong> # print '&amp;gt;'
976
976
  end
977
- <b>_element(title)</b> # print &lt;strong&gt;title&lt;/strong&gt;
977
+ <strong>_element(title)</strong> # print &lt;strong&gt;title&lt;/strong&gt;
978
978
  }
979
979
  }
980
980
 
@@ -1026,16 +1026,16 @@ This pattern is named 'Extract Element Pattern' or 'Extract Content Pattern'.
1026
1026
  <a name="design.html"></a>
1027
1027
  <div class="program_caption">
1028
1028
  Presentation Data (<a href="p-pattern/design.html">design.html</a>):</div>
1029
- <pre class="program">&lt;html <b>id="mark:whole"</b>&gt;
1029
+ <pre class="program">&lt;html <strong>id="mark:whole"</strong>&gt;
1030
1030
  &lt;head&gt;
1031
1031
  &lt;title&gt;Design Examples&lt;/title&gt;
1032
1032
  &lt;link rel="stylesheet" href="design.css" type="text/css"&gt;
1033
1033
  &lt;/head&gt;
1034
1034
  &lt;body&gt;
1035
1035
 
1036
- &lt;div <b>id="mark:tablist"</b>&gt;
1036
+ &lt;div <strong>id="mark:tablist"</strong>&gt;
1037
1037
  &lt;div class="tabs" id="mark:tabs"&gt;
1038
- &lt;a href="/" class="" <b>id="mark:tab"</b>&gt;Home&lt;/a&gt;
1038
+ &lt;a href="/" class="" <strong>id="mark:tab"</strong>&gt;Home&lt;/a&gt;
1039
1039
  &lt;a href="/product/" class="selected"&gt;Product&lt;/a&gt;
1040
1040
  &lt;a href="/download/" class=""&gt;Download&lt;/a&gt;
1041
1041
  &lt;a href="/support/" class=""&gt;Support&lt;/a&gt;
@@ -1046,11 +1046,11 @@ Presentation Data (<a href="p-pattern/design.html">design.html</a>):</div>
1046
1046
 
1047
1047
  &lt;br&gt;
1048
1048
 
1049
- &lt;div <b>id="mark:menulist"</b>&gt;
1049
+ &lt;div <strong>id="mark:menulist"</strong>&gt;
1050
1050
  &lt;span class="menu_title" id="value:menu_title"&gt;MenuList&lt;/span&gt;
1051
- &lt;div class="menus" <b>id="mark:menus"</b>&gt;
1052
- &lt;a href="/cgi-bin/email.cgi" class="" <b>id="mark:menu"</b>&gt;E-Mail&lt;/a&gt;
1053
- &lt;span <b>id="mark:menu_separator"</b>&gt;&lt;br&gt;&lt;/span&gt;
1051
+ &lt;div class="menus" <strong>id="mark:menus"</strong>&gt;
1052
+ &lt;a href="/cgi-bin/email.cgi" class="" <strong>id="mark:menu"</strong>&gt;E-Mail&lt;/a&gt;
1053
+ &lt;span <strong>id="mark:menu_separator"</strong>&gt;&lt;br&gt;&lt;/span&gt;
1054
1054
  &lt;a href="/cgi-bin/board.cgi" class="selected"&gt;MesgBoard&lt;/a&gt;&lt;br&gt;
1055
1055
  &lt;a href="/cgi-bin/photo.cgi" class=""&gt;PhotoAlbum&lt;/a&gt;&lt;br&gt;
1056
1056
  &lt;a href="/cgi-bin/greeting.cgi" class=""&gt;GreetingCard&lt;/a&gt;&lt;br&gt;
@@ -1062,7 +1062,7 @@ Presentation Data (<a href="p-pattern/design.html">design.html</a>):</div>
1062
1062
  &lt;p&gt; ..... &lt;/p&gt;
1063
1063
  &lt;p&gt; ..... &lt;/p&gt;
1064
1064
 
1065
- &lt;div align="center" class="copyright" <b>id="mark:copyright"</b>&gt;
1065
+ &lt;div align="center" class="copyright" <strong>id="mark:copyright"</strong>&gt;
1066
1066
  Copyright&amp;copy; 2004-2005 kuwata-lab. All Rights Reserved.
1067
1067
  &lt;/div&gt;
1068
1068
 
@@ -1073,9 +1073,9 @@ Presentation Data (<a href="p-pattern/design.html">design.html</a>):</div>
1073
1073
  <div class="program_caption">
1074
1074
  Presentation Logic (copyright.plogic):</div>
1075
1075
  <pre class="program">/* replace the 'whole' element with the element you want to extract */
1076
- <b>#whole</b> {
1076
+ <strong>#whole</strong> {
1077
1077
  logic: {
1078
- <b>_element(copyright)</b>
1078
+ <strong>_element(copyright)</strong>
1079
1079
  }
1080
1080
  }
1081
1081
  </pre>
@@ -1083,9 +1083,9 @@ Presentation Logic (copyright.plogic):</div>
1083
1083
  <div class="program_caption">
1084
1084
  Presentation Logic (tablist.plogic):</div>
1085
1085
  <pre class="program">/* replace the 'whole' element with the element you want to extract */
1086
- <b>#whole</b> {
1086
+ <strong>#whole</strong> {
1087
1087
  logic: {
1088
- <b>_element(tablist)</b>
1088
+ <strong>_element(tablist)</strong>
1089
1089
  }
1090
1090
  }
1091
1091
 
@@ -1110,9 +1110,9 @@ Presentation Logic (tablist.plogic):</div>
1110
1110
  <div class="program_caption">
1111
1111
  Presentation Logic (menulist.plogic):</div>
1112
1112
  <pre class="program">/* replace the 'whole' element with the element you want to extract */
1113
- <b>#whole</b> {
1113
+ <strong>#whole</strong> {
1114
1114
  logic: {
1115
- <b>_element(menulist)</b>
1115
+ <strong>_element(menulist)</strong>
1116
1116
  }
1117
1117
  }
1118
1118
 
@@ -1187,9 +1187,9 @@ Output Script (menulist.rhtml):</div>
1187
1187
 
1188
1188
  <a name="extract-elem-supplement"></a>
1189
1189
  <h4 class="section3">Supplement</h4>
1190
- <p> The command-line option '<code>-X <i>name</i></code>' extracts the element marked with <code><i>name</i></code> in kwartz-ruby.
1190
+ <p> The command-line option '<code>-X <em>name</em></code>' extracts the element marked with <code><em>name</em></code> in kwartz-ruby.
1191
1191
  </p>
1192
- <p> The command-line option '<code>-x <i>name</i></code>' extracts the content of the element marked with <code><i>name</i></code> in kwartz-ruby.
1192
+ <p> The command-line option '<code>-x <em>name</em></code>' extracts the content of the element marked with <code><em>name</em></code> in kwartz-ruby.
1193
1193
  </p>
1194
1194
  <br>
1195
1195