erbse 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +3 -0
  3. data/Gemfile +3 -0
  4. data/README.md +40 -22
  5. data/Rakefile +13 -0
  6. data/lib/erbse.rb +3 -6
  7. data/lib/erbse/converter.rb +41 -241
  8. data/lib/erbse/eruby.rb +114 -0
  9. data/lib/erbse/template.rb +14 -0
  10. data/lib/erbse/version.rb +1 -1
  11. data/test/erbse_test.rb +14 -0
  12. data/test/test_helper.rb +2 -0
  13. metadata +9 -149
  14. data/CHANGES.txt +0 -828
  15. data/bin/erubis +0 -10
  16. data/lib/erbse/context.rb +0 -83
  17. data/lib/erbse/engine.rb +0 -114
  18. data/lib/erbse/engine/ec.rb +0 -117
  19. data/lib/erbse/engine/ecpp.rb +0 -113
  20. data/lib/erbse/engine/ejava.rb +0 -110
  21. data/lib/erbse/engine/ejavascript.rb +0 -119
  22. data/lib/erbse/engine/enhanced.rb +0 -126
  23. data/lib/erbse/engine/eperl.rb +0 -95
  24. data/lib/erbse/engine/ephp.rb +0 -99
  25. data/lib/erbse/engine/eruby.rb +0 -119
  26. data/lib/erbse/engine/escheme.rb +0 -114
  27. data/lib/erbse/engine/optimized.rb +0 -127
  28. data/lib/erbse/enhancer.rb +0 -723
  29. data/lib/erbse/error.rb +0 -23
  30. data/lib/erbse/evaluator.rb +0 -88
  31. data/lib/erbse/generator.rb +0 -85
  32. data/lib/erbse/helper.rb +0 -47
  33. data/lib/erbse/helpers/rails_form_helper.rb +0 -197
  34. data/lib/erbse/helpers/rails_helper.rb +0 -353
  35. data/lib/erbse/main.rb +0 -516
  36. data/lib/erbse/preprocessing.rb +0 -58
  37. data/lib/erbse/tiny.rb +0 -144
  38. data/lib/erbse/util.rb +0 -22
  39. data/test/assert-text-equal.rb +0 -44
  40. data/test/data/users-guide/Example.ejava +0 -55
  41. data/test/data/users-guide/array_example.result +0 -9
  42. data/test/data/users-guide/arraybuffer_example.result +0 -9
  43. data/test/data/users-guide/bipattern-example.rhtml +0 -4
  44. data/test/data/users-guide/bipattern_example.result +0 -6
  45. data/test/data/users-guide/bufvar-example.rb +0 -10
  46. data/test/data/users-guide/bufvar-example.result +0 -17
  47. data/test/data/users-guide/context.rb +0 -6
  48. data/test/data/users-guide/context.yaml +0 -8
  49. data/test/data/users-guide/def_method.rb +0 -14
  50. data/test/data/users-guide/def_method.result +0 -3
  51. data/test/data/users-guide/escape_example.result +0 -9
  52. data/test/data/users-guide/example.ec +0 -27
  53. data/test/data/users-guide/example.ecpp +0 -30
  54. data/test/data/users-guide/example.ejs +0 -20
  55. data/test/data/users-guide/example.eperl +0 -18
  56. data/test/data/users-guide/example.ephp +0 -18
  57. data/test/data/users-guide/example.eruby +0 -6
  58. data/test/data/users-guide/example.escheme +0 -28
  59. data/test/data/users-guide/example1.eruby +0 -6
  60. data/test/data/users-guide/example1.rb +0 -17
  61. data/test/data/users-guide/example1.result +0 -16
  62. data/test/data/users-guide/example10.rb +0 -4
  63. data/test/data/users-guide/example10.result +0 -17
  64. data/test/data/users-guide/example10.xhtml +0 -14
  65. data/test/data/users-guide/example10_x.result +0 -17
  66. data/test/data/users-guide/example11.php +0 -20
  67. data/test/data/users-guide/example11.result +0 -23
  68. data/test/data/users-guide/example11.rhtml +0 -21
  69. data/test/data/users-guide/example11_C.result +0 -10
  70. data/test/data/users-guide/example11_N.result +0 -16
  71. data/test/data/users-guide/example11_U.result +0 -16
  72. data/test/data/users-guide/example11_php.result +0 -15
  73. data/test/data/users-guide/example1_x.result +0 -9
  74. data/test/data/users-guide/example2.eruby +0 -7
  75. data/test/data/users-guide/example2.rb +0 -10
  76. data/test/data/users-guide/example2.result +0 -27
  77. data/test/data/users-guide/example2_trim.result +0 -10
  78. data/test/data/users-guide/example2_x.result +0 -10
  79. data/test/data/users-guide/example3.eruby +0 -6
  80. data/test/data/users-guide/example3.rb +0 -10
  81. data/test/data/users-guide/example31.result +0 -22
  82. data/test/data/users-guide/example32.result +0 -4
  83. data/test/data/users-guide/example3_e.result +0 -8
  84. data/test/data/users-guide/example4.eruby +0 -3
  85. data/test/data/users-guide/example4.rb +0 -11
  86. data/test/data/users-guide/example4.result +0 -10
  87. data/test/data/users-guide/example4_x.result +0 -5
  88. data/test/data/users-guide/example5.eruby +0 -6
  89. data/test/data/users-guide/example5.rb +0 -16
  90. data/test/data/users-guide/example5.result +0 -7
  91. data/test/data/users-guide/example6.rb +0 -12
  92. data/test/data/users-guide/example6.result +0 -7
  93. data/test/data/users-guide/example7.eruby +0 -8
  94. data/test/data/users-guide/example71.result +0 -13
  95. data/test/data/users-guide/example72.result +0 -13
  96. data/test/data/users-guide/example8.eruby +0 -6
  97. data/test/data/users-guide/example8_ruby.result +0 -7
  98. data/test/data/users-guide/example8_yaml.result +0 -7
  99. data/test/data/users-guide/example9.eruby +0 -3
  100. data/test/data/users-guide/example9.rb +0 -8
  101. data/test/data/users-guide/example9.result +0 -9
  102. data/test/data/users-guide/example91.result +0 -5
  103. data/test/data/users-guide/example92.result +0 -4
  104. data/test/data/users-guide/example_c.result +0 -32
  105. data/test/data/users-guide/example_java.result +0 -56
  106. data/test/data/users-guide/example_js.result +0 -22
  107. data/test/data/users-guide/example_perl.result +0 -20
  108. data/test/data/users-guide/example_php.result +0 -19
  109. data/test/data/users-guide/example_scheme.result +0 -30
  110. data/test/data/users-guide/example_scheme_display.result +0 -29
  111. data/test/data/users-guide/fasteruby-example.rb +0 -8
  112. data/test/data/users-guide/fasteruby-example.result +0 -18
  113. data/test/data/users-guide/fasteruby.rb +0 -11
  114. data/test/data/users-guide/fasteruby.result +0 -38
  115. data/test/data/users-guide/fasteruby.rhtml +0 -15
  116. data/test/data/users-guide/headerfooter-example.eruby +0 -9
  117. data/test/data/users-guide/headerfooter-example2.rb +0 -8
  118. data/test/data/users-guide/headerfooter-example2.rhtml +0 -10
  119. data/test/data/users-guide/headerfooter_example.result +0 -11
  120. data/test/data/users-guide/headerfooter_example2.result +0 -13
  121. data/test/data/users-guide/interpolation_example.result +0 -9
  122. data/test/data/users-guide/main_program1.rb +0 -8
  123. data/test/data/users-guide/main_program1.result +0 -6
  124. data/test/data/users-guide/main_program2.rb +0 -8
  125. data/test/data/users-guide/main_program2.result +0 -6
  126. data/test/data/users-guide/nocode-example.eruby +0 -14
  127. data/test/data/users-guide/nocode-php.result +0 -20
  128. data/test/data/users-guide/nocode_example.result +0 -15
  129. data/test/data/users-guide/normal-eruby-test.eruby +0 -9
  130. data/test/data/users-guide/normal_eruby_test.result +0 -11
  131. data/test/data/users-guide/notext-example.eruby +0 -14
  132. data/test/data/users-guide/notext-example.php +0 -19
  133. data/test/data/users-guide/notext-php.result +0 -20
  134. data/test/data/users-guide/notext_example.result +0 -16
  135. data/test/data/users-guide/percentline-example.rhtml +0 -6
  136. data/test/data/users-guide/percentline_example.result +0 -9
  137. data/test/data/users-guide/prefixedline-example.rb +0 -9
  138. data/test/data/users-guide/prefixedline-example.rhtml +0 -6
  139. data/test/data/users-guide/prefixedline_example.result +0 -9
  140. data/test/data/users-guide/printenable_example.result +0 -4
  141. data/test/data/users-guide/printenabled-example.eruby +0 -3
  142. data/test/data/users-guide/printenabled-example.rb +0 -8
  143. data/test/data/users-guide/printstatement_example.result +0 -8
  144. data/test/data/users-guide/simplify_example.result +0 -9
  145. data/test/data/users-guide/stderr.log +0 -3
  146. data/test/data/users-guide/stdout_exmple.result +0 -9
  147. data/test/data/users-guide/stringbuffer_example.result +0 -9
  148. data/test/data/users-guide/tail_260.result +0 -4
  149. data/test/data/users-guide/tailnewline.rhtml +0 -3
  150. data/test/data/users-guide/template1.rhtml +0 -4
  151. data/test/data/users-guide/template2.rhtml +0 -4
  152. data/test/test-engines.rb +0 -425
  153. data/test/test-enhancers.rb +0 -646
  154. data/test/test-erubis.rb +0 -887
  155. data/test/test-index-cgi.rb +0 -191
  156. data/test/test-main.rb +0 -752
  157. data/test/test-users-guide.rb +0 -73
  158. data/test/test.rb +0 -45
  159. data/test/testutil.rb +0 -111
