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
@@ -0,0 +1,630 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Kwartz::Helper::RailsTemplate</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Kwartz::Helper::RailsTemplate</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/kwartz/helper/rails_rb.html">
59
+ kwartz/helper/rails.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ helper class to use <a href="../../Kwartz.html">Kwartz</a> in Rails
84
+ </p>
85
+ <p>
86
+ How to use <a href="../../Kwartz.html">Kwartz</a> in Rails:
87
+ </p>
88
+ <ol>
89
+ <li>add the folliwng code in your &#8216;app/controllers/application.rb&#8217;.
90
+
91
+ <pre>
92
+ --------------------
93
+ require 'kwartz/helper/rails'
94
+ ActionView::Base.register_template_handler('html', Kwartz::Helper::RailsTemplate)
95
+ #Kwartz::Helper::RailsTemplate.pdata_suffix = '.html'
96
+ #Kwartz::Helper::RailsTemplate.plogic_suffix = '.plogic'
97
+ #Kwartz::Helper::RailsTemplate.default_properties = { :escape=&gt;true }
98
+ #Kwartz::Helper::RailsTemplate.debug = false
99
+ --------------------
100
+ </pre>
101
+ </li>
102
+ <li>restart web server.
103
+
104
+ </li>
105
+ <li>put template files &#8217;*.html&#8217; and &#8217;*.plogic&#8217; in
106
+ &#8216;app/views/xxx&#8217;. layout files
107
+ (&#8216;app/views/layouts/xxx.{html,plogic}&#8217;) is also available.
108
+
109
+ </li>
110
+ </ol>
111
+
112
+ </div>
113
+
114
+
115
+ </div>
116
+
117
+ <div id="method-list">
118
+ <h3 class="section-bar">Methods</h3>
119
+
120
+ <div class="name-list">
121
+ <a href="#M000040">add_cache</a>&nbsp;&nbsp;
122
+ <a href="#M000042">debug</a>&nbsp;&nbsp;
123
+ <a href="#M000043">debug=</a>&nbsp;&nbsp;
124
+ <a href="#M000030">default_properties</a>&nbsp;&nbsp;
125
+ <a href="#M000031">default_properties=</a>&nbsp;&nbsp;
126
+ <a href="#M000041">get_cache</a>&nbsp;&nbsp;
127
+ <a href="#M000036">lang</a>&nbsp;&nbsp;
128
+ <a href="#M000037">lang=</a>&nbsp;&nbsp;
129
+ <a href="#M000044">new</a>&nbsp;&nbsp;
130
+ <a href="#M000032">pdata_suffix</a>&nbsp;&nbsp;
131
+ <a href="#M000033">pdata_suffix=</a>&nbsp;&nbsp;
132
+ <a href="#M000034">plogic_suffix</a>&nbsp;&nbsp;
133
+ <a href="#M000035">plogic_suffix=</a>&nbsp;&nbsp;
134
+ <a href="#M000045">render</a>&nbsp;&nbsp;
135
+ <a href="#M000038">use_cache</a>&nbsp;&nbsp;
136
+ <a href="#M000039">use_cache=</a>&nbsp;&nbsp;
137
+ </div>
138
+ </div>
139
+
140
+ </div>
141
+
142
+
143
+ <!-- if includes -->
144
+
145
+ <div id="section">
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+ <!-- if method_list -->
155
+ <div id="methods">
156
+ <h3 class="section-bar">Public Class methods</h3>
157
+
158
+ <div id="method-M000040" class="method-detail">
159
+ <a name="M000040"></a>
160
+
161
+ <div class="method-heading">
162
+ <a href="#M000040" class="method-signature">
163
+ <span class="method-name">add_cache</span><span class="method-args">(_ruby_code, _filename)</span>
164
+ </a>
165
+ </div>
166
+
167
+ <div class="method-description">
168
+ <p><a class="source-toggle" href="#"
169
+ onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
170
+ <div class="method-source-code" id="M000040-source">
171
+ <pre>
172
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 104</span>
173
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add_cache</span>(<span class="ruby-identifier">_ruby_code</span>, <span class="ruby-identifier">_filename</span>)
174
+ <span class="ruby-identifier">_proc_obj</span> = <span class="ruby-identifier">eval</span> <span class="ruby-node">&quot;proc do #{_ruby_code} end&quot;</span>, <span class="ruby-identifier">binding</span>(), <span class="ruby-identifier">_filename</span>
175
+ <span class="ruby-ivar">@@cache_table</span>[<span class="ruby-identifier">_filename</span>] = <span class="ruby-identifier">_proc_obj</span>
176
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_proc_obj</span>
177
+ <span class="ruby-keyword kw">end</span>
178
+ </pre>
179
+ </div>
180
+ </div>
181
+ </div>
182
+
183
+ <div id="method-M000042" class="method-detail">
184
+ <a name="M000042"></a>
185
+
186
+ <div class="method-heading">
187
+ <a href="#M000042" class="method-signature">
188
+ <span class="method-name">debug</span><span class="method-args">()</span>
189
+ </a>
190
+ </div>
191
+
192
+ <div class="method-description">
193
+ <p><a class="source-toggle" href="#"
194
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
195
+ <div class="method-source-code" id="M000042-source">
196
+ <pre>
197
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 117</span>
198
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debug</span>
199
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@debug</span>
200
+ <span class="ruby-keyword kw">end</span>
201
+ </pre>
202
+ </div>
203
+ </div>
204
+ </div>
205
+
206
+ <div id="method-M000043" class="method-detail">
207
+ <a name="M000043"></a>
208
+
209
+ <div class="method-heading">
210
+ <a href="#M000043" class="method-signature">
211
+ <span class="method-name">debug=</span><span class="method-args">(flag)</span>
212
+ </a>
213
+ </div>
214
+
215
+ <div class="method-description">
216
+ <p><a class="source-toggle" href="#"
217
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
218
+ <div class="method-source-code" id="M000043-source">
219
+ <pre>
220
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 121</span>
221
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debug=</span>(<span class="ruby-identifier">flag</span>)
222
+ <span class="ruby-ivar">@@debug</span> = <span class="ruby-identifier">flag</span>
223
+ <span class="ruby-keyword kw">end</span>
224
+ </pre>
225
+ </div>
226
+ </div>
227
+ </div>
228
+
229
+ <div id="method-M000030" class="method-detail">
230
+ <a name="M000030"></a>
231
+
232
+ <div class="method-heading">
233
+ <a href="#M000030" class="method-signature">
234
+ <span class="method-name">default_properties</span><span class="method-args">()</span>
235
+ </a>
236
+ </div>
237
+
238
+ <div class="method-description">
239
+ <p><a class="source-toggle" href="#"
240
+ onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
241
+ <div class="method-source-code" id="M000030-source">
242
+ <pre>
243
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 44</span>
244
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">default_properties</span>
245
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@default_properties</span>
246
+ <span class="ruby-keyword kw">end</span>
247
+ </pre>
248
+ </div>
249
+ </div>
250
+ </div>
251
+
252
+ <div id="method-M000031" class="method-detail">
253
+ <a name="M000031"></a>
254
+
255
+ <div class="method-heading">
256
+ <a href="#M000031" class="method-signature">
257
+ <span class="method-name">default_properties=</span><span class="method-args">(hash)</span>
258
+ </a>
259
+ </div>
260
+
261
+ <div class="method-description">
262
+ <p><a class="source-toggle" href="#"
263
+ onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
264
+ <div class="method-source-code" id="M000031-source">
265
+ <pre>
266
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 48</span>
267
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">default_properties=</span>(<span class="ruby-identifier">hash</span>)
268
+ <span class="ruby-ivar">@@default_properties</span> = <span class="ruby-identifier">hash</span>
269
+ <span class="ruby-keyword kw">end</span>
270
+ </pre>
271
+ </div>
272
+ </div>
273
+ </div>
274
+
275
+ <div id="method-M000041" class="method-detail">
276
+ <a name="M000041"></a>
277
+
278
+ <div class="method-heading">
279
+ <a href="#M000041" class="method-signature">
280
+ <span class="method-name">get_cache</span><span class="method-args">(filename)</span>
281
+ </a>
282
+ </div>
283
+
284
+ <div class="method-description">
285
+ <p><a class="source-toggle" href="#"
286
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
287
+ <div class="method-source-code" id="M000041-source">
288
+ <pre>
289
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 110</span>
290
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_cache</span>(<span class="ruby-identifier">filename</span>)
291
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@cache_table</span>[<span class="ruby-identifier">filename</span>]
292
+ <span class="ruby-keyword kw">end</span>
293
+ </pre>
294
+ </div>
295
+ </div>
296
+ </div>
297
+
298
+ <div id="method-M000036" class="method-detail">
299
+ <a name="M000036"></a>
300
+
301
+ <div class="method-heading">
302
+ <a href="#M000036" class="method-signature">
303
+ <span class="method-name">lang</span><span class="method-args">()</span>
304
+ </a>
305
+ </div>
306
+
307
+ <div class="method-description">
308
+ <p><a class="source-toggle" href="#"
309
+ onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
310
+ <div class="method-source-code" id="M000036-source">
311
+ <pre>
312
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 77</span>
313
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lang</span>
314
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@lang</span>
315
+ <span class="ruby-keyword kw">end</span>
316
+ </pre>
317
+ </div>
318
+ </div>
319
+ </div>
320
+
321
+ <div id="method-M000037" class="method-detail">
322
+ <a name="M000037"></a>
323
+
324
+ <div class="method-heading">
325
+ <a href="#M000037" class="method-signature">
326
+ <span class="method-name">lang=</span><span class="method-args">(lang)</span>
327
+ </a>
328
+ </div>
329
+
330
+ <div class="method-description">
331
+ <p><a class="source-toggle" href="#"
332
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
333
+ <div class="method-source-code" id="M000037-source">
334
+ <pre>
335
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 81</span>
336
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lang=</span>(<span class="ruby-identifier">lang</span>)
337
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">lang</span>
338
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'rails'</span>, <span class="ruby-value str">'ruby'</span>, <span class="ruby-value str">'eruby'</span>, <span class="ruby-value str">'erubis'</span>, <span class="ruby-value str">'pierubis'</span>
339
+ <span class="ruby-ivar">@@lang</span> = <span class="ruby-identifier">lang</span>
340
+ <span class="ruby-keyword kw">else</span>
341
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;'#{lang}': invalid language name.&quot;</span>
342
+ <span class="ruby-keyword kw">end</span>
343
+ <span class="ruby-keyword kw">end</span>
344
+ </pre>
345
+ </div>
346
+ </div>
347
+ </div>
348
+
349
+ <div id="method-M000044" class="method-detail">
350
+ <a name="M000044"></a>
351
+
352
+ <div class="method-heading">
353
+ <a href="#M000044" class="method-signature">
354
+ <span class="method-name">new</span><span class="method-args">(view)</span>
355
+ </a>
356
+ </div>
357
+
358
+ <div class="method-description">
359
+ <p><a class="source-toggle" href="#"
360
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
361
+ <div class="method-source-code" id="M000044-source">
362
+ <pre>
363
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 126</span>
364
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">view</span>)
365
+ <span class="ruby-ivar">@view</span> = <span class="ruby-identifier">view</span>
366
+ <span class="ruby-keyword kw">end</span>
367
+ </pre>
368
+ </div>
369
+ </div>
370
+ </div>
371
+
372
+ <div id="method-M000032" class="method-detail">
373
+ <a name="M000032"></a>
374
+
375
+ <div class="method-heading">
376
+ <a href="#M000032" class="method-signature">
377
+ <span class="method-name">pdata_suffix</span><span class="method-args">()</span>
378
+ </a>
379
+ </div>
380
+
381
+ <div class="method-description">
382
+ <p><a class="source-toggle" href="#"
383
+ onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
384
+ <div class="method-source-code" id="M000032-source">
385
+ <pre>
386
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 55</span>
387
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">pdata_suffix</span>
388
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@pdata_suffix</span>
389
+ <span class="ruby-keyword kw">end</span>
390
+ </pre>
391
+ </div>
392
+ </div>
393
+ </div>
394
+
395
+ <div id="method-M000033" class="method-detail">
396
+ <a name="M000033"></a>
397
+
398
+ <div class="method-heading">
399
+ <a href="#M000033" class="method-signature">
400
+ <span class="method-name">pdata_suffix=</span><span class="method-args">(suffix)</span>
401
+ </a>
402
+ </div>
403
+
404
+ <div class="method-description">
405
+ <p><a class="source-toggle" href="#"
406
+ onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
407
+ <div class="method-source-code" id="M000033-source">
408
+ <pre>
409
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 59</span>
410
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">pdata_suffix=</span>(<span class="ruby-identifier">suffix</span>)
411
+ <span class="ruby-ivar">@@pdata_suffix</span> = <span class="ruby-identifier">suffix</span>
412
+ <span class="ruby-keyword kw">end</span>
413
+ </pre>
414
+ </div>
415
+ </div>
416
+ </div>
417
+
418
+ <div id="method-M000034" class="method-detail">
419
+ <a name="M000034"></a>
420
+
421
+ <div class="method-heading">
422
+ <a href="#M000034" class="method-signature">
423
+ <span class="method-name">plogic_suffix</span><span class="method-args">()</span>
424
+ </a>
425
+ </div>
426
+
427
+ <div class="method-description">
428
+ <p><a class="source-toggle" href="#"
429
+ onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
430
+ <div class="method-source-code" id="M000034-source">
431
+ <pre>
432
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 66</span>
433
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">plogic_suffix</span>
434
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@plogic_suffix</span>
435
+ <span class="ruby-keyword kw">end</span>
436
+ </pre>
437
+ </div>
438
+ </div>
439
+ </div>
440
+
441
+ <div id="method-M000035" class="method-detail">
442
+ <a name="M000035"></a>
443
+
444
+ <div class="method-heading">
445
+ <a href="#M000035" class="method-signature">
446
+ <span class="method-name">plogic_suffix=</span><span class="method-args">(suffix)</span>
447
+ </a>
448
+ </div>
449
+
450
+ <div class="method-description">
451
+ <p><a class="source-toggle" href="#"
452
+ onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
453
+ <div class="method-source-code" id="M000035-source">
454
+ <pre>
455
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 70</span>
456
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">plogic_suffix=</span>(<span class="ruby-identifier">suffix</span>)
457
+ <span class="ruby-ivar">@@plogic_suffix</span> = <span class="ruby-identifier">suffix</span>
458
+ <span class="ruby-keyword kw">end</span>
459
+ </pre>
460
+ </div>
461
+ </div>
462
+ </div>
463
+
464
+ <div id="method-M000038" class="method-detail">
465
+ <a name="M000038"></a>
466
+
467
+ <div class="method-heading">
468
+ <a href="#M000038" class="method-signature">
469
+ <span class="method-name">use_cache</span><span class="method-args">()</span>
470
+ </a>
471
+ </div>
472
+
473
+ <div class="method-description">
474
+ <p><a class="source-toggle" href="#"
475
+ onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
476
+ <div class="method-source-code" id="M000038-source">
477
+ <pre>
478
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 93</span>
479
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">use_cache</span>
480
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@use_cache</span>
481
+ <span class="ruby-keyword kw">end</span>
482
+ </pre>
483
+ </div>
484
+ </div>
485
+ </div>
486
+
487
+ <div id="method-M000039" class="method-detail">
488
+ <a name="M000039"></a>
489
+
490
+ <div class="method-heading">
491
+ <a href="#M000039" class="method-signature">
492
+ <span class="method-name">use_cache=</span><span class="method-args">(flag)</span>
493
+ </a>
494
+ </div>
495
+
496
+ <div class="method-description">
497
+ <p><a class="source-toggle" href="#"
498
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
499
+ <div class="method-source-code" id="M000039-source">
500
+ <pre>
501
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 97</span>
502
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">use_cache=</span>(<span class="ruby-identifier">flag</span>)
503
+ <span class="ruby-ivar">@@use_cache</span> = <span class="ruby-identifier">flag</span>
504
+ <span class="ruby-keyword kw">end</span>
505
+ </pre>
506
+ </div>
507
+ </div>
508
+ </div>
509
+
510
+ <h3 class="section-bar">Public Instance methods</h3>
511
+
512
+ <div id="method-M000045" class="method-detail">
513
+ <a name="M000045"></a>
514
+
515
+ <div class="method-heading">
516
+ <a href="#M000045" class="method-signature">
517
+ <span class="method-name">render</span><span class="method-args">(template, assigns)</span>
518
+ </a>
519
+ </div>
520
+
521
+ <div class="method-description">
522
+ <p><a class="source-toggle" href="#"
523
+ onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
524
+ <div class="method-source-code" id="M000045-source">
525
+ <pre>
526
+ <span class="ruby-comment cmt"># File kwartz/helper/rails.rb, line 131</span>
527
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>(<span class="ruby-identifier">template</span>, <span class="ruby-identifier">assigns</span>)
528
+
529
+ <span class="ruby-comment cmt">## reverse engineering</span>
530
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: render() called.&quot;</span>
531
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: RAILS_ENV=#{RAILS_ENV.inspect}&quot;</span>
532
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: self.class=#{self.class}&quot;</span>
533
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.class=#{@view.class}&quot;</span>
534
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: self.__id__=#{self.__id__.inspect}&quot;</span>
535
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.class.methods=#{(@view.class.methods - Class.methods).sort.inspect}&quot;</span>
536
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.controller.class.methods=#{(@view.controller.class.methods - Class.methods).sort.inspect}&quot;</span>
537
+ <span class="ruby-comment cmt">#</span>
538
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: instance_variables=#{instance_variables.inspect}&quot; #=&gt; [@views]</span>
539
+ <span class="ruby-comment cmt">#c = @view.controller</span>
540
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.controller.instance_variables=#{c.instance_variables.inspect}&quot;</span>
541
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.controller.action_name=#{c.action_name.inspect}&quot;</span>
542
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.controller.render_layout_basename=#{c.render_layout_basename.inspect}&quot;</span>
543
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.controller.render_template_basename=#{c.render_template_basename.inspect}&quot;</span>
544
+ <span class="ruby-comment cmt">#require 'pp'</span>
545
+ <span class="ruby-comment cmt">#c = @view.controller</span>
546
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.controller.instance_variable_get('@template')=&quot;</span>
547
+ <span class="ruby-comment cmt">#PP.pp(c.instance_variable_get('@template'), $stderr)</span>
548
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.controller.methods=&quot;</span>
549
+ <span class="ruby-comment cmt">#PP.pp((c.methods - Object.new.methods).sort, $stderr)</span>
550
+ <span class="ruby-comment cmt">#$stderr.puts &quot;*** debug: @view.controller.class.methods=&quot;</span>
551
+ <span class="ruby-comment cmt">#PP.pp((c.class.methods - Class.methods).sort, $stderr)</span>
552
+
553
+ <span class="ruby-comment cmt">## return if @content_for_layout is set</span>
554
+ <span class="ruby-identifier">template_</span> = <span class="ruby-ivar">@view</span>.<span class="ruby-identifier">controller</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">&quot;@template&quot;</span>)
555
+ <span class="ruby-identifier">content_for_layout_</span> = <span class="ruby-identifier">template_</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">&quot;@content_for_layout&quot;</span>)
556
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">content_for_layout_</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">content_for_layout_</span>
557
+
558
+ <span class="ruby-comment cmt">## template basename and layout basename</span>
559
+ <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@view</span>.<span class="ruby-identifier">controller</span>
560
+ <span class="ruby-identifier">template_root</span> = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">template_root</span> <span class="ruby-comment cmt"># or c.class.template_root</span>
561
+ <span class="ruby-comment cmt">#template_basename = &quot;#{template_root}/#{c.controller_name}/#{c.action_name}&quot;</span>
562
+ <span class="ruby-comment cmt">#layout_basename = &quot;#{template_root}/layouts/#{c.controller_name}&quot;</span>
563
+ <span class="ruby-identifier">template_basename</span> = <span class="ruby-node">&quot;#{template_root}/#{c.render_template_basename}&quot;</span>
564
+ <span class="ruby-identifier">layout_basename</span> = <span class="ruby-node">&quot;#{template_root}/#{c.render_layout_basename}&quot;</span>
565
+
566
+ <span class="ruby-comment cmt">## check timestamps</span>
567
+ <span class="ruby-identifier">convert_flag</span> = <span class="ruby-keyword kw">true</span>
568
+ <span class="ruby-identifier">cache_filename</span> = <span class="ruby-identifier">template_basename</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'.cache'</span>
569
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">use_cache?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">cache_filename</span>)
570
+ <span class="ruby-identifier">filenames</span> = [
571
+ <span class="ruby-identifier">template_basename</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@@pdata_suffix</span>,
572
+ <span class="ruby-identifier">template_basename</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@@plogic_suffix</span>,
573
+ <span class="ruby-identifier">layout_basename</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@@pdata_suffix</span>,
574
+ <span class="ruby-identifier">layout_basename</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@@plogic_suffix</span>,
575
+ ]
576
+ <span class="ruby-identifier">mtime</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">cache_filename</span>)
577
+ <span class="ruby-identifier">convert_flag</span> = <span class="ruby-identifier">filenames</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">filename</span><span class="ruby-operator">|</span>
578
+ <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">filename</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">mtime</span>
579
+ }
580
+ <span class="ruby-keyword kw">end</span>
581
+
582
+ <span class="ruby-comment cmt">## convert templates into ruby code, or get cached object</span>
583
+ <span class="ruby-identifier">logger</span> = <span class="ruby-ivar">@view</span>.<span class="ruby-identifier">controller</span>.<span class="ruby-identifier">logger</span>
584
+ <span class="ruby-identifier">msgstr</span> = <span class="ruby-node">&quot;template='#{template_basename}#{@@pdata_suffix}'&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
585
+ <span class="ruby-identifier">logname</span> = <span class="ruby-node">&quot;*** #{self.class.name}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
586
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">convert_flag</span>
587
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;#{logname}: convert template file: #{msgstr}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
588
+ <span class="ruby-identifier">ruby_code</span> = <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">template</span>, <span class="ruby-identifier">template_basename</span>, <span class="ruby-identifier">layout_basename</span>)
589
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">cache_filename</span>, <span class="ruby-value str">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">ruby_code</span>) } <span class="ruby-comment cmt"># write cache</span>
590
+ <span class="ruby-identifier">proc_obj</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">add_cache</span>(<span class="ruby-identifier">ruby_code</span>, <span class="ruby-identifier">cache_filename</span>)
591
+ <span class="ruby-keyword kw">elsif</span> (<span class="ruby-identifier">proc_obj</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">get_cache</span>(<span class="ruby-identifier">cache_filename</span>)).<span class="ruby-identifier">nil?</span>
592
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;#{logname}: read cache file: #{msgstr}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
593
+ <span class="ruby-identifier">ruby_code</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">cache_filename</span>)
594
+ <span class="ruby-identifier">proc_obj</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">add_cache</span>(<span class="ruby-identifier">ruby_code</span>, <span class="ruby-identifier">cache_filename</span>)
595
+ <span class="ruby-keyword kw">else</span>
596
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">info</span> <span class="ruby-node">&quot;#{logname}: reuse cached proc object: #{msgstr}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>
597
+ <span class="ruby-keyword kw">end</span>
598
+
599
+ <span class="ruby-comment cmt">## use @view as context object</span>
600
+ <span class="ruby-ivar">@view</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">:evaluate_assigns</span>)
601
+ <span class="ruby-comment cmt">#or @view.instance_eval(&quot;evaluate_assigns()&quot;)</span>
602
+ <span class="ruby-identifier">context</span> = <span class="ruby-ivar">@view</span>
603
+
604
+ <span class="ruby-comment cmt">## evaluate ruby code with context object</span>
605
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">assigns</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">assigns</span>.<span class="ruby-identifier">empty?</span>
606
+ <span class="ruby-comment cmt">#return _evaluate_string(ruby_code, context, assigns)</span>
607
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">evaluate_proc</span>(<span class="ruby-identifier">proc_obj</span>, <span class="ruby-identifier">context</span>, <span class="ruby-identifier">assigns</span>)
608
+ <span class="ruby-keyword kw">else</span>
609
+ <span class="ruby-comment cmt">#return context.instance_eval(ruby_code)</span>
610
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">proc_obj</span>)
611
+ <span class="ruby-keyword kw">end</span>
612
+ <span class="ruby-keyword kw">end</span>
613
+ </pre>
614
+ </div>
615
+ </div>
616
+ </div>
617
+
618
+
619
+ </div>
620
+
621
+
622
+ </div>
623
+
624
+
625
+ <div id="validator-badges">
626
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
627
+ </div>
628
+
629
+ </body>
630
+ </html>