OSDN Git Service

* Added test code for <input value> attribute to CHTML1.0 converter.
[modchxj/mod_chxj.git] / src / chxj_chtml10.c
1 /*
2  * Copyright (C) 2005-2008 Atsushi Konno All rights reserved.
3  * Copyright (C) 2005 QSDN,Inc. All rights reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #include "chxj_chtml10.h"
18 #include "chxj_hdml.h"
19 #include "chxj_dump.h"
20 #include "chxj_img_conv.h"
21 #include "chxj_qr_code.h"
22 #include "chxj_cookie.h"
23 #include "chxj_encoding.h"
24 #include "chxj_buffered_write.h"
25
26 #define GET_CHTML10(X) ((chtml10_t*)(X))
27 #define W10_L(X)          do { chtml10->out = BUFFERED_WRITE_LITERAL(chtml10->out, &doc->buf, (X)); } while(0)
28 #define W10_V(X)          do { chtml10->out = (X) ? BUFFERED_WRITE_VALUE(chtml10->out, &doc->buf, (X))  \
29                                                   : BUFFERED_WRITE_LITERAL(chtml10->out, &doc->buf, ""); } while(0)
30
31 static char* s_chtml10_start_html_tag     (void* pdoc, Node* node);
32 static char* s_chtml10_end_html_tag       (void* pdoc, Node* node);
33 static char* s_chtml10_start_meta_tag     (void* pdoc, Node* node);
34 static char* s_chtml10_end_meta_tag       (void* pdoc, Node* node);
35 static char* s_chtml10_start_textarea_tag (void* pdoc, Node* node);
36 static char* s_chtml10_end_textarea_tag   (void* pdoc, Node* node);
37 static char* s_chtml10_start_p_tag        (void* pdoc, Node* node);
38 static char* s_chtml10_end_p_tag          (void* pdoc, Node* node);
39 static char* s_chtml10_start_pre_tag      (void* pdoc, Node* node);
40 static char* s_chtml10_end_pre_tag        (void* pdoc, Node* node);
41 static char* s_chtml10_start_ul_tag       (void* pdoc, Node* node);
42 static char* s_chtml10_end_ul_tag         (void* pdoc, Node* node);
43 static char* s_chtml10_start_li_tag       (void* pdoc, Node* node);
44 static char* s_chtml10_end_li_tag         (void* pdoc, Node* node);
45 static char* s_chtml10_start_ol_tag       (void* pdoc, Node* node);
46 static char* s_chtml10_end_ol_tag         (void* pdoc, Node* node);
47 static char* s_chtml10_start_h1_tag       (void* pdoc, Node* node);
48 static char* s_chtml10_end_h1_tag         (void* pdoc, Node* node);
49 static char* s_chtml10_start_h2_tag       (void* pdoc, Node* node);
50 static char* s_chtml10_end_h2_tag         (void* pdoc, Node* node);
51 static char* s_chtml10_start_h3_tag       (void* pdoc, Node* node);
52 static char* s_chtml10_end_h3_tag         (void* pdoc, Node* node);
53 static char* s_chtml10_start_h4_tag       (void* pdoc, Node* node);
54 static char* s_chtml10_end_h4_tag         (void* pdoc, Node* node);
55 static char* s_chtml10_start_h5_tag       (void* pdoc, Node* node);
56 static char* s_chtml10_end_h5_tag         (void* pdoc, Node* node);
57 static char* s_chtml10_start_h6_tag       (void* pdoc, Node* node);
58 static char* s_chtml10_end_h6_tag         (void* pdoc, Node* node);
59 static char* s_chtml10_start_head_tag     (void* pdoc, Node* node);
60 static char* s_chtml10_end_head_tag       (void* pdoc, Node* node);
61 static char* s_chtml10_start_title_tag    (void* pdoc, Node* node);
62 static char* s_chtml10_end_title_tag      (void* pdoc, Node* node);
63 static char* s_chtml10_start_base_tag     (void* pdoc, Node* node);
64 static char* s_chtml10_end_base_tag       (void* pdoc, Node* node);
65 static char* s_chtml10_start_body_tag     (void* pdoc, Node* node);
66 static char* s_chtml10_end_body_tag       (void* pdoc, Node* node);
67 static char* s_chtml10_start_a_tag        (void* pdoc, Node* node);
68 static char* s_chtml10_end_a_tag          (void* pdoc, Node* node);
69 static char* s_chtml10_start_br_tag       (void* pdoc, Node* node);
70 static char* s_chtml10_end_br_tag         (void* pdoc, Node* node);
71 static char* s_chtml10_start_tr_tag       (void* pdoc, Node* node);
72 static char* s_chtml10_end_tr_tag         (void* pdoc, Node* node);
73 static char* s_chtml10_start_font_tag     (void* pdoc, Node* node);
74 static char* s_chtml10_end_font_tag       (void* pdoc, Node* node);
75 static char* s_chtml10_start_input_tag    (void* pdoc, Node* node);
76 static char* s_chtml10_end_input_tag      (void* pdoc, Node* node);
77 static char* s_chtml10_start_form_tag     (void* pdoc, Node* node);
78 static char* s_chtml10_end_form_tag       (void* pdoc, Node* node);
79 static char* s_chtml10_start_center_tag   (void* pdoc, Node* node);
80 static char* s_chtml10_end_center_tag     (void* pdoc, Node* node);
81 static char* s_chtml10_start_hr_tag       (void* pdoc, Node* node);
82 static char* s_chtml10_end_hr_tag         (void* pdoc, Node* node);
83 static char* s_chtml10_start_img_tag      (void* pdoc, Node* node);
84 static char* s_chtml10_end_img_tag        (void* pdoc, Node* node);
85 static char* s_chtml10_start_select_tag   (void* pdoc, Node* node);
86 static char* s_chtml10_end_select_tag     (void* pdoc, Node* node);
87 static char* s_chtml10_start_option_tag   (void* pdoc, Node* node);
88 static char* s_chtml10_end_option_tag     (void* pdoc, Node* node);
89 static char* s_chtml10_start_div_tag      (void* pdoc, Node* node);
90 static char* s_chtml10_end_div_tag        (void* pdoc, Node* node);
91 static char* s_chtml10_start_blockquote_tag      (void* pdoc, Node* node);
92 static char* s_chtml10_end_blockquote_tag        (void* pdoc, Node* node);
93 static char* s_chtml10_start_dir_tag      (void* pdoc, Node* node);
94 static char* s_chtml10_end_dir_tag        (void* pdoc, Node* node);
95 static char* s_chtml10_start_dl_tag       (void* pdoc, Node* node);
96 static char* s_chtml10_end_dl_tag         (void* pdoc, Node* node);
97 static char* s_chtml10_start_dt_tag       (void* pdoc, Node* node);
98 static char* s_chtml10_end_dt_tag         (void* pdoc, Node* node);
99 static char* s_chtml10_start_dd_tag       (void* pdoc, Node* node);
100 static char* s_chtml10_end_dd_tag         (void* pdoc, Node* node);
101
102 static void  s_init_chtml10(chtml10_t* chtml, Doc* doc, request_rec* r, device_table* spec);
103
104 static int   s_chtml10_search_emoji(chtml10_t* chtml, char* txt, char** rslt);
105 static char* s_chtml10_chxjif_tag        (void* pdoc, Node* node);
106 static char* s_chtml10_text              (void* pdoc, Node* node);
107
108 tag_handler chtml10_handler[] = {
109   /* tagHTML */
110   {
111     s_chtml10_start_html_tag,
112     s_chtml10_end_html_tag,
113   },
114   /* tagMETA */
115   {
116     s_chtml10_start_meta_tag,
117     s_chtml10_end_meta_tag,
118   },
119   /* tagTEXTAREA */
120   {
121     s_chtml10_start_textarea_tag,
122     s_chtml10_end_textarea_tag,
123   },
124   /* tagP */
125   {
126     s_chtml10_start_p_tag,
127     s_chtml10_end_p_tag,
128   },
129   /* tagPRE */
130   {
131     s_chtml10_start_pre_tag,
132     s_chtml10_end_pre_tag,
133   },
134   /* tagUL */
135   {
136     s_chtml10_start_ul_tag,
137     s_chtml10_end_ul_tag,
138   },
139   /* tagLI */
140   {
141     s_chtml10_start_li_tag,
142     s_chtml10_end_li_tag,
143   },
144   /* tagOL */
145   {
146     s_chtml10_start_ol_tag,
147     s_chtml10_end_ol_tag,
148   },
149   /* tagH1 */
150   {
151     s_chtml10_start_h1_tag,
152     s_chtml10_end_h1_tag,
153   },
154   /* tagH2 */
155   {
156     s_chtml10_start_h2_tag,
157     s_chtml10_end_h2_tag,
158   },
159   /* tagH3 */
160   {
161     s_chtml10_start_h3_tag,
162     s_chtml10_end_h3_tag,
163   },
164   /* tagH4 */
165   {
166     s_chtml10_start_h4_tag,
167     s_chtml10_end_h4_tag,
168   },
169   /* tagH5 */
170   {
171     s_chtml10_start_h5_tag,
172     s_chtml10_end_h5_tag,
173   },
174   /* tagH6 */
175   {
176     s_chtml10_start_h6_tag,
177     s_chtml10_end_h6_tag,
178   },
179   /* tagHEAD */
180   {
181     s_chtml10_start_head_tag,
182     s_chtml10_end_head_tag,
183   },
184   /* tagTITLE */
185   {
186     s_chtml10_start_title_tag,
187     s_chtml10_end_title_tag,
188   },
189   /* tagBASE */
190   {
191     s_chtml10_start_base_tag,
192     s_chtml10_end_base_tag,
193   },
194   /* tagBODY */
195   {
196     s_chtml10_start_body_tag,
197     s_chtml10_end_body_tag,
198   },
199   /* tagA */
200   {
201     s_chtml10_start_a_tag,
202     s_chtml10_end_a_tag,
203   },
204   /* tagBR */
205   {
206     s_chtml10_start_br_tag,
207     s_chtml10_end_br_tag,
208   },
209   /* tagTABLE */
210   {
211     NULL,
212     NULL,
213   },
214   /* tagTR */
215   {
216     s_chtml10_start_tr_tag,
217     s_chtml10_end_tr_tag,
218   },
219   /* tagTD */
220   {
221     NULL,
222     NULL,
223   },
224   /* tagTBODY */
225   {
226     NULL,
227     NULL,
228   },
229   /* tagFONT */
230   {
231     s_chtml10_start_font_tag,
232     s_chtml10_end_font_tag,
233   },
234   /* tagFORM */
235   {
236     s_chtml10_start_form_tag,
237     s_chtml10_end_form_tag,
238   },
239   /* tagINPUT */
240   {
241     s_chtml10_start_input_tag,
242     s_chtml10_end_input_tag,
243   },
244   /* tagCENTER */
245   {
246     s_chtml10_start_center_tag,
247     s_chtml10_end_center_tag,
248   },
249   /* tagHR */
250   {
251     s_chtml10_start_hr_tag,
252     s_chtml10_end_hr_tag,
253   },
254   /* tagIMG */
255   {
256     s_chtml10_start_img_tag,
257     s_chtml10_end_img_tag,
258   },
259   /* tagSELECT */
260   {
261     s_chtml10_start_select_tag,
262     s_chtml10_end_select_tag,
263   },
264   /* tagOPTION */
265   {
266     s_chtml10_start_option_tag,
267     s_chtml10_end_option_tag,
268   },
269   /* tagDIV */
270   {
271     s_chtml10_start_div_tag,
272     s_chtml10_end_div_tag,
273   },
274   /* tagCHXJIF */
275   {
276     s_chtml10_chxjif_tag,
277     NULL,
278   },
279   /* tagNOBR */
280   {
281     NULL,
282     NULL,
283   },
284   /* tagSMALL */
285   {
286     NULL,
287     NULL,
288   },
289   /* tagSTYLE */
290   {
291     NULL,
292     NULL,
293   },
294   /* tagSPAN */
295   {
296     NULL,
297     NULL,
298   },
299   /* tagTEXT */
300   {
301     s_chtml10_text,
302     NULL,
303   },
304   /* tagTH */
305   {
306     NULL,
307     NULL,
308   },
309   /* tagB */
310   {
311     NULL,
312     NULL,
313   },
314   /* tagFIELDSET */
315   {
316     NULL,
317     NULL,
318   },
319   /* tagDT */
320   {
321     s_chtml10_start_dt_tag,
322     s_chtml10_end_dt_tag,
323   },
324   /* tagLEGEND */
325   {
326     NULL,
327     NULL,
328   },
329   /* tagLABEL */
330   {
331     NULL,
332     NULL,
333   },
334   /* tagBLOCKQUOTE */
335   {
336     s_chtml10_start_blockquote_tag,
337     s_chtml10_end_blockquote_tag,
338   },
339   /* tagDIR */
340   {
341     s_chtml10_start_dir_tag,
342     s_chtml10_end_dir_tag,
343   },
344   /* tagDL */
345   {
346     s_chtml10_start_dl_tag,
347     s_chtml10_end_dl_tag,
348   },
349   /* tagDD */
350   {
351     s_chtml10_start_dd_tag,
352     s_chtml10_end_dd_tag,
353   },
354 };
355
356
357 /**
358  * converts from CHTML5.0 to CHTML1.0.
359  *
360  * @param r     [i]   Requet_rec is appointed.
361  * @param spec  [i]   The result of the device specification processing which 
362  *                    was done in advance is appointed.
363  * @param src   [i]   The character string before the converting is appointed.
364  * @return The character string after the converting is returned.
365  */
366 char*
367 chxj_exchange_chtml10(
368   request_rec*        r,
369   device_table*       spec,
370   const char*         src,
371   apr_size_t          srclen,
372   apr_size_t*         dstlen,
373   chxjconvrule_entry* entryp,
374   cookie_t*           cookie
375 )
376 {
377   char*     dst;
378   char*     ss;
379   chtml10_t chtml10;
380   Doc       doc;
381   apr_time_t t;
382
383   dst = NULL;
384
385   t = apr_time_now();
386   DBG(r, "start chxj_exchange_chtml10() cookie_id=[%s]", (cookie) ? cookie->cookie_id : "");
387
388   /*--------------------------------------------------------------------------*/
389   /* If qrcode xml                                                            */
390   /*--------------------------------------------------------------------------*/
391   *dstlen = srclen;
392   dst = chxj_qr_code_blob_handler(r, src, (size_t*)dstlen);
393   if (dst) {
394     DBG(r,"i found qrcode xml");
395     return dst;
396   }
397   DBG(r,"not found qrcode xml");
398
399   /*--------------------------------------------------------------------------*/
400   /* The CHTML structure is initialized.                                      */
401   /*--------------------------------------------------------------------------*/
402   s_init_chtml10(&chtml10, &doc, r, spec);
403   chtml10.entryp    = entryp;
404   chtml10.cookie    = cookie;
405
406   chxj_set_content_type(r, "text/html; charset=Windows-31J");
407
408   /*--------------------------------------------------------------------------*/
409   /* The character string of the input is analyzed.                           */
410   /*--------------------------------------------------------------------------*/
411   qs_init_malloc(&doc);
412   qs_init_root_node(&doc);
413
414   ss = apr_pcalloc(r->pool, srclen + 1);
415   memset(ss, 0,   srclen + 1);
416   memcpy(ss, src, srclen);
417
418 #ifdef DUMP_LOG
419   chxj_dump_out("[src] CHTML -> CHTML1.0", ss, srclen);
420 #endif
421
422   qs_parse_string(&doc,ss, strlen(ss));
423
424   chxj_buffered_write_init(r->pool, &doc.buf);
425   /*--------------------------------------------------------------------------*/
426   /* It converts it from CHTML to CHTML.                                      */
427   /*--------------------------------------------------------------------------*/
428   chxj_node_exchange(spec,r,(void*)&chtml10, &doc, qs_get_root(&doc), 0);
429   chtml10.out = chxj_buffered_write_flush(chtml10.out, &doc.buf);
430   dst = apr_pstrdup(r->pool, chtml10.out);
431   chxj_buffered_write_terminate(&doc.buf);
432
433   qs_all_free(&doc,QX_LOGMARK);
434
435   if (!dst) {
436     return apr_pstrdup(r->pool,ss);
437   }
438
439   if (strlen(dst) == 0) {
440     dst = apr_psprintf(r->pool, "\n");
441   }
442   *dstlen = strlen(dst);
443
444 #ifdef DUMP_LOG
445   chxj_dump_out("[dst] CHTML -> CHTML1.0", dst, *dstlen);
446 #endif
447
448   DBG(r, "end   chxj_exchange_chtml10() cookie_id=[%s] time=[%lld]", (cookie) ? cookie->cookie_id : "", apr_time_now() - t);
449
450   return dst;
451 }
452
453
454 /**
455  * The CHTML structure is initialized.
456  *
457  * @param chtml10 [i/o] The pointer to the HDML structure that wants to be
458  *                   initialized is specified.
459  * @param doc   [i]   The Doc structure that should be set to the initialized
460  *                   HDML structure is specified.
461  * @param r     [i]   To use POOL, the pointer to request_rec is specified.
462  * @param spec  [i]   The pointer to the device_table
463  */
464 static void
465 s_init_chtml10(
466   chtml10_t*    chtml10, 
467   Doc*          doc, 
468   request_rec*  r, 
469   device_table* spec)
470 {
471   memset(doc,     0, sizeof(Doc));
472   memset(chtml10, 0, sizeof(chtml10_t));
473
474   doc->r      = r;
475   chtml10->doc  = doc;
476   chtml10->spec = spec;
477   chtml10->out  = qs_alloc_zero_byte_string(r);
478   chtml10->conf = chxj_get_module_config(r->per_dir_config, &chxj_module);
479   chtml10->doc->parse_mode = PARSE_MODE_CHTML;
480 }
481
482
483 /**
484  * Corresponding EMOJI to a current character-code is retrieved. 
485  * The substitution character string is stored in the rslt pointer if agreeing.
486  *
487  * @param chtml10   [i]   The pointer to the CHTML structure is specified. 
488  * @param txt     [i]   The character string to want to examine whether it is 
489  *                      EMOJI is specified. 
490  * @param rslt    [o]   The pointer to the pointer that stores the result is 
491  *                      specified. 
492  * @return When corresponding EMOJI exists, it returns it excluding 0. 
493  */
494 static int
495 s_chtml10_search_emoji(chtml10_t* chtml10, char* txt, char** rslt)
496 {
497   emoji_t*      ee;
498   request_rec*  r;
499   device_table* spec;
500   int           len;
501
502   spec = chtml10->spec;
503
504   len = strlen(txt);
505   r = chtml10->doc->r;
506
507   if (!spec) {
508     DBG(r,"spec is NULL");
509   }
510
511   for (ee = chtml10->conf->emoji;
512        ee;
513        ee = ee->next) {
514
515     if (!ee->imode) {
516       DBG(r,"emoji->imode is NULL");
517       continue;
518     }
519
520     if (ee->imode->string
521     &&  txt
522     &&  strlen(ee->imode->string) > 0
523     &&  *ee->imode->string == *txt
524     &&  strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
525       if (!spec || !spec->emoji_type) {
526         *rslt = apr_palloc(r->pool, 3);
527         (*rslt)[0] = ee->imode->hex1byte & 0xff;
528         (*rslt)[1] = ee->imode->hex2byte & 0xff;
529         (*rslt)[2] = 0;
530         return strlen(ee->imode->string);
531       }
532
533       return 0;
534     }
535   }
536   return 0;
537 }
538
539
540 /**
541  * It is a handler who processes the HTML tag.
542  *
543  * @param chtml10  [i/o] The pointer to the CHTML structure at the output
544  *                     destination is specified.
545  * @param node   [i]   The HTML tag node is specified.
546  * @return The conversion result is returned.
547  */
548 static char*
549 s_chtml10_start_html_tag(void* pdoc, Node* UNUSED(node)) 
550 {
551   Doc*          doc;
552   request_rec*  r;
553   chtml10_t*    chtml10;
554
555   chtml10 = GET_CHTML10(pdoc);
556   doc     = chtml10->doc;
557   r       = doc->r;
558
559   /*--------------------------------------------------------------------------*/
560   /* start HTML tag                                                           */
561   /*--------------------------------------------------------------------------*/
562   W10_L("<html>");
563
564   return chtml10->out;
565 }
566
567
568 /**
569  * It is a handler who processes the HTML tag.
570  *
571  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
572  *                     destination is specified.
573  * @param node   [i]   The HTML tag node is specified.
574  * @return The conversion result is returned.
575  */
576 static char*
577 s_chtml10_end_html_tag(void* pdoc, Node* UNUSED(child)) 
578 {
579   Doc*          doc;
580   request_rec*  r;
581   chtml10_t*    chtml10;
582
583   
584   chtml10 = GET_CHTML10(pdoc);
585   doc     = chtml10->doc;
586   r       = doc->r;
587
588   W10_L("</html>");
589
590   return chtml10->out;
591 }
592
593
594 /**
595  * It is a handler who processes the META tag.
596  *
597  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
598  *                     destination is specified.
599  * @param node   [i]   The META tag node is specified.
600  * @return The conversion result is returned.
601  */
602 static char*
603 s_chtml10_start_meta_tag(void* pdoc, Node* UNUSED(node)) 
604 {
605   chtml10_t* chtml10;
606
607   chtml10 = GET_CHTML10(pdoc);
608
609   /* ignore */
610
611   return chtml10->out;
612 }
613
614
615 /**
616  * It is a handler who processes the META tag.
617  *
618  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
619  *                     destination is specified.
620  * @param node   [i]   The META tag node is specified.
621  * @return The conversion result is returned.
622  */
623 static char*
624 s_chtml10_end_meta_tag(void* pdoc, Node* UNUSED(child)) 
625 {
626   chtml10_t* chtml10;
627
628   chtml10 = GET_CHTML10(pdoc);
629
630   return chtml10->out;
631 }
632
633
634 /**
635  * It is a handler who processes the HEAD tag.
636  *
637  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
638  *                     destination is specified.
639  * @param node   [i]   The HEAD tag node is specified.
640  * @return The conversion result is returned.
641  */
642 static char*
643 s_chtml10_start_head_tag(void* pdoc, Node* UNUSED(node)) 
644 {
645   Doc*          doc;
646   request_rec*  r;
647   chtml10_t*    chtml10;
648
649   chtml10 = GET_CHTML10(pdoc);
650   doc     = chtml10->doc;
651   r       = doc->r;
652
653   W10_L("<head>");
654
655   return chtml10->out;
656 }
657
658
659 /**
660  * It is a handler who processes the HEAD tag.
661  *
662  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
663  *                     destination is specified.
664  * @param node   [i]   The HEAD tag node is specified.
665  * @return The conversion result is returned.
666  */
667 static char*
668 s_chtml10_end_head_tag(void* pdoc, Node* UNUSED(child)) 
669 {
670   Doc*          doc;
671   request_rec*  r;
672   chtml10_t*    chtml10;
673
674   chtml10 = GET_CHTML10(pdoc);
675   doc     = chtml10->doc;
676   r       = doc->r;
677
678   W10_L("</head>");
679
680   return chtml10->out;
681 }
682
683
684 /**
685  * It is a handler who processes the OL tag.
686  *
687  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
688  *                     destination is specified.
689  * @param node   [i]   The OL tag node is specified.
690  * @return The conversion result is returned.
691  */
692 static char*
693 s_chtml10_start_ol_tag(void* pdoc, Node* UNUSED(node)) 
694 {
695   Doc*          doc;
696   request_rec*  r;
697   chtml10_t*    chtml10;
698
699   chtml10 = GET_CHTML10(pdoc);
700   doc     = chtml10->doc;
701   r       = doc->r;
702
703   W10_L("<ol>\r\n");
704
705   return chtml10->out;
706 }
707
708
709 /**
710  * It is a handler who processes the OL tag.
711  *
712  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
713  *                     destination is specified.
714  * @param node   [i]   The OL tag node is specified.
715  * @return The conversion result is returned.
716  */
717 static char*
718 s_chtml10_end_ol_tag(void* pdoc, Node* UNUSED(child)) 
719 {
720   Doc*          doc;
721   request_rec*  r;
722   chtml10_t*    chtml10;
723
724   chtml10 = GET_CHTML10(pdoc);
725   doc     = chtml10->doc;
726   r       = doc->r;
727
728   W10_L("</ol>\r\n");
729
730   return chtml10->out;
731 }
732
733
734 /**
735  * It is a handler who processes the UL tag.
736  *
737  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
738  *                     destination is specified.
739  * @param node   [i]   The UL tag node is specified.
740  * @return The conversion result is returned.
741  */
742 static char*
743 s_chtml10_start_ul_tag(void* pdoc, Node* UNUSED(node)) 
744 {
745   Doc*          doc;
746   request_rec*  r;
747   chtml10_t*    chtml10;
748
749   chtml10    = GET_CHTML10(pdoc);
750   doc        = chtml10->doc;
751   r          = doc->r;
752
753   W10_L("<ul>\r\n");
754
755   return chtml10->out;
756 }
757
758
759 /**
760  * It is a handler who processes the UL tag.
761  *
762  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
763  *                     destination is specified.
764  * @param node   [i]   The UL tag node is specified.
765  * @return The conversion result is returned.
766  */
767 static char*
768 s_chtml10_end_ul_tag(void* pdoc, Node* UNUSED(child)) 
769 {
770   Doc*          doc;
771   request_rec*  r;
772   chtml10_t*    chtml10;
773
774   chtml10 = GET_CHTML10(pdoc);
775   doc     = chtml10->doc;
776   r       = doc->r;
777
778   W10_L("</ul>\r\n");
779
780   return chtml10->out;
781 }
782
783
784 /**
785  * It is a handler who processes the LI tag.
786  *
787  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
788  *                     destination is specified.
789  * @param node   [i]   The LI tag node is specified.
790  * @return The conversion result is returned.
791  */
792 static char*
793 s_chtml10_start_li_tag(void* pdoc, Node* UNUSED(node)) 
794 {
795   Doc*          doc;
796   request_rec*  r;
797   chtml10_t*    chtml10;
798
799   chtml10 = GET_CHTML10(pdoc);
800   doc     = chtml10->doc;
801   r       = doc->r;
802
803   W10_L("<li>");
804
805   return chtml10->out;
806 }
807
808
809 /**
810  * It is a handler who processes the LI tag.
811  *
812  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
813  *                     destination is specified.
814  * @param node   [i]   The LI tag node is specified.
815  * @return The conversion result is returned.
816  */
817 static char*
818 s_chtml10_end_li_tag(void* pdoc, Node* UNUSED(child)) 
819 {
820   chtml10_t*    chtml10;
821   chtml10 = GET_CHTML10(pdoc);
822   return chtml10->out;
823 }
824
825
826 /**
827  * It is a handler who processes the H1 tag.
828  *
829  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
830  *                     destination is specified.
831  * @param node   [i]   The H1 tag node is specified.
832  * @return The conversion result is returned.
833  */
834 static char*
835 s_chtml10_start_h1_tag(void* pdoc, Node* node) 
836 {
837   Doc*          doc;
838   request_rec*  r;
839   Attr*         attr;
840   chtml10_t*    chtml10;
841
842   chtml10 = GET_CHTML10(pdoc);
843   doc     = chtml10->doc;
844   r       = doc->r;
845
846   W10_L("<h1");
847   for (attr = qs_get_attr(doc,node);
848        attr;
849        attr = qs_get_next_attr(doc,attr)) {
850     char* name;
851     char* value;
852     name  = qs_get_attr_name(doc,attr);
853     value = qs_get_attr_value(doc,attr);
854     if (STRCASEEQ('a','A',"align", name)) {
855       if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
856         W10_L(" align=\"");
857         W10_V(value);
858         W10_L("\"");
859         break;
860       }
861     }
862   }
863   W10_L(">");
864
865   return chtml10->out;
866 }
867
868
869 /**
870  * It is a handler who processes the H1 tag.
871  *
872  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
873  *                     destination is specified.
874  * @param node   [i]   The H1 tag node is specified.
875  * @return The conversion result is returned.
876  */
877 static char*
878 s_chtml10_end_h1_tag(void* pdoc, Node* UNUSED(child)) 
879 {
880   Doc*          doc;
881   request_rec*  r;
882   chtml10_t*    chtml10;
883
884   chtml10 = GET_CHTML10(pdoc);
885   doc     = chtml10->doc;
886   r       = doc->r;
887
888   W10_L("</h1>");
889
890   return chtml10->out;
891 }
892
893
894 /**
895  * It is a handler who processes the H2 tag.
896  *
897  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
898  *                     destination is specified.
899  * @param node   [i]   The H2 tag node is specified.
900  * @return The conversion result is returned.
901  */
902 static char*
903 s_chtml10_start_h2_tag(void *pdoc, Node *node) 
904 {
905   Doc           *doc;
906   Attr          *attr;
907   request_rec   *r;
908   chtml10_t     *chtml10;
909
910   chtml10 = GET_CHTML10(pdoc);
911   doc     = chtml10->doc;
912   r       = doc->r;
913
914   W10_L("<h2");
915   for (attr = qs_get_attr(doc,node);
916        attr;
917        attr = qs_get_next_attr(doc,attr)) {
918     char* name;
919     char* value;
920     name  = qs_get_attr_name(doc,attr);
921     value = qs_get_attr_value(doc,attr);
922     if (STRCASEEQ('a','A',"align", name)) {
923       if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
924         W10_L(" align=\"");
925         W10_V(value);
926         W10_L("\"");
927         break;
928       }
929     }
930   }
931   W10_L(">");
932
933   return chtml10->out;
934 }
935
936
937 /**
938  * It is a handler who processes the H2 tag.
939  *
940  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
941  *                     destination is specified.
942  * @param node   [i]   The H2 tag node is specified.
943  * @return The conversion result is returned.
944  */
945 static char*
946 s_chtml10_end_h2_tag(void* pdoc, Node* UNUSED(child)) 
947 {
948   Doc*          doc;
949   request_rec*  r;
950   chtml10_t*    chtml10;
951
952   chtml10 = GET_CHTML10(pdoc);
953   doc     = chtml10->doc;
954   r       = doc->r;
955
956   W10_L("</h2>");
957
958   return chtml10->out;
959 }
960
961
962 /**
963  * It is a handler who processes the H3 tag.
964  *
965  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
966  *                     destination is specified.
967  * @param node   [i]   The H3 tag node is specified.
968  * @return The conversion result is returned.
969  */
970 static char *
971 s_chtml10_start_h3_tag(void *pdoc, Node *node) 
972 {
973   Doc           *doc;
974   Attr          *attr;
975   request_rec   *r;
976   chtml10_t     *chtml10;
977
978   chtml10 = GET_CHTML10(pdoc);
979   doc     = chtml10->doc;
980   r       = doc->r;
981
982   W10_L("<h3");
983   for (attr = qs_get_attr(doc,node);
984        attr;
985        attr = qs_get_next_attr(doc,attr)) {
986     char* name;
987     char* value;
988     name  = qs_get_attr_name(doc,attr);
989     value = qs_get_attr_value(doc,attr);
990     if (STRCASEEQ('a','A',"align", name)) {
991       if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
992         W10_L(" align=\"");
993         W10_V(value);
994         W10_L("\"");
995         break;
996       }
997     }
998   }
999   W10_L(">");
1000
1001   return chtml10->out;
1002 }
1003
1004
1005 /**
1006  * It is a handler who processes the H3 tag.
1007  *
1008  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1009  *                     destination is specified.
1010  * @param node   [i]   The H3 tag node is specified.
1011  * @return The conversion result is returned.
1012  */
1013 static char*
1014 s_chtml10_end_h3_tag(void* pdoc, Node* UNUSED(child)) 
1015 {
1016   chtml10_t*    chtml10;
1017   Doc*          doc;
1018   request_rec*  r;
1019
1020   chtml10 = GET_CHTML10(pdoc);
1021   doc     = chtml10->doc;
1022   r       = doc->r;
1023
1024   W10_L("</h3>");
1025
1026   return chtml10->out;
1027 }
1028
1029
1030 /**
1031  * It is a handler who processes the H4 tag.
1032  *
1033  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1034  *                     destination is specified.
1035  * @param node   [i]   The H4 tag node is specified.
1036  * @return The conversion result is returned.
1037  */
1038 static char *
1039 s_chtml10_start_h4_tag(void *pdoc, Node *node)
1040 {
1041   chtml10_t     *chtml10;
1042   Attr          *attr;
1043   Doc           *doc;
1044   request_rec   *r;
1045
1046   chtml10 = GET_CHTML10(pdoc);
1047   doc     = chtml10->doc;
1048   r       = doc->r;
1049
1050   W10_L("<h4");
1051   for (attr = qs_get_attr(doc,node);
1052        attr;
1053        attr = qs_get_next_attr(doc,attr)) {
1054     char* name;
1055     char* value;
1056     name  = qs_get_attr_name(doc,attr);
1057     value = qs_get_attr_value(doc,attr);
1058     if (STRCASEEQ('a','A',"align", name)) {
1059       if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
1060         W10_L(" align=\"");
1061         W10_V(value);
1062         W10_L("\"");
1063         break;
1064       }
1065     }
1066   }
1067   W10_L(">");
1068
1069   return chtml10->out;
1070 }
1071
1072
1073 /**
1074  * It is a handler who processes the H4 tag.
1075  *
1076  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1077  *                     destination is specified.
1078  * @param node   [i]   The H4 tag node is specified.
1079  * @return The conversion result is returned.
1080  */
1081 static char*
1082 s_chtml10_end_h4_tag(void* pdoc, Node* UNUSED(child)) 
1083 {
1084   Doc*          doc;
1085   request_rec*  r;
1086   chtml10_t*    chtml10;
1087
1088   chtml10  = GET_CHTML10(pdoc);
1089   doc      = chtml10->doc;
1090   r        = doc->r;
1091
1092   W10_L("</h4>");
1093
1094   return chtml10->out;
1095 }
1096
1097
1098 /**
1099  * It is a handler who processes the H5 tag.
1100  *
1101  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1102  *                     destination is specified.
1103  * @param node   [i]   The H5 tag node is specified.
1104  * @return The conversion result is returned.
1105  */
1106 static char *
1107 s_chtml10_start_h5_tag(void *pdoc, Node *node) 
1108 {
1109   Doc           *doc;
1110   request_rec  *r;
1111   chtml10_t    *chtml10;
1112   Attr         *attr;
1113
1114   chtml10 = GET_CHTML10(pdoc);
1115   doc     = chtml10->doc;
1116   r       = doc->r;
1117
1118   W10_L("<h5");
1119   for (attr = qs_get_attr(doc,node);
1120        attr;
1121        attr = qs_get_next_attr(doc,attr)) {
1122     char* name;
1123     char* value;
1124     name  = qs_get_attr_name(doc,attr);
1125     value = qs_get_attr_value(doc,attr);
1126     if (STRCASEEQ('a','A',"align", name)) {
1127       if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
1128         W10_L(" align=\"");
1129         W10_V(value);
1130         W10_L("\"");
1131         break;
1132       }
1133     }
1134   }
1135   W10_L(">");
1136
1137   return chtml10->out;
1138 }
1139
1140
1141 /**
1142  * It is a handler who processes the H5 tag.
1143  *
1144  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1145  *                     destination is specified.
1146  * @param node   [i]   The H5 tag node is specified.
1147  * @return The conversion result is returned.
1148  */
1149 static char*
1150 s_chtml10_end_h5_tag(void* pdoc, Node* UNUSED(child)) 
1151 {
1152   Doc*          doc;
1153   request_rec*  r;
1154   chtml10_t*    chtml10;
1155
1156   chtml10 = GET_CHTML10(pdoc);
1157   doc     = chtml10->doc;
1158   r       = doc->r;
1159
1160   W10_L("</h5>");
1161
1162   return chtml10->out;
1163 }
1164
1165
1166 /**
1167  * It is a handler who processes the H6 tag.
1168  *
1169  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1170  *                     destination is specified.
1171  * @param node   [i]   The H6 tag node is specified.
1172  * @return The conversion result is returned.
1173  */
1174 static char *
1175 s_chtml10_start_h6_tag(void *pdoc, Node *node)
1176 {
1177   Doc           *doc;
1178   request_rec   *r;
1179   chtml10_t     *chtml10;
1180   Attr          *attr;
1181
1182   chtml10 = GET_CHTML10(pdoc);
1183   doc     = chtml10->doc;
1184   r       = doc->r;
1185
1186   W10_L("<h6");
1187   for (attr = qs_get_attr(doc,node);
1188        attr;
1189        attr = qs_get_next_attr(doc,attr)) {
1190     char* name;
1191     char* value;
1192     name  = qs_get_attr_name(doc,attr);
1193     value = qs_get_attr_value(doc,attr);
1194     if (STRCASEEQ('a','A',"align", name)) {
1195       if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
1196         W10_L(" align=\"");
1197         W10_V(value);
1198         W10_L("\"");
1199         break;
1200       }
1201     }
1202   }
1203   W10_L(">");
1204
1205   return chtml10->out;
1206 }
1207
1208
1209 /**
1210  * It is a handler who processes the H6 tag.
1211  *
1212  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1213  *                     destination is specified.
1214  * @param node   [i]   The H6 tag node is specified.
1215  * @return The conversion result is returned.
1216  */
1217 static char *
1218 s_chtml10_end_h6_tag(void *pdoc, Node *UNUSED(child)) 
1219 {
1220   Doc*          doc;
1221   request_rec*  r;
1222   chtml10_t*    chtml10;
1223
1224   chtml10 = GET_CHTML10(pdoc);
1225   doc     = chtml10->doc;
1226   r       = doc->r;
1227
1228   W10_L("</h6>");
1229
1230   return chtml10->out;
1231 }
1232
1233
1234 /**
1235  * It is a handler who processes the TITLE tag.
1236  *
1237  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1238  *                     destination is specified.
1239  * @param node   [i]   The TITLE tag node is specified.
1240  * @return The conversion result is returned.
1241  */
1242 static char*
1243 s_chtml10_start_title_tag(void* pdoc, Node* UNUSED(node)) 
1244 {
1245   Doc*         doc;
1246   request_rec* r;
1247   chtml10_t*   chtml10;
1248
1249   chtml10 = GET_CHTML10(pdoc);
1250   doc     = chtml10->doc;
1251   r       = doc->r;
1252
1253   W10_L("<title>");
1254
1255   return chtml10->out;
1256 }
1257
1258
1259 /**
1260  * It is a handler who processes the TITLE tag.
1261  *
1262  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1263  *                     destination is specified.
1264  * @param node   [i]   The TITLE tag node is specified.
1265  * @return The conversion result is returned.
1266  */
1267 static char*
1268 s_chtml10_end_title_tag(void* pdoc, Node* UNUSED(child)) 
1269 {
1270   Doc*          doc;
1271   request_rec*  r;
1272   chtml10_t*    chtml10;
1273
1274   chtml10 = GET_CHTML10(pdoc);
1275   doc     = chtml10->doc;
1276   r       = doc->r;
1277
1278   W10_L("</title>");
1279
1280   return chtml10->out;
1281 }
1282
1283
1284 /**
1285  * It is a handler who processes the BASE tag.
1286  *
1287  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1288  *                     destination is specified.
1289  * @param node   [i]   The BASE tag node is specified.
1290  * @return The conversion result is returned.
1291  */
1292 static char*
1293 s_chtml10_start_base_tag(void* pdoc, Node* node) 
1294 {
1295   Attr*         attr;
1296   chtml10_t*    chtml10;
1297   Doc*          doc;
1298   request_rec*  r;
1299
1300   chtml10 = GET_CHTML10(pdoc);
1301   doc     = chtml10->doc;
1302   r       = doc->r;
1303   
1304   W10_L("<base");
1305
1306   /*--------------------------------------------------------------------------*/
1307   /* Get Attributes                                                           */
1308   /*--------------------------------------------------------------------------*/
1309   for (attr = qs_get_attr(doc,node);
1310        attr;
1311        attr = qs_get_next_attr(doc,attr)) {
1312     char* name;
1313     char* value;
1314
1315     name  = qs_get_attr_name(doc,attr);
1316     value = qs_get_attr_value(doc,attr);
1317
1318     if (STRCASEEQ('h','H',"href", name)) {
1319       W10_L(" href=\"");
1320       W10_V(value);
1321       W10_L("\"");
1322     }
1323   }
1324
1325   W10_L(">");
1326
1327   return chtml10->out;
1328 }
1329
1330
1331 /**
1332  * It is a handler who processes the BASE tag.
1333  *
1334  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1335  *                     destination is specified.
1336  * @param node   [i]   The BASE tag node is specified.
1337  * @return The conversion result is returned.
1338  */
1339 static char*
1340 s_chtml10_end_base_tag(void* pdoc, Node* UNUSED(child)) 
1341 {
1342   chtml10_t* chtml10 = GET_CHTML10(pdoc);
1343
1344   return chtml10->out;
1345 }
1346
1347
1348 /**
1349  * It is a handler who processes the BODY tag.
1350  *
1351  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1352  *                     destination is specified.
1353  * @param node   [i]   The BODY tag node is specified.
1354  * @return The conversion result is returned.
1355  */
1356 static char*
1357 s_chtml10_start_body_tag(void* pdoc, Node* node) 
1358 {
1359   chtml10_t*   chtml10;
1360   Doc*         doc;
1361   request_rec* r;
1362   Attr*        attr;
1363
1364   chtml10 = GET_CHTML10(pdoc);
1365   doc     = chtml10->doc;
1366   r       = doc->r;
1367
1368
1369   W10_L("<body");
1370
1371   /*--------------------------------------------------------------------------*/
1372   /* Get Attributes                                                           */
1373   /*--------------------------------------------------------------------------*/
1374   for (attr = qs_get_attr(doc,node);
1375        attr;
1376        attr = qs_get_next_attr(doc,attr)) {
1377
1378     char* name;
1379
1380     name  = qs_get_attr_name(doc,attr);
1381
1382     switch(*name) {
1383     case 'a':
1384     case 'A':
1385       if (strcasecmp(name, "alink") == 0) {
1386         /*----------------------------------------------------------------------*/
1387         /* CHTML 4.0                                                            */
1388         /*----------------------------------------------------------------------*/
1389         /* ignore */
1390       }
1391       break;
1392
1393     case 'b':
1394     case 'B':
1395       if (strcasecmp(name, "bgcolor") == 0) {
1396         /*----------------------------------------------------------------------*/
1397         /* CHTML 2.0                                                            */
1398         /*----------------------------------------------------------------------*/
1399         /* ignore */
1400       }
1401       break;
1402
1403     case 't':
1404     case 'T':
1405       if (strcasecmp(name, "text") == 0) {
1406         /*----------------------------------------------------------------------*/
1407         /* CHTML 2.0                                                            */
1408         /*----------------------------------------------------------------------*/
1409         /* ignore */
1410       }
1411       break;
1412
1413     case 'l':
1414     case 'L':
1415       if (strcasecmp(name, "link") == 0) {
1416         /*----------------------------------------------------------------------*/
1417         /* CHTML 2.0                                                            */
1418         /*----------------------------------------------------------------------*/
1419         /* ignore */
1420       }
1421       break;
1422
1423     case 'v':
1424     case 'V':
1425       if (strcasecmp(name, "vlink") == 0) {
1426         /*----------------------------------------------------------------------*/
1427         /* CHTML 4.0                                                            */
1428         /*----------------------------------------------------------------------*/
1429         /* ignore */
1430       }
1431       break;
1432
1433     default:
1434       break;
1435     }
1436   }
1437
1438   W10_L(">");
1439
1440   return chtml10->out;
1441 }
1442
1443
1444 /**
1445  * It is a handler who processes the BODY tag.
1446  *
1447  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1448  *                     destination is specified.
1449  * @param node   [i]   The BODY tag node is specified.
1450  * @return The conversion result is returned.
1451  */
1452 static char*
1453 s_chtml10_end_body_tag(void* pdoc, Node* UNUSED(child)) 
1454 {
1455   Doc*          doc;
1456   request_rec*  r;
1457   chtml10_t*    chtml10;
1458
1459   chtml10 = GET_CHTML10(pdoc);
1460   doc     = chtml10->doc;
1461   r       = doc->r;
1462
1463   W10_L("</body>");
1464
1465   return chtml10->out;
1466 }
1467
1468
1469 /**
1470  * It is a handler who processes the A tag.
1471  *
1472  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1473  *                     destination is specified.
1474  * @param node   [i]   The A tag node is specified.
1475  * @return The conversion result is returned.
1476  */
1477 static char *
1478 s_chtml10_start_a_tag(void *pdoc, Node *node) 
1479 {
1480   chtml10_t     *chtml10;
1481   Doc           *doc;
1482   request_rec   *r;
1483   Attr          *attr;
1484
1485   chtml10 = GET_CHTML10(pdoc);
1486   doc     = chtml10->doc;
1487   r       = doc->r;
1488
1489   W10_L("<a");
1490
1491   /*--------------------------------------------------------------------------*/
1492   /* Get Attributes                                                           */
1493   /*--------------------------------------------------------------------------*/
1494   for (attr = qs_get_attr(doc,node);
1495        attr; 
1496        attr = qs_get_next_attr(doc,attr)) {
1497
1498     char *name;
1499     char *value;
1500
1501     name  = qs_get_attr_name(doc,attr);
1502     value = qs_get_attr_value(doc,attr);
1503
1504     switch(*name) {
1505     case 'n':
1506     case 'N':
1507       if (strcasecmp(name, "name") == 0) {
1508         /*--------------------------------------------------------------------*/
1509         /* CHTML1.0                                                           */
1510         /*--------------------------------------------------------------------*/
1511         W10_L(" name=\"");
1512         W10_V(value);
1513         W10_L("\"");
1514       }
1515       break;
1516
1517     case 'h':
1518     case 'H':
1519       if (strcasecmp(name, "href") == 0) {
1520         /*--------------------------------------------------------------------*/
1521         /* CHTML1.0                                                           */
1522         /*--------------------------------------------------------------------*/
1523         value = chxj_encoding_parameter(r, value);
1524         value = chxj_add_cookie_parameter(r, value, chtml10->cookie);
1525         W10_L(" href=\"");
1526         W10_V(value);
1527         W10_L("\"");
1528       }
1529       break;
1530
1531     case 'a':
1532     case 'A':
1533       if (strcasecmp(name, "accesskey") == 0) {
1534         /*--------------------------------------------------------------------*/
1535         /* CHTML1.0                                                           */
1536         /*--------------------------------------------------------------------*/
1537         W10_L(" accesskey=\"");
1538         W10_V(value);
1539         W10_L("\"");
1540       }
1541       break;
1542
1543     case 'c':
1544     case 'C':
1545       if (strcasecmp(name, "cti") == 0) {
1546         /*--------------------------------------------------------------------*/
1547         /* CHTML 2.0                                                          */
1548         /*--------------------------------------------------------------------*/
1549         /* ignore */
1550       }
1551       break;
1552
1553     case 'u':
1554     case 'U':
1555       if (strcasecmp(name, "utn") == 0) {
1556         /*--------------------------------------------------------------------*/
1557         /* CHTML 3.0                                                          */
1558         /*--------------------------------------------------------------------*/
1559         /* ignore */
1560       }
1561       break;
1562
1563     case 't':
1564     case 'T':
1565       if (strcasecmp(name, "telbook") == 0) {
1566         /*--------------------------------------------------------------------*/
1567         /* CHTML 3.0                                                          */
1568         /*--------------------------------------------------------------------*/
1569         /* ignore */
1570       }
1571       break;
1572
1573     case 'k':
1574     case 'K':
1575       if (strcasecmp(name, "kana") == 0) {
1576         /*--------------------------------------------------------------------*/
1577         /* CHTML 3.0                                                          */
1578         /*--------------------------------------------------------------------*/
1579         /* ignore */
1580       }
1581       break;
1582
1583     case 'e':
1584     case 'E':
1585       if (strcasecmp(name, "email") == 0) {
1586         /*--------------------------------------------------------------------*/
1587         /* CHTML 3.0                                                          */
1588         /*--------------------------------------------------------------------*/
1589         /* ignore */
1590       }
1591       break;
1592
1593     case 'i':
1594     case 'I':
1595       if (strcasecmp(name, "ista") == 0) {
1596         /*--------------------------------------------------------------------*/
1597         /* CHTML 4.0                                                          */
1598         /*--------------------------------------------------------------------*/
1599         /* ignore */
1600       }
1601       else
1602       if (strcasecmp(name, "ilet") == 0) {
1603         /*--------------------------------------------------------------------*/
1604         /* CHTML 5.0                                                          */
1605         /*--------------------------------------------------------------------*/
1606         /* ignore */
1607       }
1608       else
1609       if (strcasecmp(name, "iswf") == 0) {
1610         /*--------------------------------------------------------------------*/
1611         /* CHTML 5.0                                                          */
1612         /*--------------------------------------------------------------------*/
1613         /* ignore */
1614       }
1615       else
1616       if (strcasecmp(name, "irst") == 0) {
1617         /*--------------------------------------------------------------------*/
1618         /* CHTML 5.0                                                          */
1619         /*--------------------------------------------------------------------*/
1620         /* ignore */
1621       }
1622       else
1623       if (strcasecmp(name, "ijam") == 0) {
1624         /*--------------------------------------------------------------------*/
1625         /* CHTML 3.0                                                          */
1626         /*--------------------------------------------------------------------*/
1627         /* ignore */
1628       }
1629       break;
1630
1631     default:
1632       break;
1633     }
1634   }
1635
1636   W10_L(">");
1637   return chtml10->out;
1638 }
1639
1640
1641 /**
1642  * It is a handler who processes the A tag.
1643  *
1644  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1645  *                     destination is specified.
1646  * @param node   [i]   The A tag node is specified.
1647  * @return The conversion result is returned.
1648  */
1649 static char *
1650 s_chtml10_end_a_tag(void *pdoc, Node *UNUSED(child)) 
1651 {
1652   chtml10_t    *chtml10;
1653   Doc          *doc;
1654   request_rec  *r;
1655
1656   chtml10 = GET_CHTML10(pdoc);
1657   doc     = chtml10->doc;
1658   r       = doc->r;
1659
1660   W10_L("</a>");
1661   return chtml10->out;
1662 }
1663
1664
1665 /**
1666  * It is a handler who processes the BR tag.
1667  *
1668  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1669  *                     destination is specified.
1670  * @param node   [i]   The BR tag node is specified.
1671  * @return The conversion result is returned.
1672  */
1673 static char *
1674 s_chtml10_start_br_tag(void *pdoc, Node *node) 
1675 {
1676   chtml10_t    *chtml10;
1677   Doc          *doc;
1678   request_rec  *r;
1679   Attr         *attr = NULL;
1680
1681   chtml10 = GET_CHTML10(pdoc);
1682   doc     = chtml10->doc;
1683   r       = doc->r;
1684
1685   W10_L("<br");
1686
1687   /*--------------------------------------------------------------------------*/
1688   /* Get Attributes                                                           */
1689   /*--------------------------------------------------------------------------*/
1690   for (attr = qs_get_attr(doc,node);
1691        attr;
1692        attr = qs_get_next_attr(doc,attr)) {
1693     char *name;
1694     char *value;
1695
1696     name  = qs_get_attr_name(doc,attr);
1697     value = qs_get_attr_value(doc,attr);
1698
1699     if (STRCASEEQ('c','C',"clear",name)) {
1700       if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('a','A',"all",value))) {
1701         W10_L(" clear=\"");
1702         W10_V(value);
1703         W10_L("\"");
1704       }
1705     }
1706   }
1707   W10_L(">");
1708   return chtml10->out;
1709 }
1710
1711
1712 /**
1713  * It is a handler who processes the BR tag.
1714  *
1715  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1716  *                     destination is specified.
1717  * @param node   [i]   The BR tag node is specified.
1718  * @return The conversion result is returned.
1719  */
1720 static char *
1721 s_chtml10_end_br_tag(void *pdoc, Node *UNUSED(child)) 
1722 {
1723   chtml10_t *chtml10 = GET_CHTML10(pdoc);
1724
1725   return chtml10->out;
1726 }
1727
1728
1729 /**
1730  * It is a handler who processes the TR tag.
1731  *
1732  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1733  *                     destination is specified.
1734  * @param node   [i]   The TR tag node is specified.
1735  * @return The conversion result is returned.
1736  */
1737 static char *
1738 s_chtml10_start_tr_tag(void *pdoc, Node *UNUSED(node)) 
1739 {
1740   chtml10_t *chtml10 = GET_CHTML10(pdoc);
1741
1742   return chtml10->out;
1743 }
1744
1745
1746 /**
1747  * It is a handler who processes the TR tag.
1748  *
1749  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1750  *                     destination is specified.
1751  * @param node   [i]   The TR tag node is specified.
1752  * @return The conversion result is returned.
1753  */
1754 static char *
1755 s_chtml10_end_tr_tag(void *pdoc, Node *UNUSED(child)) 
1756 {
1757   chtml10_t    *chtml10;
1758   Doc          *doc;
1759   request_rec  *r;
1760
1761   chtml10 = GET_CHTML10(pdoc);
1762   doc     = chtml10->doc;
1763   r       = doc->r;
1764
1765   W10_L("<br>\r\n");
1766
1767   return chtml10->out;
1768 }
1769
1770
1771 /**
1772  * It is a handler who processes the FONT tag.
1773  *
1774  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1775  *                     destination is specified.
1776  * @param node   [i]   The FONT tag node is specified.
1777  * @return The conversion result is returned.
1778  */
1779 static char *
1780 s_chtml10_start_font_tag(void *pdoc, Node *UNUSED(node)) 
1781 {
1782   chtml10_t *chtml10 = GET_CHTML10(pdoc);
1783
1784   /* Ignore */
1785
1786   return chtml10->out;
1787 }
1788
1789
1790 /**
1791  * It is a handler who processes the FONT tag.
1792  *
1793  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1794  *                     destination is specified.
1795  * @param node   [i]   The FONT tag node is specified.
1796  * @return The conversion result is returned.
1797  */
1798 static char *
1799 s_chtml10_end_font_tag(void *pdoc, Node *UNUSED(child)) 
1800 {
1801   chtml10_t *chtml10 = GET_CHTML10(pdoc);
1802
1803   /* ignore */
1804
1805   return chtml10->out;
1806 }
1807
1808
1809 /**
1810  * It is a handler who processes the FORM tag.
1811  *
1812  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1813  *                     destination is specified.
1814  * @param node   [i]   The FORM tag node is specified.
1815  * @return The conversion result is returned.
1816  */
1817 static char *
1818 s_chtml10_start_form_tag(void *pdoc, Node *node) 
1819 {
1820   chtml10_t    *chtml10;
1821   Doc          *doc;
1822   request_rec  *r;
1823   Attr         *attr;
1824
1825   chtml10 = GET_CHTML10(pdoc);
1826   doc     = chtml10->doc;
1827   r       = doc->r;
1828
1829   W10_L("<form");
1830
1831   /*--------------------------------------------------------------------------*/
1832   /* Get Attributes                                                           */
1833   /*--------------------------------------------------------------------------*/
1834   for (attr = qs_get_attr(doc,node);
1835        attr;
1836        attr = qs_get_next_attr(doc,attr)) {
1837     char *name;
1838     char *value;
1839
1840     name  = qs_get_attr_name(doc,attr);
1841     value = qs_get_attr_value(doc,attr);
1842
1843     switch(*name) {
1844     case 'a':
1845     case 'A':
1846       if (strcasecmp(name, "action") == 0) {
1847         /*--------------------------------------------------------------------*/
1848         /* CHTML 1.0                                                          */
1849         /*--------------------------------------------------------------------*/
1850         value = chxj_encoding_parameter(r, value);
1851         value = chxj_add_cookie_parameter(r, value, chtml10->cookie);
1852   
1853         W10_L(" action=\"");
1854         W10_V(value);
1855         W10_L("\"");
1856       }
1857       break;
1858
1859     case 'm':
1860     case 'M':
1861       if (strcasecmp(name, "method") == 0) {
1862         /*--------------------------------------------------------------------*/
1863         /* CHTML 1.0                                                          */
1864         /*--------------------------------------------------------------------*/
1865         W10_L(" method=\"");
1866         W10_V(value);
1867         W10_L("\"");
1868       }
1869       break;
1870
1871     case 'u':
1872     case 'U':
1873       if (strcasecmp(name, "utn") == 0) {
1874         /*--------------------------------------------------------------------*/
1875         /* CHTML 3.0                                                          */
1876         /*--------------------------------------------------------------------*/
1877         /* ignore */
1878       }
1879       break;
1880
1881     default:
1882       break;
1883     }
1884   }
1885
1886   W10_L(">");
1887
1888   return chtml10->out;
1889 }
1890
1891
1892 /**
1893  * It is a handler who processes the FORM tag.
1894  *
1895  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1896  *                     destination is specified.
1897  * @param node   [i]   The FORM tag node is specified.
1898  * @return The conversion result is returned.
1899  */
1900 static char*
1901 s_chtml10_end_form_tag(void* pdoc, Node* UNUSED(child)) 
1902 {
1903   chtml10_t*   chtml10;
1904   Doc*         doc;
1905   request_rec* r;
1906
1907   chtml10 = GET_CHTML10(pdoc);
1908   doc     = chtml10->doc;
1909   r       = doc->r;
1910
1911   W10_L("</form>");
1912
1913   return chtml10->out;
1914 }
1915
1916
1917 /**
1918  * It is a handler who processes the INPUT tag.
1919  *
1920  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
1921  *                     destination is specified.
1922  * @param node   [i]   The INPUT tag node is specified.
1923  * @return The conversion result is returned.
1924  */
1925 static char*
1926 s_chtml10_start_input_tag(void* pdoc, Node* node) 
1927 {
1928   chtml10_t*    chtml10;
1929   Doc*          doc;
1930   request_rec*  r;
1931   char*         max_length;
1932   char*         type;
1933   char*         name;
1934   char*         value;
1935   char*         istyle;
1936   char*         size;
1937   char*         checked;
1938   char*         accesskey;
1939
1940   chtml10     = GET_CHTML10(pdoc);
1941   doc         = chtml10->doc;
1942   r           = doc->r;
1943
1944   max_length  = NULL;
1945   type        = NULL;
1946   name        = NULL;
1947   value       = NULL;
1948   istyle      = NULL;
1949   size        = NULL;
1950   checked     = NULL;
1951   accesskey   = NULL;
1952
1953   W10_L("<input");
1954
1955   /*--------------------------------------------------------------------------*/
1956   /* Get Attributes                                                           */
1957   /*--------------------------------------------------------------------------*/
1958
1959   type       = qs_get_type_attr(doc, node, r);
1960   name       = qs_get_name_attr(doc, node, r);
1961   value      = qs_get_value_attr(doc,node,r);
1962   istyle     = qs_get_istyle_attr(doc,node,r);
1963   max_length = qs_get_maxlength_attr(doc,node,r);
1964   checked    = qs_get_checked_attr(doc,node,r);
1965   accesskey  = qs_get_accesskey_attr(doc, node, r);
1966   size       = qs_get_size_attr(doc, node, r);
1967
1968   if (type) {
1969     type = qs_trim_string(doc->buf.pool, type);
1970     if (type && (STRCASEEQ('t','T',"text",    type) ||
1971                  STRCASEEQ('p','P',"password",type) ||
1972                  STRCASEEQ('c','C',"checkbox",type) ||
1973                  STRCASEEQ('r','R',"radio",   type) ||
1974                  STRCASEEQ('h','H',"hidden",  type) ||
1975                  STRCASEEQ('s','S',"submit",  type) ||
1976                  STRCASEEQ('r','R',"reset",   type))) {
1977       W10_L(" type=\"");
1978       W10_V(type);
1979       W10_L("\"");
1980     }
1981   }
1982
1983   if (size) {
1984     W10_L(" size=\"");
1985     W10_V(size);
1986     W10_L("\"");
1987   }
1988
1989   if (name && *name != 0) {
1990     W10_L(" name=\"");
1991     W10_V(name);
1992     W10_L("\"");
1993   }
1994
1995   if (value && *value != 0) {
1996     W10_L(" value=\"");
1997     W10_V(value);
1998     W10_L("\"");
1999   }
2000
2001   if (accesskey) {
2002     W10_L(" accesskey=\"");
2003     W10_V(accesskey);
2004     W10_L("\"");
2005   }
2006
2007   if (istyle) {
2008     /*------------------------------------------------------------------------*/
2009     /* CHTML 2.0                                                              */
2010     /*------------------------------------------------------------------------*/
2011     /* ignore */
2012   }
2013   /*--------------------------------------------------------------------------*/
2014   /* The figure is default for the password.                                  */
2015   /*--------------------------------------------------------------------------*/
2016   if (max_length) {
2017     W10_L(" maxlength=\"");
2018     W10_V(max_length);
2019     W10_L("\"");
2020   }
2021
2022   if (checked) {
2023     W10_L(" checked ");
2024   }
2025
2026   W10_L(">");
2027   return chtml10->out;
2028 }
2029
2030
2031 /**
2032  * It is a handler who processes the INPUT tag.
2033  *
2034  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2035  *                     destination is specified.
2036  * @param node   [i]   The INPUT tag node is specified.
2037  * @return The conversion result is returned.
2038  */
2039 static char*
2040 s_chtml10_end_input_tag(void* pdoc, Node* UNUSED(child)) 
2041 {
2042   chtml10_t* chtml10 = GET_CHTML10(pdoc);
2043
2044   return chtml10->out;
2045 }
2046
2047
2048 /**
2049  * It is a handler who processes the CENTER tag.
2050  *
2051  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2052  *                     destination is specified.
2053  * @param node   [i]   The CENTER tag node is specified.
2054  * @return The conversion result is returned.
2055  */
2056 static char*
2057 s_chtml10_start_center_tag(void* pdoc, Node* UNUSED(node)) 
2058 {
2059   chtml10_t*   chtml10;
2060   Doc*         doc;
2061   request_rec* r;
2062
2063   chtml10 = GET_CHTML10(pdoc);
2064   doc     = chtml10->doc;
2065   r       = doc->r;
2066
2067   W10_L("<center>");
2068
2069   return chtml10->out;
2070 }
2071
2072
2073 /**
2074  * It is a handler who processes the CENTER tag.
2075  *
2076  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2077  *                     destination is specified.
2078  * @param node   [i]   The CENTER tag node is specified.
2079  * @return The conversion result is returned.
2080  */
2081 static char*
2082 s_chtml10_end_center_tag(void* pdoc, Node* UNUSED(child)) 
2083 {
2084   chtml10_t*    chtml10;
2085   Doc*          doc;
2086   request_rec*  r;
2087
2088   chtml10 = GET_CHTML10(pdoc);
2089   doc     = chtml10->doc;
2090   r       = doc->r;
2091
2092   W10_L("</center>");
2093
2094   return chtml10->out;
2095 }
2096
2097
2098 /**
2099  * It is a handler who processes the HR tag.
2100  *
2101  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2102  *                     destination is specified.
2103  * @param node   [i]   The HR tag node is specified.
2104  * @return The conversion result is returned.
2105  */
2106 static char*
2107 s_chtml10_start_hr_tag(void* pdoc, Node* node) 
2108 {
2109   chtml10_t*   chtml10;
2110   Doc*         doc;
2111   request_rec* r;
2112   Attr*        attr;
2113
2114   chtml10 = GET_CHTML10(pdoc);
2115   doc     = chtml10->doc;
2116   r       = doc->r;
2117
2118   W10_L("<hr");
2119  
2120   for (attr = qs_get_attr(doc,node);
2121        attr; 
2122        attr = qs_get_next_attr(doc,attr)) {
2123
2124     char* name;
2125     char* value;
2126
2127     name  = qs_get_attr_name (doc,attr);
2128     value = qs_get_attr_value(doc,attr);
2129
2130     switch(*name) {
2131     case 'a':
2132     case 'A':
2133       if (strcasecmp(name, "align") == 0) {
2134         /*--------------------------------------------------------------------*/
2135         /* CHTML 1.0                                                          */
2136         /*--------------------------------------------------------------------*/
2137         if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2138           W10_L(" align=\"");
2139           W10_V(value);
2140           W10_L("\"");
2141         }
2142       }
2143       break;
2144
2145     case 's':
2146     case 'S':
2147       if (strcasecmp(name, "size") == 0) {
2148         /*--------------------------------------------------------------------*/
2149         /* CHTML 1.0                                                          */
2150         /*--------------------------------------------------------------------*/
2151         if (value && value[0] != '\0') {
2152           W10_L(" size=\"");
2153           W10_V(value);
2154           W10_L("\"");
2155         }
2156       }
2157       break;
2158
2159     case 'w':
2160     case 'W':
2161       if (strcasecmp(name, "width") == 0) {
2162         /*--------------------------------------------------------------------*/
2163         /* CHTML 1.0                                                          */
2164         /*--------------------------------------------------------------------*/
2165         if (value && value[0] != '\0') {
2166           W10_L(" width=\"");
2167           W10_V(value);
2168           W10_L("\"");
2169         }
2170       }
2171       break;
2172
2173     case 'n':
2174     case 'N':
2175       if (strcasecmp(name, "noshade") == 0) {
2176         /*--------------------------------------------------------------------*/
2177         /* CHTML 1.0                                                          */
2178         /*--------------------------------------------------------------------*/
2179         W10_L(" noshade");
2180       }
2181       break;
2182
2183     case 'c':
2184     case 'C':
2185       if (strcasecmp(name, "color") == 0) {
2186         /*--------------------------------------------------------------------*/
2187         /* CHTML 4.0                                                          */
2188         /*--------------------------------------------------------------------*/
2189         /* ignore */
2190       }
2191       break;
2192
2193     default:
2194       break;
2195     }
2196   }
2197   W10_L(">");
2198   return chtml10->out;
2199 }
2200
2201
2202 /**
2203  * It is a handler who processes the HR tag.
2204  *
2205  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2206  *                     destination is specified.
2207  * @param node   [i]   The HR tag node is specified.
2208  * @return The conversion result is returned.
2209  */
2210 static char*
2211 s_chtml10_end_hr_tag(void* pdoc, Node* UNUSED(child)) 
2212 {
2213   chtml10_t* chtml10;
2214
2215   chtml10 = GET_CHTML10(pdoc);
2216
2217   return chtml10->out;
2218 }
2219
2220
2221 /**
2222  * It is a handler who processes the IMG tag.
2223  *
2224  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2225  *                     destination is specified.
2226  * @param node   [i]   The IMG tag node is specified.
2227  * @return The conversion result is returned.
2228  */
2229 static char*
2230 s_chtml10_start_img_tag(void* pdoc, Node* node) 
2231 {
2232   chtml10_t*   chtml10;
2233   Doc*         doc;
2234   request_rec* r;
2235   Attr*        attr;
2236 #ifndef IMG_NOT_CONVERT_FILENAME
2237   device_table *spec;
2238 #endif
2239
2240   chtml10 = GET_CHTML10(pdoc);
2241 #ifndef IMG_NOT_CONVERT_FILENAME
2242   spec    = chtml10->spec;
2243 #endif
2244   doc     = chtml10->doc;
2245   r       = doc->r;
2246
2247   W10_L("<img");
2248   /*--------------------------------------------------------------------------*/
2249   /* Get Attributes                                                           */
2250   /*--------------------------------------------------------------------------*/
2251   for (attr = qs_get_attr(doc,node);
2252        attr;
2253        attr = qs_get_next_attr(doc,attr)) {
2254
2255     char* name;
2256     char* value;
2257
2258     name  = qs_get_attr_name (doc,attr);
2259     value = qs_get_attr_value(doc,attr);
2260
2261     switch(*name) {
2262     case 's':
2263     case 'S':
2264       if (strcasecmp(name, "src") == 0) {
2265         /*--------------------------------------------------------------------*/
2266         /* CHTML 1.0                                                          */
2267         /*--------------------------------------------------------------------*/
2268 #ifdef IMG_NOT_CONVERT_FILENAME
2269         value = chxj_encoding_parameter(r, value);
2270         value = chxj_add_cookie_parameter(r, value, chtml10->cookie);
2271         if (value) {
2272           value = apr_psprintf(doc->buf.pool, 
2273                                "%s%c%s=true", 
2274                                value, 
2275                                (strchr(value, '?')) ? '&' : '?',
2276                                CHXJ_COOKIE_NOUPDATE_PARAM);
2277         }
2278         W10_L(" src=\"");
2279         W10_V(value);
2280         W10_L("\"");
2281 #else
2282         value = chxj_img_conv(r, spec, value);
2283         value = chxj_encoding_parameter(r, value);
2284         value = chxj_add_cookie_parameter(r, value, chtml10->cookie);
2285         if (value) {
2286           value = apr_psprintf(doc->buf.pool,
2287                                "%s%c%s=true",
2288                                value,
2289                                (strchr(value, '?')) ? '&' : '?',
2290                                CHXJ_COOKIE_NOUPDATE_PARAM);
2291         }
2292         W10_L(" src=\"");
2293         W10_V(value);
2294         W10_L("\"");
2295 #endif
2296       }
2297       break;
2298
2299     case 'a':
2300     case 'A':
2301       if (strcasecmp(name, "align" ) == 0) {
2302         /*--------------------------------------------------------------------*/
2303         /* CHTML 1.0                                                          */
2304         /*--------------------------------------------------------------------*/
2305         /*--------------------------------------------------------------------*/
2306         /* CHTML 4.0                                                          */
2307         /*--------------------------------------------------------------------*/
2308         if (value && (STRCASEEQ('t','T',"top",   value) || 
2309                       STRCASEEQ('m','M',"middle",value) || 
2310                       STRCASEEQ('b','B',"bottom",value) || 
2311                       STRCASEEQ('l','L',"left",  value) ||
2312                       STRCASEEQ('r','R',"right", value))) {
2313           W10_L(" align=\"");
2314           W10_V(value);
2315           W10_L("\"");
2316         }
2317       }
2318       else if (strcasecmp(name, "alt"   ) == 0) {
2319         /*--------------------------------------------------------------------*/
2320         /* CHTML 1.0                                                          */
2321         /*--------------------------------------------------------------------*/
2322         if (value && value[0] != '\0') {
2323           W10_L(" alt=\"");
2324           W10_V(value);
2325           W10_L("\"");
2326         }
2327       }
2328       break;
2329
2330     case 'w':
2331     case 'W':
2332       if (strcasecmp(name, "width" ) == 0) {
2333         /*--------------------------------------------------------------------*/
2334         /* CHTML 1.0                                                          */
2335         /*--------------------------------------------------------------------*/
2336         if (value && value[0] != '\0') {
2337           W10_L(" width=\"");
2338           W10_V(value);
2339           W10_L("\"");
2340         }
2341       }
2342       break;
2343
2344     case 'h':
2345     case 'H':
2346       if (strcasecmp(name, "height") == 0) {
2347         /*--------------------------------------------------------------------*/
2348         /* CHTML 1.0                                                          */
2349         /*--------------------------------------------------------------------*/
2350         if (value && value[0] != '\0') {
2351           W10_L(" height=\"");
2352           W10_V(value);
2353           W10_L("\"");
2354         }
2355       }
2356       else
2357       if (strcasecmp(name, "hspace") == 0) {
2358         /*--------------------------------------------------------------------*/
2359         /* CHTML 1.0                                                          */
2360         /*--------------------------------------------------------------------*/
2361         if (value && value[0] != '\0') {
2362           W10_L(" hspace=\"");
2363           W10_V(value);
2364           W10_L("\"");
2365         }
2366       }
2367       break;
2368
2369     case 'v':
2370     case 'V':
2371       if (strcasecmp(name, "vspace") == 0) {
2372         /*--------------------------------------------------------------------*/
2373         /* CHTML 1.0                                                          */
2374         /*--------------------------------------------------------------------*/
2375         if (value && value[0] != '\0') {
2376           W10_L(" vspace=\"");
2377           W10_V(value);
2378           W10_L("\"");
2379         }
2380       }
2381       break;
2382
2383     default:
2384       break;
2385     }
2386   }
2387
2388   W10_L(">");
2389   return chtml10->out;
2390 }
2391
2392
2393 /**
2394  * It is a handler who processes the IMG tag.
2395  *
2396  * @param chtml10  [i/o] The pointer to the CHTML structure at the output
2397  *                     destination is specified.
2398  * @param node   [i]   The IMG tag node is specified.
2399  * @return The conversion result is returned.
2400  */
2401 static char *
2402 s_chtml10_end_img_tag(void *pdoc, Node *UNUSED(child)) 
2403 {
2404   chtml10_t *chtml10;
2405
2406   chtml10 = GET_CHTML10(pdoc);
2407
2408   return chtml10->out;
2409 }
2410
2411
2412 /**
2413  * It is a handler who processes the SELECT tag.
2414  *
2415  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2416  *                     destination is specified.
2417  * @param node   [i]   The SELECT tag node is specified.
2418  * @return The conversion result is returned.
2419  */
2420 static char *
2421 s_chtml10_start_select_tag(void *pdoc, Node *child)
2422 {
2423   chtml10_t    *chtml10;
2424   Doc          *doc;
2425   request_rec  *r;
2426   Attr         *attr;
2427
2428   char         *size;
2429   char         *name;
2430
2431   chtml10 = GET_CHTML10(pdoc);
2432   doc     = chtml10->doc;
2433   r       = doc->r;
2434
2435   size    = NULL;
2436   name    = NULL;
2437
2438   W10_L("<select");
2439   for (attr = qs_get_attr(doc,child);
2440        attr;
2441        attr = qs_get_next_attr(doc,attr)) {
2442     char *nm;
2443     char *val;
2444
2445     nm  = qs_get_attr_name (doc,attr);
2446     val = qs_get_attr_value(doc,attr);
2447
2448     switch(*nm) {
2449     case 's':
2450     case 'S':
2451       if (strcasecmp(nm, "size") == 0) {
2452         /*--------------------------------------------------------------------*/
2453         /* CHTML 1.0 version 2.0                                              */
2454         /*--------------------------------------------------------------------*/
2455         size = apr_pstrdup(doc->buf.pool, val);
2456       }
2457       break;
2458
2459     case 'n':
2460     case 'N':
2461       if (strcasecmp(nm, "name") == 0) {
2462         /*--------------------------------------------------------------------*/
2463         /* CHTML 1.0 version 2.0                                              */
2464         /*--------------------------------------------------------------------*/
2465         name = apr_pstrdup(doc->buf.pool, val);
2466       }
2467       break;
2468
2469     case 'm':
2470     case 'M':
2471       if (strcasecmp(nm, "multiple") == 0) {
2472         /*--------------------------------------------------------------------*/
2473         /* CHTML 1.0 version 2.0                                              */
2474         /*--------------------------------------------------------------------*/
2475         /* Ignore */
2476       }
2477       break;
2478
2479     default:
2480       break;
2481     }
2482   }
2483
2484   if (size) {
2485     W10_L(" size=\"");
2486     W10_V(size);
2487     W10_L("\"");
2488   }
2489
2490   if (name) {
2491     W10_L(" name=\"");
2492     W10_V(name);
2493     W10_L("\"");
2494   }
2495
2496   W10_L(">\r\n");
2497   return chtml10->out;
2498 }
2499
2500
2501 /**
2502  * It is a handler who processes the SELECT tag.
2503  *
2504  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2505  *                     destination is specified.
2506  * @param node   [i]   The SELECT tag node is specified.
2507  * @return The conversion result is returned.
2508  */
2509 static char *
2510 s_chtml10_end_select_tag(void *pdoc, Node *UNUSED(child))
2511 {
2512   chtml10_t *chtml10;
2513   Doc *doc;
2514   request_rec *r;
2515
2516   chtml10 = GET_CHTML10(pdoc);
2517   doc     = chtml10->doc;
2518   r       = doc->r;
2519
2520   W10_L("</select>\r\n");
2521   return chtml10->out;
2522 }
2523
2524
2525 /**
2526  * It is a handler who processes the OPTION tag.
2527  *
2528  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2529  *                     destination is specified.
2530  * @param node   [i]   The OPTION tag node is specified.
2531  * @return The conversion result is returned.
2532  */
2533 static char *
2534 s_chtml10_start_option_tag(void *pdoc, Node *child)
2535 {
2536   chtml10_t *chtml10;
2537   Doc *doc;
2538   request_rec *r;
2539   Attr *attr;
2540
2541   char *selected;
2542   char *value;
2543
2544   chtml10   = GET_CHTML10(pdoc);
2545   doc       = chtml10->doc;
2546   r         = doc->r;
2547
2548   selected  = NULL;
2549   value     = NULL;
2550
2551   W10_L("<option");
2552
2553   for (attr = qs_get_attr(doc,child);
2554        attr;
2555        attr = qs_get_next_attr(doc,attr)) {
2556     char *nm;
2557     char *val;
2558
2559     nm  = qs_get_attr_name (doc,attr);
2560     val = qs_get_attr_value(doc,attr);
2561
2562     switch(*nm) {
2563     case 's':
2564     case 'S':
2565       if (strcasecmp(nm, "selected") == 0) {
2566         /*--------------------------------------------------------------------*/
2567         /* CHTML 1.0 version 2.0                                              */
2568         /*--------------------------------------------------------------------*/
2569         selected = apr_pstrdup(doc->buf.pool, val);
2570       }
2571       break;
2572
2573     case 'v':
2574     case 'V':
2575       if (strcasecmp(nm, "value") == 0) {
2576         /*--------------------------------------------------------------------*/
2577         /* CHTML 1.0 version 2.0                                              */
2578         /*--------------------------------------------------------------------*/
2579         value = apr_pstrdup(doc->buf.pool, val);
2580       }
2581       break;
2582
2583     default:
2584       break;
2585     }
2586   }
2587
2588   if (value) {
2589     W10_L(" value=\"");
2590     W10_V(value);
2591     W10_L("\"");
2592   }
2593   else {
2594     W10_L(" value=\"\"");
2595   }
2596
2597   if (selected) {
2598     W10_L(" selected ");
2599   }
2600
2601   W10_L(">");
2602   return chtml10->out;
2603 }
2604
2605
2606 /**
2607  * It is a handler who processes the OPTION tag.
2608  *
2609  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2610  *                     destination is specified.
2611  * @param node   [i]   The OPTION tag node is specified.
2612  * @return The conversion result is returned.
2613  */
2614 static char *
2615 s_chtml10_end_option_tag(void *pdoc, Node *UNUSED(child))
2616 {
2617   chtml10_t *chtml10;
2618  
2619   chtml10 = GET_CHTML10(pdoc);
2620
2621   /* Don't close */
2622
2623   return chtml10->out;
2624 }
2625
2626
2627 /**
2628  * It is a handler who processes the DIV tag.
2629  *
2630  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2631  *                     destination is specified.
2632  * @param node   [i]   The DIV tag node is specified.
2633  * @return The conversion result is returned.
2634  */
2635 static char *
2636 s_chtml10_start_div_tag(void *pdoc, Node *child)
2637 {
2638   chtml10_t *chtml10;
2639   Doc *doc;
2640   request_rec *r;
2641   Attr *attr;
2642
2643   char *align;
2644
2645   chtml10 = GET_CHTML10(pdoc);
2646   doc     = chtml10->doc;
2647   r       = doc->r;
2648
2649   align   = NULL;
2650
2651   W10_L("<div");
2652
2653   for (attr = qs_get_attr(doc,child);
2654        attr;
2655        attr = qs_get_next_attr(doc,attr)) {
2656
2657     char *nm;
2658     char *val;
2659
2660     nm  = qs_get_attr_name(doc,attr);
2661     val = qs_get_attr_value(doc,attr);
2662
2663     if (STRCASEEQ('a','A',"align", nm)) {
2664       /*----------------------------------------------------------------------*/
2665       /* CHTML 1.0 (W3C version 3.2)                                          */
2666       /*----------------------------------------------------------------------*/
2667       if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
2668         align = apr_pstrdup(doc->buf.pool, val);
2669       }
2670     }
2671   }
2672
2673   if (align) {
2674     W10_L(" align=\"");
2675     W10_V(align);
2676     W10_L("\"");
2677   }
2678
2679   W10_L(">");
2680   return chtml10->out;
2681 }
2682
2683
2684 /**
2685  * It is a handler who processes the DIV tag.
2686  *
2687  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2688  *                     destination is specified.
2689  * @param node   [i]   The DIV tag node is specified.
2690  * @return The conversion result is returned.
2691  */
2692 static char *
2693 s_chtml10_end_div_tag(void *pdoc, Node *UNUSED(child))
2694 {
2695   chtml10_t *chtml10;
2696   Doc *doc;
2697   request_rec *r;
2698
2699   chtml10 = GET_CHTML10(pdoc);
2700   doc     = chtml10->doc;
2701   r       = doc->r;
2702
2703   W10_L("</div>");
2704   return chtml10->out;
2705 }
2706
2707
2708 /**
2709  * It is a handler who processes the CHXJ:IF tag.
2710  *
2711  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2712  *                     destination is specified.
2713  * @param node   [i]   The CHXJ:IF tag node is specified.
2714  * @return The conversion result is returned.
2715  */
2716 static char *
2717 s_chtml10_chxjif_tag(void *pdoc, Node *node)
2718 {
2719   chtml10_t *chtml10;
2720   Doc *doc;
2721   Node *child;
2722   request_rec *r;
2723
2724   chtml10 = GET_CHTML10(pdoc);
2725   doc     = chtml10->doc;
2726   r       = doc->r;
2727
2728   for (child = qs_get_child_node(doc, node);
2729        child;
2730        child = qs_get_next_node(doc, child)) {
2731     W10_V(child->otext);
2732     s_chtml10_chxjif_tag(chtml10, child);
2733   }
2734
2735   return chtml10->out;
2736 }
2737
2738
2739 /**
2740  * It is a handler who processes the PRE tag.
2741  *
2742  * @param pdoc  [i/o] The pointer to the XHTML structure at the output
2743  *                     destination is specified.
2744  * @param node   [i]   The PRE tag node is specified.
2745  * @return The conversion result is returned.
2746  */
2747 static char *
2748 s_chtml10_start_pre_tag(void *pdoc, Node *UNUSED(node)) 
2749 {
2750   Doc *doc;
2751   request_rec *r;
2752   chtml10_t *chtml10;
2753
2754   chtml10 = GET_CHTML10(pdoc);
2755   doc     = chtml10->doc;
2756   r       = doc->r;
2757
2758   chtml10->pre_flag++;
2759   W10_L("<pre>");
2760   return chtml10->out;
2761 }
2762
2763
2764 /**
2765  * It is a handler who processes the PRE tag.
2766  *
2767  * @param pdoc  [i/o] The pointer to the XHTML structure at the output
2768  *                     destination is specified.
2769  * @param node   [i]   The PRE tag node is specified.
2770  * @return The conversion result is returned.
2771  */
2772 static char *
2773 s_chtml10_end_pre_tag(void *pdoc, Node *UNUSED(child)) 
2774 {
2775   chtml10_t *chtml10;
2776   Doc *doc;
2777   request_rec *r;
2778
2779   chtml10 = GET_CHTML10(pdoc);
2780   doc     = chtml10->doc;
2781   r       = doc->r;
2782
2783   W10_L("</pre>");
2784   chtml10->pre_flag--;
2785
2786   return chtml10->out;
2787 }
2788
2789
2790 /**
2791  * It is a handler who processes the P tag.
2792  *
2793  * @param pdoc  [i/o] The pointer to the XHTML structure at the output
2794  *                     destination is specified.
2795  * @param node   [i]   The P tag node is specified.
2796  * @return The conversion result is returned.
2797  */
2798 static char *
2799 s_chtml10_start_p_tag(void *pdoc, Node *UNUSED(node)) 
2800 {
2801   Doc *doc;
2802   request_rec *r;
2803   chtml10_t *chtml10;
2804
2805   chtml10 = GET_CHTML10(pdoc);
2806   doc     = chtml10->doc;
2807   r       = doc->r;
2808
2809   W10_L("<p>");
2810   return chtml10->out;
2811 }
2812
2813
2814 /**
2815  * It is a handler who processes the P tag.
2816  *
2817  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2818  *                     destination is specified.
2819  * @param node   [i]   The P tag node is specified.
2820  * @return The conversion result is returned.
2821  */
2822 static char *
2823 s_chtml10_end_p_tag(void *pdoc, Node *UNUSED(child)) 
2824 {
2825   Doc *doc;
2826   request_rec *r;
2827   chtml10_t *chtml10;
2828
2829   chtml10 = GET_CHTML10(pdoc);
2830   doc     = chtml10->doc;
2831   r       = doc->r;
2832
2833   W10_L("</p>");
2834   return chtml10->out;
2835 }
2836
2837
2838 /**
2839  * It is a handler who processes the TEXTARE tag.
2840  *
2841  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2842  *                     destination is specified.
2843  * @param node   [i]   The TEXTAREA tag node is specified.
2844  * @return The conversion result is returned.
2845  */
2846 static char *
2847 s_chtml10_start_textarea_tag(void *pdoc, Node *node) 
2848 {
2849   Doc *doc;
2850   request_rec *r;
2851   chtml10_t *chtml10;
2852   Attr *attr;
2853
2854   chtml10 = GET_CHTML10(pdoc);
2855   doc     = chtml10->doc;
2856   r       = doc->r;
2857
2858
2859   chtml10->textarea_flag++;
2860
2861   W10_L("<textarea ");
2862
2863   for (attr = qs_get_attr(doc,node);
2864        attr;
2865        attr = qs_get_next_attr(doc,attr)) {
2866
2867     char *name;
2868     char *value;
2869
2870     name  = qs_get_attr_name (doc,attr);
2871     value = qs_get_attr_value(doc,attr);
2872
2873     switch(*name) {
2874     case 'n':
2875     case 'N':
2876       if (strcasecmp(name, "name") == 0) {
2877         W10_L(" name=\"");
2878         W10_V(value);
2879         W10_L("\"");
2880       }
2881       break;
2882
2883     case 'r':
2884     case 'R':
2885       if (strcasecmp(name, "rows") == 0) {
2886         W10_L(" rows=\"");
2887         W10_V(value);
2888         W10_L("\"");
2889       }
2890       break;
2891
2892     case 'c':
2893     case 'C':
2894       if (strcasecmp(name, "cols") == 0) {
2895         W10_L(" cols=\"");
2896         W10_V(value);
2897         W10_L("\"");
2898       }
2899       break;
2900     
2901     default:
2902       break;
2903     }
2904   }
2905
2906   W10_L(">\r\n");
2907   return chtml10->out;
2908 }
2909
2910
2911 /**
2912  * It is a handler who processes the TEXTAREA tag.
2913  *
2914  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
2915  *                     destination is specified.
2916  * @param node   [i]   The TEXTAREA tag node is specified.
2917  * @return The conversion result is returned.
2918  */
2919 static char *
2920 s_chtml10_end_textarea_tag(void *pdoc, Node *UNUSED(child)) 
2921 {
2922   Doc *doc;
2923   request_rec *r;
2924   chtml10_t *chtml10;
2925
2926   chtml10 = GET_CHTML10(pdoc);
2927   doc     = chtml10->doc;
2928   r       = doc->r;
2929
2930   W10_L("</textarea>\r\n");
2931   chtml10->textarea_flag--;
2932
2933   return chtml10->out;
2934 }
2935
2936
2937 static char *
2938 s_chtml10_text(void *pdoc, Node *child)
2939 {
2940   char *textval;
2941   char *tmp;
2942   char *tdst;
2943   char one_byte[2];
2944   int ii;
2945   int tdst_len;
2946   chtml10_t *chtml10;
2947   Doc *doc;
2948   request_rec *r;
2949
2950   chtml10 = GET_CHTML10(pdoc);
2951   doc     = chtml10->doc;
2952   r       = doc->r;
2953   
2954   textval = qs_get_node_value(doc,child);
2955   textval = qs_trim_string(doc->buf.pool, textval);
2956
2957   if (strlen(textval) == 0)
2958     return chtml10->out;
2959   
2960   tmp = apr_palloc(r->pool, qs_get_node_size(doc,child)+1);
2961   memset(tmp, 0, qs_get_node_size(doc,child)+1);
2962   
2963   tdst     = qs_alloc_zero_byte_string(r);
2964   memset(one_byte, 0, sizeof(one_byte));
2965   tdst_len = 0;
2966   
2967   for (ii=0; ii<qs_get_node_size(doc,child); ii++) {
2968     char* out;
2969     int   rtn;
2970
2971     rtn = s_chtml10_search_emoji(chtml10, &textval[ii], &out);
2972     if (rtn) {
2973       tdst = qs_out_apr_pstrcat(r, tdst, out, &tdst_len);
2974       ii+=(rtn - 1);
2975       continue;
2976     }
2977   
2978     if (is_sjis_kanji(textval[ii])) {
2979       one_byte[0] = textval[ii+0];
2980       tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2981       one_byte[0] = textval[ii+1];
2982       tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2983       ii++;
2984     }
2985     else 
2986     if (chtml10->pre_flag) {
2987       one_byte[0] = textval[ii+0];
2988       tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2989     }
2990     else 
2991     if (chtml10->textarea_flag) {
2992       one_byte[0] = textval[ii+0];
2993       tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2994     }
2995     else 
2996     if (textval[ii] != '\r' && textval[ii] != '\n') {
2997       one_byte[0] = textval[ii+0];
2998       tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2999     }
3000   }
3001
3002   W10_V(tdst);
3003   return chtml10->out;
3004 }
3005
3006
3007 /**
3008  * It is a handler who processes the BLOCKQUOTE tag.
3009  *
3010  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3011  *                     destination is specified.
3012  * @param node   [i]   The BLOCKQUOTE tag node is specified.
3013  * @return The conversion result is returned.
3014  */
3015 static char *
3016 s_chtml10_start_blockquote_tag(void *pdoc, Node *UNUSED(child))
3017 {
3018   chtml10_t *chtml10;
3019   Doc *doc;
3020   chtml10 = GET_CHTML10(pdoc);
3021   doc     = chtml10->doc;
3022   W10_L("<blockquote>");
3023   return chtml10->out;
3024 }
3025
3026
3027 /**
3028  * It is a handler who processes the BLOCKQUOTE tag.
3029  *
3030  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3031  *                     destination is specified.
3032  * @param node   [i]   The BLOCKQUOTE tag node is specified.
3033  * @return The conversion result is returned.
3034  */
3035 static char *
3036 s_chtml10_end_blockquote_tag(void *pdoc, Node *UNUSED(child))
3037 {
3038   chtml10_t *chtml10;
3039   Doc *doc;
3040
3041   chtml10 = GET_CHTML10(pdoc);
3042   doc     = chtml10->doc;
3043   W10_L("</blockquote>");
3044   return chtml10->out;
3045 }
3046
3047
3048 /**
3049  * It is a handler who processes the DIR tag.
3050  *
3051  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3052  *                     destination is specified.
3053  * @param node   [i]   The DIR tag node is specified.
3054  * @return The conversion result is returned.
3055  */
3056 static char *
3057 s_chtml10_start_dir_tag(void *pdoc, Node *UNUSED(child))
3058 {
3059   chtml10_t *chtml10;
3060   Doc *doc;
3061   chtml10 = GET_CHTML10(pdoc);
3062   doc     = chtml10->doc;
3063   W10_L("<dir>");
3064   return chtml10->out;
3065 }
3066
3067
3068 /**
3069  * It is a handler who processes the DIR tag.
3070  *
3071  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3072  *                     destination is specified.
3073  * @param node   [i]   The DIR tag node is specified.
3074  * @return The conversion result is returned.
3075  */
3076 static char *
3077 s_chtml10_end_dir_tag(void *pdoc, Node *UNUSED(child))
3078 {
3079   chtml10_t *chtml10;
3080   Doc *doc;
3081
3082   chtml10 = GET_CHTML10(pdoc);
3083   doc     = chtml10->doc;
3084   W10_L("</dir>");
3085   return chtml10->out;
3086 }
3087
3088
3089 /**
3090  * It is a handler who processes the DL tag.
3091  *
3092  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3093  *                     destination is specified.
3094  * @param node   [i]   The DL tag node is specified.
3095  * @return The conversion result is returned.
3096  */
3097 static char *
3098 s_chtml10_start_dl_tag(void *pdoc, Node *UNUSED(child))
3099 {
3100   chtml10_t *chtml10;
3101   Doc *doc;
3102   chtml10 = GET_CHTML10(pdoc);
3103   doc     = chtml10->doc;
3104   W10_L("<dl>");
3105   return chtml10->out;
3106 }
3107
3108
3109 /**
3110  * It is a handler who processes the DL tag.
3111  *
3112  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3113  *                     destination is specified.
3114  * @param node   [i]   The DL tag node is specified.
3115  * @return The conversion result is returned.
3116  */
3117 static char *
3118 s_chtml10_end_dl_tag(void *pdoc, Node *UNUSED(child))
3119 {
3120   chtml10_t *chtml10;
3121   Doc *doc;
3122   chtml10 = GET_CHTML10(pdoc);
3123   doc     = chtml10->doc;
3124   W10_L("</dl>");
3125   return chtml10->out;
3126 }
3127
3128
3129 /**
3130  * It is a handter who processes the DT tag.
3131  *
3132  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3133  *                     destination is specified.
3134  * @param node   [i]   The DT tag node is specified.
3135  * @return The conversion result is returned.
3136  */
3137 static char *
3138 s_chtml10_start_dt_tag(void *pdoc, Node *UNUSED(child))
3139 {
3140   chtml10_t *chtml10;
3141   Doc *doc;
3142   chtml10 = GET_CHTML10(pdoc);
3143   doc     = chtml10->doc;
3144   W10_L("<dt>");
3145   return chtml10->out;
3146 }
3147
3148
3149 /**
3150  * It is a handter who processes the DT tag.
3151  *
3152  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3153  *                     destination is specified.
3154  * @param node   [i]   The DT tag node is specified.
3155  * @return The conversion result is returned.
3156  */
3157 static char *
3158 s_chtml10_end_dt_tag(void *pdoc, Node *UNUSED(child))
3159 {
3160   chtml10_t *chtml10;
3161   chtml10 = GET_CHTML10(pdoc);
3162   return chtml10->out;
3163 }
3164
3165
3166 /**
3167  * It is a handder who processes the DD tag.
3168  *
3169  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3170  *                     destination is specified.
3171  * @param node   [i]   The DD tag node is specified.
3172  * @return The conversion result is returned.
3173  */
3174 static char *
3175 s_chtml10_start_dd_tag(void *pdoc, Node *UNUSED(child))
3176 {
3177   chtml10_t *chtml10;
3178   Doc *doc;
3179   chtml10 = GET_CHTML10(pdoc);
3180   doc     = chtml10->doc;
3181   W10_L("<dd>");
3182   return chtml10->out;
3183 }
3184
3185
3186 /**
3187  * It is a handder who processes the DD tag.
3188  *
3189  * @param pdoc  [i/o] The pointer to the CHTML structure at the output
3190  *                     destination is specified.
3191  * @param node   [i]   The DD tag node is specified.
3192  * @return The conversion result is returned.
3193  */
3194 static char *
3195 s_chtml10_end_dd_tag(void *pdoc, Node *UNUSED(child))
3196 {
3197   chtml10_t *chtml10;
3198   chtml10 = GET_CHTML10(pdoc);
3199   return chtml10->out;
3200 }
3201 /*
3202  * vim:ts=2 et
3203  */