@@ -1,3 +0,0 @@
1
- *** debug: item="<aaa>"
2
- *** debug: item="b&b"
3
- *** debug: item="\"ccc\""
@@ -1,9 +0,0 @@
1
- $ erubis -xE Stdout example.eruby
2
- _buf = $stdout; _buf << '<div>
3
- '; for item in list
4
- _buf << ' <p>'; _buf << ( item ).to_s; _buf << '</p>
5
- <p>'; _buf << Erubis::XmlHelper.escape_xml( item ); _buf << '</p>
6
- '; end
7
- _buf << '</div>
8
- ';
9
- ''
@@ -1,9 +0,0 @@
1
- $ erubis -xE StringBuffer example.eruby
2
- _buf = ''; _buf << '<div>
3
- '; for item in list
4
- _buf << ' <p>'; _buf << ( item ).to_s; _buf << '</p>
5
- <p>'; _buf << Erubis::XmlHelper.escape_xml( item ); _buf << '</p>
6
- '; end
7
- _buf << '</div>
8
- ';
9
- _buf.to_s
@@ -1,4 +0,0 @@
1
- $ erubis -c '{var: "AAA\n"}' tailnewline.rhtml
2
- <div>
3
- AAA
4
- </div>
@@ -1,3 +0,0 @@
1
- <div>
2
- <%= @var -%>
3
- </div>
@@ -1,4 +0,0 @@
1
- <% for x in items %>
2
- item = <%= x %>
3
- <% end %>
4
- ** debug: local variables=<%= local_variables().inspect() %>
@@ -1,4 +0,0 @@
1
- <% for x in @items %>
2
- item = <%= x %>
3
- <% end %>
4
- ** debug: local variables=<%= local_variables().inspect() %>
@@ -1,425 +0,0 @@
1
- ##
2
- ## $Release: 2.7.0 $
3
- ## copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
4
- ##
5
-
6
- require "#{File.dirname(__FILE__)}/test.rb"
7
-
8
- require 'erubis'
9
- require 'erubis/engine/eruby'
10
- require 'erubis/engine/ephp'
11
- require 'erubis/engine/ec'
12
- require 'erubis/engine/ecpp'
13
- require 'erubis/engine/ejava'
14
- require 'erubis/engine/escheme'
15
- require 'erubis/engine/eperl'
16
- require 'erubis/engine/ejavascript'
17
-
18
-
19
- class EnginesTest < Test::Unit::TestCase
20
-
21
- #load_yaml_documents(__FILE__)
22
- testdata_list = load_yaml_datafile(__FILE__)
23
- define_testmethods(testdata_list)
24
-
25
- def _test()
26
- klass = Erubis.const_get(@class)
27
- engine = klass.new(@input, @options || {})
28
- actual = engine.src
29
- assert_text_equal(@expected, actual)
30
- end
31
-
32
-
33
- self.post_definition()
34
-
35
- end
36
-
37
- __END__
38
- - name: ruby1
39
- lang: ruby
40
- class: Eruby
41
- options:
42
- input: |
43
- <table>
44
- <tbody>
45
- <% i = 0
46
- list.each_with_index do |item, i| %>
47
- <tr>
48
- <td><%= i+1 %></td>
49
- <td><%== list %></td>
50
- </tr>
51
- <% end %>
52
- </tbody>
53
- </table>
54
- <%=== i+1 %>
55
- expected: |
56
- _buf = ''; _buf << '<table>
57
- <tbody>
58
- '; i = 0
59
- list.each_with_index do |item, i|
60
- _buf << ' <tr>
61
- <td>'; _buf << ( i+1 ).to_s; _buf << '</td>
62
- <td>'; _buf << Erubis::XmlHelper.escape_xml( list ); _buf << '</td>
63
- </tr>
64
- '; end
65
- _buf << ' </tbody>
66
- </table>
67
- '; $stderr.puts("*** debug: i+1=#{(i+1).inspect}"); _buf << '
68
- ';
69
- _buf.to_s
70
- ##
71
- - name: ruby2_options
72
- lang: ruby
73
- class: Eruby
74
- options: { :bufvar: '@_out_buf' }
75
- input: |
76
- <table>
77
- <% for item in @items %>
78
- <tr>
79
- <td><%= i+1 %></td>
80
- <td><%== list %></td>
81
- </tr>
82
- <% end %>
83
- </table>
84
- expected: |
85
- @_out_buf = ''; @_out_buf << '<table>
86
- '; for item in @items
87
- @_out_buf << ' <tr>
88
- <td>'; @_out_buf << ( i+1 ).to_s; @_out_buf << '</td>
89
- <td>'; @_out_buf << Erubis::XmlHelper.escape_xml( list ); @_out_buf << '</td>
90
- </tr>
91
- '; end
92
- @_out_buf << '</table>
93
- ';
94
- @_out_buf.to_s
95
- ##
96
- - name: php1
97
- lang: php
98
- class: Ephp
99
- options:
100
- input: |
101
- <table>
102
- <tbody>
103
- <%
104
- $i = 0;
105
- foreach ($list as $item) {
106
- $i++;
107
- %>
108
- <tr>
109
- <td><%= $i %></td>
110
- <td><%== $item %></td>
111
- </tr>
112
- <%
113
- }
114
- %>
115
- </tbody>
116
- </table>
117
- <%=== $i %>
118
- expected: |
119
- <table>
120
- <tbody>
121
- <?php
122
- $i = 0;
123
- foreach ($list as $item) {
124
- $i++;
125
- ?>
126
- <tr>
127
- <td><?php echo $i; ?></td>
128
- <td><?php echo htmlspecialchars($item); ?></td>
129
- </tr>
130
- <?php
131
- }
132
- ?>
133
- </tbody>
134
- </table>
135
- <?php error_log('*** debug: $i='.($i), 0); ?>
136
- ##
137
- - name: c1
138
- lang: c
139
- class: Ec
140
- options: { :filename: foo.html, :indent: ' ' }
141
- input: |4
142
- <table>
143
- <tbody>
144
- <% for (i = 0; i < list; i++) { %>
145
- <tr>
146
- <td><%= "%d", i %></td>
147
- <td><%== list[i] %></td>
148
- </tr>
149
- <% } %>
150
- </tbody>
151
- </table>
152
- <%=== "%d", i %>
153
- expected: |
154
- #line 1 "foo.html"
155
- fputs("<table>\n"
156
- " <tbody>\n", stdout);
157
- for (i = 0; i < list; i++) {
158
- fputs(" <tr>\n"
159
- " <td>", stdout); fprintf(stdout, "%d", i); fputs("</td>\n"
160
- " <td>", stdout); escape(list[i], stdout); fputs("</td>\n"
161
- " </tr>\n", stdout);
162
- }
163
- fputs(" </tbody>\n"
164
- "</table>\n", stdout);
165
- fprintf(stderr, "*** debug: i=" "%d", i); fputs("\n", stdout);
166
- ##
167
- - name: cpp1
168
- lang: cpp
169
- class: Ecpp
170
- options: { :filename: foo.html, :indent: ' ' }
171
- input: |4
172
- <table>
173
- <tbody>
174
- <% for (i = 0; i < n; i++) { %>
175
- <tr>
176
- <td><%= i %></td>
177
- <td><%== list[i] %></td>
178
- </tr>
179
- <% } %>
180
- </tbody>
181
- </table>
182
- <%=== i %>
183
- expected: |
184
- #line 1 "foo.html"
185
- _buf << "<table>\n"
186
- " <tbody>\n";
187
- for (i = 0; i < n; i++) {
188
- _buf << " <tr>\n"
189
- " <td>"; _buf << (i); _buf << "</td>\n"
190
- " <td>"; escape(list[i]); _buf << "</td>\n"
191
- " </tr>\n";
192
- }
193
- _buf << " </tbody>\n"
194
- "</table>\n";
195
- std::cerr << "*** debug: i=" << (i); _buf << "\n";
196
- ##
197
- - name: java1
198
- lang: java
199
- class: Ejava
200
- options: { :buf: _buf, :bufclass: StringBuilder, :indent: ' ' }
201
- input: |
202
- <table>
203
- <tbody>
204
- <%
205
- int i = 0;
206
- for (Iterator it = list.iterator(); it.hasNext(); ) {
207
- String s = (String)it.next();
208
- i++;
209
- %>
210
- <tr class="<%= i%2==0 ? "even" : "odd" %>">
211
- <td><%= i %></td>
212
- <td><%== s %></td>
213
- </tr>
214
- <%
215
- }
216
- %>
217
- <tbody>
218
- </table>
219
- <%=== i %>
220
- expected: |4
221
- StringBuilder _buf = new StringBuilder(); _buf.append("<table>\n"
222
- + " <tbody>\n");
223
-
224
- int i = 0;
225
- for (Iterator it = list.iterator(); it.hasNext(); ) {
226
- String s = (String)it.next();
227
- i++;
228
-
229
- _buf.append(" <tr class=\""); _buf.append(i%2==0 ? "even" : "odd"); _buf.append("\">\n"
230
- + " <td>"); _buf.append(i); _buf.append("</td>\n"
231
- + " <td>"); _buf.append(escape(s)); _buf.append("</td>\n"
232
- + " </tr>\n");
233
-
234
- }
235
-
236
- _buf.append(" <tbody>\n"
237
- + "</table>\n");
238
- System.err.println("*** debug: i="+(i)); _buf.append("\n");
239
- return _buf.toString();
240
- ##
241
- - name: scheme1
242
- lang: scheme
243
- class: Escheme
244
- options:
245
- input: &scheme1_input|
246
- <% (let ((i 0)) %>
247
- <table>
248
- <tbody>
249
- <%
250
- (for-each
251
- (lambda (item)
252
- (set! i (+ i 1))
253
- %>
254
- <tr>
255
- <td><%= i %></td>
256
- <td><%== item %></td>
257
- </tr>
258
- <%
259
- ); lambda end
260
- list); for-each end
261
- %>
262
- </tbody>
263
- </table>
264
- <%=== i %>
265
- <% ); let end %>
266
- expected: |4
267
- (let ((_buf '())) (define (_add x) (set! _buf (cons x _buf))) (let ((i 0))
268
- (_add "<table>
269
- <tbody>\n")
270
-
271
- (for-each
272
- (lambda (item)
273
- (set! i (+ i 1))
274
-
275
- (_add " <tr>
276
- <td>")(_add i)(_add "</td>
277
- <td>")(_add (escape item))(_add "</td>
278
- </tr>\n")
279
-
280
- ); lambda end
281
- list); for-each end
282
-
283
- (_add " </tbody>
284
- </table>\n")
285
- (display "*** debug: i=")(display i)(display "\n")(_add "\n")
286
- ); let end
287
- (reverse _buf))
288
-
289
- ##
290
- - name: scheme2
291
- lang: scheme
292
- class: Escheme
293
- options: { :func: 'display' }
294
- input: *scheme1_input
295
- expected: |4
296
- (let ((i 0))
297
- (display "<table>
298
- <tbody>\n")
299
-
300
- (for-each
301
- (lambda (item)
302
- (set! i (+ i 1))
303
-
304
- (display " <tr>
305
- <td>")(display i)(display "</td>
306
- <td>")(display (escape item))(display "</td>
307
- </tr>\n")
308
-
309
- ); lambda end
310
- list); for-each end
311
-
312
- (display " </tbody>
313
- </table>\n")
314
- (display "*** debug: i=")(display i)(display "\n")(display "\n")
315
- ); let end
316
- ##
317
- - name: perl1
318
- lang: perl
319
- class: Eperl
320
- options:
321
- input: |
322
- <%
323
- my $user = 'Erubis';
324
- my @list = ('<aaa>', 'b&b', '"ccc"');
325
- %>
326
- <p>Hello <%= $user %>!</p>
327
- <table>
328
- <tbody>
329
- <% $i = 0; %>
330
- <% for $item (@list) { %>
331
- <tr bgcolor=<%= ++$i % 2 == 0 ? '#FFCCCC' : '#CCCCFF' %>">
332
- <td><%= $i %></td>
333
- <td><%== $item %></td>
334
- </tr>
335
- <% } %>
336
- </tbody>
337
- </table>
338
- <%=== $i %>
339
- expected: |4
340
- use HTML::Entities;
341
- my $user = 'Erubis';
342
- my @list = ('<aaa>', 'b&b', '"ccc"');
343
-
344
- print('<p>Hello '); print($user); print('!</p>
345
- <table>
346
- <tbody>
347
- '); $i = 0;
348
- for $item (@list) {
349
- print(' <tr bgcolor='); print(++$i % 2 == 0 ? '#FFCCCC' : '#CCCCFF'); print('">
350
- <td>'); print($i); print('</td>
351
- <td>'); print(encode_entities($item)); print('</td>
352
- </tr>
353
- '); }
354
- print(' </tbody>
355
- </table>
356
- '); print('*** debug: $i=', $i, "\n");print('
357
- ');
358
- ##
359
- - name: javascript1
360
- lang: javascript
361
- class: Ejavascript
362
- options:
363
- input: &javascript_input |
364
- <%
365
- var user = 'Erubis';
366
- var list = ['<aaa>', 'b&b', '"ccc"'];
367
- %>
368
- <p>Hello <%= user %>!</p>
369
- <table>
370
- <tbody>
371
- <% var i; %>
372
- <% for (i = 0; i < list.length; i++) { %>
373
- <tr bgcolor=<%= ++i % 2 == 0 ? '#FFCCCC' : '#CCCCFF' %>">
374
- <td><%= i %></td>
375
- <td><%= list[i] %></td>
376
- </tr>
377
- <% } %>
378
- </tbody>
379
- </table>
380
- <%=== i %>
381
- expected: |4
382
- var _buf = [];
383
- var user = 'Erubis';
384
- var list = ['<aaa>', 'b&b', '"ccc"'];
385
-
386
- _buf.push("<p>Hello "); _buf.push(user); _buf.push("!</p>\n\
387
- <table>\n\
388
- <tbody>\n");
389
- var i;
390
- for (i = 0; i < list.length; i++) {
391
- _buf.push(" <tr bgcolor="); _buf.push(++i % 2 == 0 ? '#FFCCCC' : '#CCCCFF'); _buf.push("\">\n\
392
- <td>"); _buf.push(i); _buf.push("</td>\n\
393
- <td>"); _buf.push(list[i]); _buf.push("</td>\n\
394
- </tr>\n");
395
- }
396
- _buf.push(" </tbody>\n\
397
- </table>\n");
398
- alert("*** debug: i="+(i)); _buf.push("\n");
399
- document.write(_buf.join(""));
400
- ##
401
- - name: javascript2
402
- lang: javascript
403
- class: Ejavascript
404
- options: { :docwrite: false }
405
- input: *javascript_input
406
- expected: |4
407
- var _buf = [];
408
- var user = 'Erubis';
409
- var list = ['<aaa>', 'b&b', '"ccc"'];
410
-
411
- _buf.push("<p>Hello "); _buf.push(user); _buf.push("!</p>\n\
412
- <table>\n\
413
- <tbody>\n");
414
- var i;
415
- for (i = 0; i < list.length; i++) {
416
- _buf.push(" <tr bgcolor="); _buf.push(++i % 2 == 0 ? '#FFCCCC' : '#CCCCFF'); _buf.push("\">\n\
417
- <td>"); _buf.push(i); _buf.push("</td>\n\
418
- <td>"); _buf.push(list[i]); _buf.push("</td>\n\
419
- </tr>\n");
420
- }
421
- _buf.push(" </tbody>\n\
422
- </table>\n");
423
- alert("*** debug: i="+(i)); _buf.push("\n");
424
- _buf.join("");
425
- ##