2 * Copyright (C) 2005-2008 Atsushi Konno All rights reserved.
3 * Copyright (C) 2005 QSDN,Inc. All rights reserved.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #include "chxj_chtml20.h"
18 #include "chxj_hdml.h"
19 #include "chxj_str_util.h"
20 #include "chxj_dump.h"
21 #include "chxj_img_conv.h"
22 #include "chxj_qr_code.h"
23 #include "chxj_encoding.h"
24 #include "chxj_buffered_write.h"
27 #define GET_CHTML20(X) ((chtml20_t*)(X))
30 #define W_L(X) do { chtml20->out = BUFFERED_WRITE_LITERAL(chtml20->out, &doc->buf, (X)); } while(0)
31 #define W_V(X) do { chtml20->out = (X) ? BUFFERED_WRITE_VALUE(chtml20->out, &doc->buf, (X)) \
32 : BUFFERED_WRITE_LITERAL(chtml20->out, &doc->buf, ""); } while(0)
33 #define W_NLCODE() do { char *nlcode = TO_NLCODE(chtml20->conf); W_V(nlcode); } while (0);
35 static char *s_chtml20_start_html_tag (void *pdoc, Node *node);
36 static char *s_chtml20_end_html_tag (void *pdoc, Node *node);
37 static char *s_chtml20_start_meta_tag (void *pdoc, Node *node);
38 static char *s_chtml20_end_meta_tag (void *pdoc, Node *node);
39 static char *s_chtml20_start_textarea_tag(void *pdoc, Node *node);
40 static char *s_chtml20_end_textarea_tag (void *pdoc, Node *node);
41 static char *s_chtml20_start_p_tag (void *pdoc, Node *node);
42 static char *s_chtml20_end_p_tag (void *pdoc, Node *node);
43 static char *s_chtml20_start_pre_tag (void *pdoc, Node *node);
44 static char *s_chtml20_end_pre_tag (void *pdoc, Node *node);
45 static char *s_chtml20_start_h1_tag (void *pdoc, Node *node);
46 static char *s_chtml20_end_h1_tag (void *pdoc, Node *node);
47 static char *s_chtml20_start_h2_tag (void *pdoc, Node *node);
48 static char *s_chtml20_end_h2_tag (void *pdoc, Node *node);
49 static char *s_chtml20_start_h3_tag (void *pdoc, Node *node);
50 static char *s_chtml20_end_h3_tag (void *pdoc, Node *node);
51 static char *s_chtml20_start_h4_tag (void *pdoc, Node *node);
52 static char *s_chtml20_end_h4_tag (void *pdoc, Node *node);
53 static char *s_chtml20_start_h5_tag (void *pdoc, Node *node);
54 static char *s_chtml20_end_h5_tag (void *pdoc, Node *node);
55 static char *s_chtml20_start_h6_tag (void *pdoc, Node *node);
56 static char *s_chtml20_end_h6_tag (void *pdoc, Node *node);
57 static char *s_chtml20_start_ul_tag (void *pdoc, Node *node);
58 static char *s_chtml20_end_ul_tag (void *pdoc, Node *node);
59 static char *s_chtml20_start_ol_tag (void *pdoc, Node *node);
60 static char *s_chtml20_end_ol_tag (void *pdoc, Node *node);
61 static char *s_chtml20_start_li_tag (void *pdoc, Node *node);
62 static char *s_chtml20_end_li_tag (void *pdoc, Node *node);
63 static char *s_chtml20_start_head_tag (void *pdoc, Node *node);
64 static char *s_chtml20_end_head_tag (void *pdoc, Node *node);
65 static char *s_chtml20_start_title_tag (void *pdoc, Node *node);
66 static char *s_chtml20_end_title_tag (void *pdoc, Node *node);
67 static char *s_chtml20_start_base_tag (void *pdoc, Node *node);
68 static char *s_chtml20_end_base_tag (void *pdoc, Node *node);
69 static char *s_chtml20_start_body_tag (void *pdoc, Node *node);
70 static char *s_chtml20_end_body_tag (void *pdoc, Node *node);
71 static char *s_chtml20_start_a_tag (void *pdoc, Node *node);
72 static char *s_chtml20_end_a_tag (void *pdoc, Node *node);
73 static char *s_chtml20_start_br_tag (void *pdoc, Node *node);
74 static char *s_chtml20_end_br_tag (void *pdoc, Node *node);
75 static char *s_chtml20_start_tr_tag (void *pdoc, Node *node);
76 static char *s_chtml20_end_tr_tag (void *pdoc, Node *node);
77 static char *s_chtml20_start_font_tag (void *pdoc, Node *node);
78 static char *s_chtml20_end_font_tag (void *pdoc, Node *node);
79 static char *s_chtml20_start_form_tag (void *pdoc, Node *node);
80 static char *s_chtml20_end_form_tag (void *pdoc, Node *node);
81 static char *s_chtml20_start_input_tag (void *pdoc, Node *node);
82 static char *s_chtml20_end_input_tag (void *pdoc, Node *node);
83 static char *s_chtml20_start_center_tag (void *pdoc, Node *node);
84 static char *s_chtml20_end_center_tag (void *pdoc, Node *node);
85 static char *s_chtml20_start_hr_tag (void *pdoc, Node *node);
86 static char *s_chtml20_end_hr_tag (void *pdoc, Node *node);
87 static char *s_chtml20_start_img_tag (void *pdoc, Node *node);
88 static char *s_chtml20_end_img_tag (void *pdoc, Node *node);
89 static char *s_chtml20_start_select_tag (void *pdoc, Node *node);
90 static char *s_chtml20_end_select_tag (void *pdoc, Node *node);
91 static char *s_chtml20_start_option_tag (void *pdoc, Node *node);
92 static char *s_chtml20_end_option_tag (void *pdoc, Node *node);
93 static char *s_chtml20_start_div_tag (void *pdoc, Node *node);
94 static char *s_chtml20_end_div_tag (void *pdoc, Node *node);
95 static char *s_chtml20_start_blockquote_tag(void *pdoc, Node *node);
96 static char *s_chtml20_end_blockquote_tag (void *pdoc, Node *node);
97 static char *s_chtml20_start_dir_tag (void *pdoc, Node *node);
98 static char *s_chtml20_end_dir_tag (void *pdoc, Node *node);
99 static char *s_chtml20_start_dl_tag (void *pdoc, Node *node);
100 static char *s_chtml20_end_dl_tag (void *pdoc, Node *node);
101 static char *s_chtml20_start_dt_tag (void *pdoc, Node *node);
102 static char *s_chtml20_end_dt_tag (void *pdoc, Node *node);
103 static char *s_chtml20_start_dd_tag (void *pdoc, Node *node);
104 static char *s_chtml20_end_dd_tag (void *pdoc, Node *node);
105 static char *s_chtml20_start_menu_tag (void *pdoc, Node *node);
106 static char *s_chtml20_end_menu_tag (void *pdoc, Node *node);
107 static char *s_chtml20_start_plaintext_tag (void *pdoc, Node *node);
108 static char *s_chtml20_start_plaintext_tag_inner (void *pdoc, Node *node);
109 static char *s_chtml20_end_plaintext_tag (void *pdoc, Node *node);
110 static char *s_chtml20_start_blink_tag (void *pdoc, Node *node);
111 static char *s_chtml20_end_blink_tag (void *pdoc, Node *node);
112 static char *s_chtml20_start_marquee_tag (void *pdoc, Node *node);
113 static char *s_chtml20_end_marquee_tag (void *pdoc, Node *node);
115 static void s_init_chtml20(chtml20_t *chtml, Doc *doc, request_rec *r, device_table *spec);
117 static int s_chtml20_search_emoji(chtml20_t *chtml, char *txt, char **rslt);
119 static char *s_chtml20_chxjif_tag(void *pdoc, Node *node);
120 static char *s_chtml20_text_tag(void *pdoc, Node *node);
123 tag_handler chtml20_handler[] = {
126 s_chtml20_start_html_tag,
127 s_chtml20_end_html_tag,
131 s_chtml20_start_meta_tag,
132 s_chtml20_end_meta_tag,
136 s_chtml20_start_textarea_tag,
137 s_chtml20_end_textarea_tag,
141 s_chtml20_start_p_tag,
146 s_chtml20_start_pre_tag,
147 s_chtml20_end_pre_tag,
151 s_chtml20_start_ul_tag,
152 s_chtml20_end_ul_tag,
156 s_chtml20_start_li_tag,
157 s_chtml20_end_li_tag,
161 s_chtml20_start_ol_tag,
162 s_chtml20_end_ol_tag,
166 s_chtml20_start_h1_tag,
167 s_chtml20_end_h1_tag,
171 s_chtml20_start_h2_tag,
172 s_chtml20_end_h2_tag,
176 s_chtml20_start_h3_tag,
177 s_chtml20_end_h3_tag,
181 s_chtml20_start_h4_tag,
182 s_chtml20_end_h4_tag,
186 s_chtml20_start_h5_tag,
187 s_chtml20_end_h5_tag,
191 s_chtml20_start_h6_tag,
192 s_chtml20_end_h6_tag,
196 s_chtml20_start_head_tag,
197 s_chtml20_end_head_tag,
201 s_chtml20_start_title_tag,
202 s_chtml20_end_title_tag,
206 s_chtml20_start_base_tag,
207 s_chtml20_end_base_tag,
211 s_chtml20_start_body_tag,
212 s_chtml20_end_body_tag,
216 s_chtml20_start_a_tag,
221 s_chtml20_start_br_tag,
222 s_chtml20_end_br_tag,
231 s_chtml20_start_tr_tag,
232 s_chtml20_end_tr_tag,
246 s_chtml20_start_font_tag,
247 s_chtml20_end_font_tag,
251 s_chtml20_start_form_tag,
252 s_chtml20_end_form_tag,
256 s_chtml20_start_input_tag,
257 s_chtml20_end_input_tag,
261 s_chtml20_start_center_tag,
262 s_chtml20_end_center_tag,
266 s_chtml20_start_hr_tag,
267 s_chtml20_end_hr_tag,
271 s_chtml20_start_img_tag,
272 s_chtml20_end_img_tag,
276 s_chtml20_start_select_tag,
277 s_chtml20_end_select_tag,
281 s_chtml20_start_option_tag,
282 s_chtml20_end_option_tag,
286 s_chtml20_start_div_tag,
287 s_chtml20_end_div_tag,
291 s_chtml20_chxjif_tag,
336 s_chtml20_start_dt_tag,
337 s_chtml20_end_dt_tag,
351 s_chtml20_start_blockquote_tag,
352 s_chtml20_end_blockquote_tag,
356 s_chtml20_start_dir_tag,
357 s_chtml20_end_dir_tag,
361 s_chtml20_start_dl_tag,
362 s_chtml20_end_dl_tag,
366 s_chtml20_start_dd_tag,
367 s_chtml20_end_dd_tag,
371 s_chtml20_start_menu_tag,
372 s_chtml20_end_menu_tag,
376 s_chtml20_start_plaintext_tag,
377 s_chtml20_end_plaintext_tag,
381 s_chtml20_start_blink_tag,
382 s_chtml20_end_blink_tag,
386 s_chtml20_start_marquee_tag,
387 s_chtml20_end_marquee_tag,
392 * converts from CHTML5.0 to CHTML2.0.
394 * @param r [i] Requet_rec is appointed.
395 * @param spec [i] The result of the device specification processing which
396 * was done in advance is appointed.
397 * @param src [i] The character string before the converting is appointed.
398 * @return The character string after the converting is returned.
401 chxj_convert_chtml20(
407 chxjconvrule_entry *entryp,
416 /*--------------------------------------------------------------------------*/
418 /*--------------------------------------------------------------------------*/
420 dst = chxj_qr_code_blob_handler(r, src, (size_t*)dstlen);
422 DBG(r,"i found qrcode xml");
425 DBG(r,"not found qrcode xml");
427 /*--------------------------------------------------------------------------*/
428 /* The CHTML structure is initialized. */
429 /*--------------------------------------------------------------------------*/
430 s_init_chtml20(&chtml20, &doc, r, spec);
433 chtml20.entryp = entryp;
434 chtml20.cookie = cookie;
436 chxj_set_content_type(r, "text/html; charset=Windows-31J");
438 /*--------------------------------------------------------------------------*/
439 /* The character string of the input is analyzed. */
440 /*--------------------------------------------------------------------------*/
441 qs_init_malloc(&doc);
442 qs_init_root_node(&doc);
444 ss = apr_pcalloc(r->pool, srclen + 1);
445 memset(ss, 0, srclen + 1);
446 memcpy(ss, src, srclen);
449 chxj_dump_out("[src] CHTML -> CHTML2.0", ss, srclen);
452 qs_parse_string(&doc,ss, strlen(ss));
454 chxj_buffered_write_init(r->pool, &doc.buf);
455 /*--------------------------------------------------------------------------*/
456 /* It converts it from CHTML to CHTML. */
457 /*--------------------------------------------------------------------------*/
458 chxj_node_convert(spec,r,(void *)&chtml20, &doc, qs_get_root(&doc), 0);
459 chtml20.out = chxj_buffered_write_flush(chtml20.out, &doc.buf);
460 dst = apr_pstrdup(r->pool, chtml20.out);
461 chxj_buffered_write_terminate(&doc.buf);
463 qs_all_free(&doc,QX_LOGMARK);
466 return apr_pstrdup(r->pool,ss);
469 if (strlen(dst) == 0) {
470 dst = apr_psprintf(r->pool, "\n");
473 *dstlen = strlen(dst);
476 chxj_dump_out("[dst] CHTML -> CHTML2.0", dst, *dstlen);
483 * The CHTML structure is initialized.
485 * @param chtml20 [i/o] The pointer to the HDML structure that wants to be
486 * initialized is specified.
487 * @param doc [i] The Doc structure that should be set to the initialized
488 * HDML structure is specified.
489 * @param r [i] To use POOL, the pointer to request_rec is specified.
490 * @param spec [i] The pointer to the device_table
493 s_init_chtml20(chtml20_t *chtml20, Doc *doc, request_rec *r, device_table *spec)
495 memset(doc, 0, sizeof(Doc));
496 memset(chtml20, 0, sizeof(chtml20_t));
500 chtml20->spec = spec;
501 chtml20->out = qs_alloc_zero_byte_string(r);
502 chtml20->conf = chxj_get_module_config(r->per_dir_config, &chxj_module);
504 chtml20->doc->parse_mode = PARSE_MODE_CHTML;
509 * Corresponding EMOJI to a current character-code is retrieved.
510 * The substitution character string is stored in the rslt pointer if agreeing.
512 * @param chtml20 [i] The pointer to the CHTML structure is specified.
513 * @param txt [i] The character string to want to examine whether it is
514 * EMOJI is specified.
515 * @param rslt [o] The pointer to the pointer that stores the result is
517 * @return When corresponding EMOJI exists, it returns it excluding 0.
520 s_chtml20_search_emoji(chtml20_t *chtml20, char *txt, char **rslt)
527 spec = chtml20->spec;
533 DBG(r,"spec is NULL");
535 for (ee = chtml20->conf->emoji;
539 if (ee->imode == NULL) {
540 DBG(r,"emoji->imode is NULL");
544 if (ee->imode->string != NULL
545 && strlen(ee->imode->string) > 0
546 && strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
547 if (spec == NULL || spec->emoji_type == NULL) {
548 *rslt = apr_palloc(r->pool, 3);
549 (*rslt)[0] = ee->imode->hex1byte & 0xff;
550 (*rslt)[1] = ee->imode->hex2byte & 0xff;
552 return strlen(ee->imode->string);
564 * It is a handler who processes the HTML tag.
566 * @param pdoc [i/o] The pointer to the CHTML structure at the output
567 * destination is specified.
568 * @param node [i] The HTML tag node is specified.
569 * @return The conversion result is returned.
572 s_chtml20_start_html_tag(void *pdoc, Node *UNUSED(node))
578 chtml20 = GET_CHTML20(pdoc);
582 /*--------------------------------------------------------------------------*/
584 /*--------------------------------------------------------------------------*/
592 * It is a handler who processes the HTML tag.
594 * @param pdoc [i/o] The pointer to the CHTML structure at the output
595 * destination is specified.
596 * @param node [i] The HTML tag node is specified.
597 * @return The conversion result is returned.
600 s_chtml20_end_html_tag(void *pdoc, Node *UNUSED(child))
606 chtml20 = GET_CHTML20(pdoc);
617 * It is a handler who processes the META tag.
619 * @param pdoc [i/o] The pointer to the CHTML structure at the output
620 * destination is specified.
621 * @param node [i] The META tag node is specified.
622 * @return The conversion result is returned.
625 s_chtml20_start_meta_tag(void *pdoc, Node *node)
631 int content_type_flag;
634 chtml20 = GET_CHTML20(pdoc);
638 content_type_flag = 0;
642 /*--------------------------------------------------------------------------*/
644 /*--------------------------------------------------------------------------*/
645 for (attr = qs_get_attr(doc,node);
647 attr = qs_get_next_attr(doc,attr)) {
648 char *name = qs_get_attr_name(doc,attr);
649 char *value = qs_get_attr_value(doc,attr);
653 if (strcasecmp(name, "http-equiv") == 0 && value && *value) {
654 /*----------------------------------------------------------------------*/
656 /*----------------------------------------------------------------------*/
657 W_L(" http-equiv=\"");
660 if (STRCASEEQ('c','C',"content-type", value)) {
661 content_type_flag = 1;
663 if (STRCASEEQ('r','R',"refresh", value)) {
671 if (strcasecmp(name, "content") == 0 && value && *value) {
672 if (content_type_flag) {
675 W_L("=\"text/html; charset=Windows-31J\"");
677 else if (refresh_flag) {
678 char *buf = apr_pstrdup(r->pool, value);
682 url = strchr(buf, ';');
684 sec = apr_pstrdup(r->pool, buf);
687 url = chxj_encoding_parameter(r, url);
688 url = chxj_add_cookie_parameter(r, url, chtml20->cookie);
720 * It is a handler who processes the META tag.
722 * @param pdoc [i/o] The pointer to the CHTML structure at the output
723 * destination is specified.
724 * @param node [i] The META tag node is specified.
725 * @return The conversion result is returned.
728 s_chtml20_end_meta_tag(void *pdoc, Node *UNUSED(child))
730 chtml20_t *chtml20 = GET_CHTML20(pdoc);
737 * It is a handler who processes the HEAD tag.
739 * @param pdoc [i/o] The pointer to the CHTML structure at the output
740 * destination is specified.
741 * @param node [i] The HEAD tag node is specified.
742 * @return The conversion result is returned.
745 s_chtml20_start_head_tag(void *pdoc, Node *UNUSED(node))
750 chtml20 = GET_CHTML20(pdoc);
761 * It is a handler who processes the HEAD tag.
763 * @param pdoc [i/o] The pointer to the CHTML structure at the output
764 * destination is specified.
765 * @param node [i] The HEAD tag node is specified.
766 * @return The conversion result is returned.
769 s_chtml20_end_head_tag(void *pdoc, Node *UNUSED(child))
775 chtml20 = GET_CHTML20(pdoc);
787 * It is a handler who processes the TITLE tag.
789 * @param pdoc [i/o] The pointer to the CHTML structure at the output
790 * destination is specified.
791 * @param node [i] The TITLE tag node is specified.
792 * @return The conversion result is returned.
795 s_chtml20_start_title_tag(void *pdoc, Node *UNUSED(node))
801 chtml20 = GET_CHTML20(pdoc);
813 * It is a handler who processes the TITLE tag.
815 * @param pdoc [i/o] The pointer to the CHTML structure at the output
816 * destination is specified.
817 * @param node [i] The TITLE tag node is specified.
818 * @return The conversion result is returned.
821 s_chtml20_end_title_tag(void *pdoc, Node *UNUSED(child))
827 chtml20 = GET_CHTML20(pdoc);
839 * It is a handler who processes the BASE tag.
841 * @param pdoc [i/o] The pointer to the CHTML structure at the output
842 * destination is specified.
843 * @param node [i] The BASE tag node is specified.
844 * @return The conversion result is returned.
847 s_chtml20_start_base_tag(void *pdoc, Node *node)
854 chtml20 = GET_CHTML20(pdoc);
859 /*--------------------------------------------------------------------------*/
861 /*--------------------------------------------------------------------------*/
862 for (attr = qs_get_attr(doc,node);
864 attr = qs_get_next_attr(doc,attr)) {
865 char *name = qs_get_attr_name(doc,attr);
866 char *value = qs_get_attr_value(doc,attr);
867 if (STRCASEEQ('h','H',"href", name)) {
881 * It is a handler who processes the BASE tag.
883 * @param pdoc [i/o] The pointer to the CHTML structure at the output
884 * destination is specified.
885 * @param node [i] The BASE tag node is specified.
886 * @return The conversion result is returned.
889 s_chtml20_end_base_tag(void *pdoc, Node *UNUSED(child))
895 chtml20 = GET_CHTML20(pdoc);
904 * It is a handler who processes the BODY tag.
906 * @param pdoc [i/o] The pointer to the CHTML structure at the output
907 * destination is specified.
908 * @param node [i] The BODY tag node is specified.
909 * @return The conversion result is returned.
912 s_chtml20_start_body_tag(void *pdoc, Node *node)
919 chtml20 = GET_CHTML20(pdoc);
924 /*--------------------------------------------------------------------------*/
926 /*--------------------------------------------------------------------------*/
927 for (attr = qs_get_attr(doc,node);
929 attr = qs_get_next_attr(doc,attr)) {
930 char *name = qs_get_attr_name(doc,attr);
931 char *value = qs_get_attr_value(doc,attr);
935 if (strcasecmp(name, "bgcolor") == 0 && value && *value != 0) {
936 /*----------------------------------------------------------------------*/
938 /*----------------------------------------------------------------------*/
947 if (strcasecmp(name, "text") == 0 && value && *value != 0) {
948 /*----------------------------------------------------------------------*/
950 /*----------------------------------------------------------------------*/
959 if (strcasecmp(name, "link") == 0 && value && *value != 0) {
960 /*----------------------------------------------------------------------*/
962 /*----------------------------------------------------------------------*/
971 if (strcasecmp(name, "alink") == 0) {
972 /*----------------------------------------------------------------------*/
974 /*----------------------------------------------------------------------*/
981 if (strcasecmp(name, "vlink") == 0) {
982 /*----------------------------------------------------------------------*/
984 /*----------------------------------------------------------------------*/
1001 * It is a handler who processes the BODY tag.
1003 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1004 * destination is specified.
1005 * @param node [i] The BODY tag node is specified.
1006 * @return The conversion result is returned.
1009 s_chtml20_end_body_tag(void *pdoc, Node *UNUSED(child))
1015 chtml20 = GET_CHTML20(pdoc);
1022 return chtml20->out;
1027 * It is a handler who processes the A tag.
1029 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1030 * destination is specified.
1031 * @param node [i] The A tag node is specified.
1032 * @return The conversion result is returned.
1035 s_chtml20_start_a_tag(void *pdoc, Node *node)
1042 chtml20 = GET_CHTML20(pdoc);
1047 /*--------------------------------------------------------------------------*/
1048 /* Get Attributes */
1049 /*--------------------------------------------------------------------------*/
1050 for (attr = qs_get_attr(doc,node);
1052 attr = qs_get_next_attr(doc,attr)) {
1053 char *name = qs_get_attr_name(doc,attr);
1054 char *value = qs_get_attr_value(doc,attr);
1058 if (strcasecmp(name, "name") == 0) {
1059 /*--------------------------------------------------------------------*/
1061 /*--------------------------------------------------------------------*/
1070 if (strcasecmp(name, "href") == 0) {
1071 /*--------------------------------------------------------------------*/
1073 /*--------------------------------------------------------------------*/
1074 value = chxj_encoding_parameter(r, value);
1075 value = chxj_add_cookie_parameter(r, value, chtml20->cookie);
1084 if (strcasecmp(name, "accesskey") == 0) {
1085 /*--------------------------------------------------------------------*/
1087 /*--------------------------------------------------------------------*/
1088 W_L(" accesskey=\"");
1096 if (strcasecmp(name, "cti") == 0) {
1097 /*--------------------------------------------------------------------*/
1099 /*--------------------------------------------------------------------*/
1108 if (strcasecmp(name, "ijam") == 0) {
1109 /*--------------------------------------------------------------------*/
1111 /*--------------------------------------------------------------------*/
1115 if (strcasecmp(name, "ista") == 0) {
1116 /*--------------------------------------------------------------------*/
1118 /*--------------------------------------------------------------------*/
1122 if (strcasecmp(name, "ilet") == 0) {
1123 /*--------------------------------------------------------------------*/
1125 /*--------------------------------------------------------------------*/
1129 if (strcasecmp(name, "iswf") == 0) {
1130 /*--------------------------------------------------------------------*/
1132 /*--------------------------------------------------------------------*/
1136 if (strcasecmp(name, "irst") == 0) {
1137 /*--------------------------------------------------------------------*/
1139 /*--------------------------------------------------------------------*/
1146 if (strcasecmp(name, "utn") == 0) {
1147 /*--------------------------------------------------------------------*/
1149 /*--------------------------------------------------------------------*/
1156 if (strcasecmp(name, "telbook") == 0) {
1157 /*--------------------------------------------------------------------*/
1159 /*--------------------------------------------------------------------*/
1166 if (strcasecmp(name, "kana") == 0) {
1167 /*--------------------------------------------------------------------*/
1169 /*--------------------------------------------------------------------*/
1176 if (strcasecmp(name, "email") == 0) {
1177 /*--------------------------------------------------------------------*/
1179 /*--------------------------------------------------------------------*/
1189 return chtml20->out;
1194 * It is a handler who processes the A tag.
1196 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1197 * destination is specified.
1198 * @param node [i] The A tag node is specified.
1199 * @return The conversion result is returned.
1202 s_chtml20_end_a_tag(void *pdoc, Node *UNUSED(child))
1208 chtml20 = GET_CHTML20(pdoc);
1215 return chtml20->out;
1220 * It is a handler who processes the BR tag.
1222 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1223 * destination is specified.
1224 * @param node [i] The BR tag node is specified.
1225 * @return The conversion result is returned.
1228 s_chtml20_start_br_tag(void *pdoc, Node *node)
1235 chtml20 = GET_CHTML20(pdoc);
1240 /*--------------------------------------------------------------------------*/
1241 /* Get Attributes */
1242 /*--------------------------------------------------------------------------*/
1243 for (attr = qs_get_attr(doc,node);
1245 attr = qs_get_next_attr(doc,attr)) {
1246 char *name = qs_get_attr_name(doc,attr);
1247 char *value = qs_get_attr_value(doc,attr);
1248 if (STRCASEEQ('c','C',"clear",name)) {
1249 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('a','A',"all",value))) {
1259 return chtml20->out;
1264 * It is a handler who processes the BR tag.
1266 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1267 * destination is specified.
1268 * @param node [i] The BR tag node is specified.
1269 * @return The conversion result is returned.
1272 s_chtml20_end_br_tag(void *pdoc, Node *UNUSED(child))
1278 chtml20 = GET_CHTML20(pdoc);
1282 return chtml20->out;
1287 * It is a handler who processes the TR tag.
1289 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1290 * destination is specified.
1291 * @param node [i] The TR tag node is specified.
1292 * @return The conversion result is returned.
1295 s_chtml20_start_tr_tag(void *pdoc, Node *UNUSED(node))
1301 chtml20 = GET_CHTML20(pdoc);
1305 return chtml20->out;
1310 * It is a handler who processes the TR tag.
1312 * @param chtml20 [i/o] The pointer to the CHTML structure at the output
1313 * destination is specified.
1314 * @param node [i] The TR tag node is specified.
1315 * @return The conversion result is returned.
1318 s_chtml20_end_tr_tag(void *pdoc, Node *UNUSED(child))
1324 chtml20 = GET_CHTML20(pdoc);
1331 return chtml20->out;
1336 * It is a handler who processes the FONT tag.
1338 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1339 * destination is specified.
1340 * @param node [i] The FONT tag node is specified.
1341 * @return The conversion result is returned.
1344 s_chtml20_start_font_tag(void *pdoc, Node *node)
1351 chtml20 = GET_CHTML20(pdoc);
1357 /*--------------------------------------------------------------------------*/
1358 /* Get Attributes */
1359 /*--------------------------------------------------------------------------*/
1360 for (attr = qs_get_attr(doc,node);
1362 attr = qs_get_next_attr(doc,attr)) {
1363 char *name = qs_get_attr_name(doc,attr);
1364 char *value = qs_get_attr_value(doc,attr);
1368 if (strcasecmp(name, "color") == 0 && value && *value) {
1377 if (strcasecmp(name, "size") == 0) {
1378 /*--------------------------------------------------------------------*/
1380 /*--------------------------------------------------------------------*/
1390 return chtml20->out;
1395 * It is a handler who processes the FONT tag.
1397 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1398 * destination is specified.
1399 * @param node [i] The FONT tag node is specified.
1400 * @return The conversion result is returned.
1403 s_chtml20_end_font_tag(void *pdoc, Node *UNUSED(child))
1409 chtml20 = GET_CHTML20(pdoc);
1414 return chtml20->out;
1419 * It is a handler who processes the FORM tag.
1421 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1422 * destination is specified.
1423 * @param node [i] The FORM tag node is specified.
1424 * @return The conversion result is returned.
1427 s_chtml20_start_form_tag(void *pdoc, Node *node)
1434 chtml20 = GET_CHTML20(pdoc);
1439 /*--------------------------------------------------------------------------*/
1440 /* Get Attributes */
1441 /*--------------------------------------------------------------------------*/
1442 for (attr = qs_get_attr(doc,node);
1444 attr = qs_get_next_attr(doc,attr)) {
1445 char *name = qs_get_attr_name(doc,attr);
1446 char *value = qs_get_attr_value(doc,attr);
1450 if (strcasecmp(name, "action") == 0) {
1451 /*--------------------------------------------------------------------*/
1453 /*--------------------------------------------------------------------*/
1454 value = chxj_encoding_parameter(r, value);
1455 value = chxj_add_cookie_parameter(r, value, chtml20->cookie);
1465 if (strcasecmp(name, "method") == 0) {
1466 /*--------------------------------------------------------------------*/
1468 /*--------------------------------------------------------------------*/
1477 if (strcasecmp(name, "utn") == 0) {
1478 /*--------------------------------------------------------------------*/
1480 /*--------------------------------------------------------------------*/
1492 return chtml20->out;
1497 * It is a handler who processes the FORM tag.
1499 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1500 * destination is specified.
1501 * @param node [i] The FORM tag node is specified.
1502 * @return The conversion result is returned.
1505 s_chtml20_end_form_tag(void *pdoc, Node *UNUSED(child))
1511 chtml20 = GET_CHTML20(pdoc);
1518 return chtml20->out;
1523 * It is a handler who processes the INPUT tag.
1525 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1526 * destination is specified.
1527 * @param node [i] The INPUT tag node is specified.
1528 * @return The conversion result is returned.
1531 s_chtml20_start_input_tag(void *pdoc, Node *node)
1536 char *max_length = NULL;
1540 char *istyle = NULL;
1542 char *checked = NULL;
1543 char *accesskey = NULL;
1545 chtml20 = GET_CHTML20(pdoc);
1551 /*--------------------------------------------------------------------------*/
1552 /* Get Attributes */
1553 /*--------------------------------------------------------------------------*/
1554 type = qs_get_type_attr(doc, node, r);
1555 name = qs_get_name_attr(doc, node, r);
1556 value = qs_get_value_attr(doc,node,r);
1557 istyle = qs_get_istyle_attr(doc,node,r);
1558 max_length = qs_get_maxlength_attr(doc,node,r);
1559 checked = qs_get_checked_attr(doc,node,r);
1560 accesskey = qs_get_accesskey_attr(doc, node, r);
1561 size = qs_get_size_attr(doc, node, r);
1564 type = qs_trim_string(doc->buf.pool, type);
1565 if (type && (STRCASEEQ('t','T',"text", type) ||
1566 STRCASEEQ('p','P',"password",type) ||
1567 STRCASEEQ('c','C',"checkbox",type) ||
1568 STRCASEEQ('r','R',"radio", type) ||
1569 STRCASEEQ('h','H',"hidden", type) ||
1570 STRCASEEQ('s','S',"submit", type) ||
1571 STRCASEEQ('r','R',"reset", type))) {
1577 if (size && *size) {
1582 if (name && *name) {
1587 if (value && *value) {
1592 if (accesskey && *accesskey) {
1593 W_L(" accesskey=\"");
1598 /*------------------------------------------------------------------------*/
1600 /*------------------------------------------------------------------------*/
1601 if (*istyle == '1' || *istyle == '2' || *istyle == '3' || *istyle == '4') {
1607 /*--------------------------------------------------------------------------*/
1608 /* The figure is default for the password. */
1609 /*--------------------------------------------------------------------------*/
1610 if (max_length && *max_length) {
1611 if (chxj_chk_numeric(max_length) != 0) {
1612 max_length = apr_psprintf(doc->buf.pool, "0");
1614 if (istyle && *istyle == '1') {
1615 char *vv = apr_psprintf(doc->buf.pool, " maxlength=\"%d\"", chxj_atoi(max_length) * 2);
1619 char *vv = apr_psprintf(doc->buf.pool, " maxlength=\"%d\"", chxj_atoi(max_length));
1629 return chtml20->out;
1634 * It is a handler who processes the INPUT tag.
1636 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1637 * destination is specified.
1638 * @param node [i] The INPUT tag node is specified.
1639 * @return The conversion result is returned.
1642 s_chtml20_end_input_tag(void *pdoc, Node *UNUSED(child))
1648 chtml20 = GET_CHTML20(pdoc);
1652 return chtml20->out;
1657 * It is a handler who processes the CENTER tag.
1659 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1660 * destination is specified.
1661 * @param node [i] The CENTER tag node is specified.
1662 * @return The conversion result is returned.
1665 s_chtml20_start_center_tag(void *pdoc, Node *UNUSED(node))
1671 chtml20 = GET_CHTML20(pdoc);
1676 return chtml20->out;
1681 * It is a handler who processes the CENTER tag.
1683 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1684 * destination is specified.
1685 * @param node [i] The CENTER tag node is specified.
1686 * @return The conversion result is returned.
1689 s_chtml20_end_center_tag(void *pdoc, Node *UNUSED(child))
1695 chtml20 = GET_CHTML20(pdoc);
1702 return chtml20->out;
1707 * It is a handler who processes the UL tag.
1709 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1710 * destination is specified.
1711 * @param node [i] The UL tag node is specified.
1712 * @return The conversion result is returned.
1715 s_chtml20_start_ul_tag(void *pdoc, Node *UNUSED(node))
1721 chtml20 = GET_CHTML20(pdoc);
1728 return chtml20->out;
1733 * It is a handler who processes the UL tag.
1735 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1736 * destination is specified.
1737 * @param node [i] The UL tag node is specified.
1738 * @return The conversion result is returned.
1741 s_chtml20_end_ul_tag(void *pdoc, Node *UNUSED(child))
1747 chtml20 = GET_CHTML20(pdoc);
1754 return chtml20->out;
1759 * It is a handler who processes the OL tag.
1761 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1762 * destination is specified.
1763 * @param node [i] The OL tag node is specified.
1764 * @return The conversion result is returned.
1767 s_chtml20_start_ol_tag(void *pdoc, Node *node)
1774 chtml20 = GET_CHTML20(pdoc);
1779 /*--------------------------------------------------------------------------*/
1780 /* Get Attributes */
1781 /*--------------------------------------------------------------------------*/
1782 for (attr = qs_get_attr(doc,node);
1784 attr = qs_get_next_attr(doc,attr)) {
1785 char *name = qs_get_attr_name(doc,attr);
1786 char *value = qs_get_attr_value(doc,attr);
1787 if (STRCASEEQ('t','T',"type",name) && value && (*value == '1' || *value == 'a' || *value == 'A')) {
1792 else if (STRCASEEQ('s','S',"start",name) && value && *value) {
1801 return chtml20->out;
1806 * It is a handler who processes the OL tag.
1808 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1809 * destination is specified.
1810 * @param node [i] The OL tag node is specified.
1811 * @return The conversion result is returned.
1814 s_chtml20_end_ol_tag(void *pdoc, Node *UNUSED(child))
1820 chtml20 = GET_CHTML20(pdoc);
1827 return chtml20->out;
1832 * It is a handler who processes the LI tag.
1834 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1835 * destination is specified.
1836 * @param node [i] The LI tag node is specified.
1837 * @return The conversion result is returned.
1840 s_chtml20_start_li_tag(void *pdoc, Node *node)
1847 chtml20 = GET_CHTML20(pdoc);
1852 /*--------------------------------------------------------------------------*/
1853 /* Get Attributes */
1854 /*--------------------------------------------------------------------------*/
1855 for (attr = qs_get_attr(doc,node);
1857 attr = qs_get_next_attr(doc,attr)) {
1858 char *name = qs_get_attr_name(doc,attr);
1859 char *value = qs_get_attr_value(doc,attr);
1860 if (STRCASEEQ('t','T',"type",name) && value && (*value == '1' || *value == 'a' || *value == 'A')) {
1865 else if (STRCASEEQ('v','V',"value", name) && value && *value) {
1872 return chtml20->out;
1877 * It is a handler who processes the LI tag.
1879 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1880 * destination is specified.
1881 * @param node [i] The LI tag node is specified.
1882 * @return The conversion result is returned.
1885 s_chtml20_end_li_tag(void *pdoc, Node *UNUSED(child))
1887 chtml20_t *chtml20 = GET_CHTML20(pdoc);
1888 return chtml20->out;
1893 * It is a handler who processes the HR tag.
1895 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1896 * destination is specified.
1897 * @param node [i] The HR tag node is specified.
1898 * @return The conversion result is returned.
1901 s_chtml20_start_hr_tag(void *pdoc, Node *node)
1908 chtml20 = GET_CHTML20(pdoc);
1914 for (attr = qs_get_attr(doc,node);
1916 attr = qs_get_next_attr(doc,attr)) {
1917 char *name = qs_get_attr_name(doc,attr);
1918 char *value = qs_get_attr_value(doc,attr);
1922 if (strcasecmp(name, "align") == 0) {
1923 /*--------------------------------------------------------------------*/
1925 /*--------------------------------------------------------------------*/
1926 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
1936 if (strcasecmp(name, "size") == 0) {
1937 /*--------------------------------------------------------------------*/
1939 /*--------------------------------------------------------------------*/
1940 if (value && value[0] != '\0') {
1950 if (strcasecmp(name, "width") == 0) {
1951 /*--------------------------------------------------------------------*/
1953 /*--------------------------------------------------------------------*/
1954 if (value && value[0] != '\0') {
1964 if (strcasecmp(name, "noshade") == 0) {
1965 /*--------------------------------------------------------------------*/
1967 /*--------------------------------------------------------------------*/
1974 if (strcasecmp(name, "color") == 0) {
1975 /*--------------------------------------------------------------------*/
1977 /*--------------------------------------------------------------------*/
1988 return chtml20->out;
1993 * It is a handler who processes the HR tag.
1995 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1996 * destination is specified.
1997 * @param node [i] The HR tag node is specified.
1998 * @return The conversion result is returned.
2001 s_chtml20_end_hr_tag(void *pdoc, Node *UNUSED(child))
2003 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2004 return chtml20->out;
2009 * It is a handler who processes the IMG tag.
2011 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2012 * destination is specified.
2013 * @param node [i] The IMG tag node is specified.
2014 * @return The conversion result is returned.
2017 s_chtml20_start_img_tag(void *pdoc, Node *node)
2023 #ifndef IMG_NOT_CONVERT_FILENAME
2027 chtml20 = GET_CHTML20(pdoc);
2031 #ifndef IMG_NOT_CONVERT_FILENAME
2032 spec = chtml20->spec;
2036 /*-------------------------------------------------------------------------*/
2037 /* Get Attributes */
2038 /*-------------------------------------------------------------------------*/
2039 for (attr = qs_get_attr(doc,node);
2041 attr = qs_get_next_attr(doc,attr)) {
2042 char *name = qs_get_attr_name(doc,attr);
2043 char *value = qs_get_attr_value(doc,attr);
2047 if (strcasecmp(name, "src") == 0) {
2048 /*-------------------------------------------------------------------*/
2050 /*-------------------------------------------------------------------*/
2051 #ifdef IMG_NOT_CONVERT_FILENAME
2052 value = chxj_encoding_parameter(r, value);
2053 value = chxj_add_cookie_parameter(r, value, chtml20->cookie);
2055 value = apr_psprintf(doc->buf.pool,
2058 (strchr(value, '?')) ? '&' : '?',
2059 CHXJ_COOKIE_NOUPDATE_PARAM);
2065 value = chxj_img_conv(r, spec, value);
2066 value = chxj_encoding_parameter(r, value);
2067 value = chxj_add_cookie_parameter(r, value, chtml20->cookie);
2069 value = apr_psprintf(doc->buf.pool,
2072 (strchr(value, '?')) ? '&' : '?',
2073 CHXJ_COOKIE_NOUPDATE_PARAM);
2084 if (strcasecmp(name, "align" ) == 0) {
2085 /*--------------------------------------------------------------------*/
2087 /*--------------------------------------------------------------------*/
2089 if (STRCASEEQ('t','T',"top", value) ||
2090 STRCASEEQ('m','M',"middle",value) ||
2091 STRCASEEQ('b','B',"bottom",value) ||
2092 STRCASEEQ('l','L',"left", value) ||
2093 STRCASEEQ('r','R',"right", value)) {
2098 else if (STRCASEEQ('c','C',"center", value)) {
2105 else if (strcasecmp(name, "alt" ) == 0 && value && *value) {
2106 /*--------------------------------------------------------------------*/
2108 /*--------------------------------------------------------------------*/
2117 if (strcasecmp(name, "width" ) == 0 && value && *value) {
2118 /*--------------------------------------------------------------------*/
2120 /*--------------------------------------------------------------------*/
2129 if (strcasecmp(name, "height") == 0 && value && *value) {
2130 /*--------------------------------------------------------------------*/
2132 /*--------------------------------------------------------------------*/
2137 else if (strcasecmp(name, "hspace") == 0 && value && *value) {
2138 /*--------------------------------------------------------------------*/
2140 /*--------------------------------------------------------------------*/
2149 if (strcasecmp(name, "vspace") == 0 && value && *value) {
2150 /*--------------------------------------------------------------------*/
2152 /*--------------------------------------------------------------------*/
2165 return chtml20->out;
2170 * It is a handler who processes the IMG tag.
2172 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2173 * destination is specified.
2174 * @param node [i] The IMG tag node is specified.
2175 * @return The conversion result is returned.
2178 s_chtml20_end_img_tag(void *pdoc, Node *UNUSED(child))
2180 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2182 return chtml20->out;
2187 * It is a handler who processes the SELECT tag.
2189 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2190 * destination is specified.
2191 * @param node [i] The SELECT tag node is specified.
2192 * @return The conversion result is returned.
2195 s_chtml20_start_select_tag(void *pdoc, Node *child)
2202 chtml20 = GET_CHTML20(pdoc);
2208 char *multiple = NULL;
2211 for (attr = qs_get_attr(doc,child);
2213 attr = qs_get_next_attr(doc,attr)) {
2214 char *nm = qs_get_attr_name(doc,attr);
2215 char *val = qs_get_attr_value(doc,attr);
2219 if (strcasecmp(nm, "size") == 0) {
2220 /*--------------------------------------------------------------------*/
2221 /* CHTML 1.0 version 2.0 */
2222 /*--------------------------------------------------------------------*/
2223 size = apr_pstrdup(doc->buf.pool, val);
2229 if (strcasecmp(nm, "name") == 0) {
2230 /*--------------------------------------------------------------------*/
2231 /* CHTML 1.0 version 2.0 */
2232 /*--------------------------------------------------------------------*/
2233 name = apr_pstrdup(doc->buf.pool, val);
2239 if (strcasecmp(nm, "multiple") == 0) {
2240 /*--------------------------------------------------------------------*/
2241 /* CHTML 1.0 version 2.0 */
2242 /*--------------------------------------------------------------------*/
2243 multiple = apr_pstrdup(doc->buf.pool, val);
2251 if (size && *size) {
2256 if (name && *name) {
2266 return chtml20->out;
2271 * It is a handler who processes the SELECT tag.
2273 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2274 * destination is specified.
2275 * @param node [i] The SELECT tag node is specified.
2276 * @return The conversion result is returned.
2279 s_chtml20_end_select_tag(void *pdoc, Node *UNUSED(child))
2284 chtml20 = GET_CHTML20(pdoc);
2289 return chtml20->out;
2294 * It is a handler who processes the OPTION tag.
2296 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2297 * destination is specified.
2298 * @param node [i] The OPTION tag node is specified.
2299 * @return The conversion result is returned.
2302 s_chtml20_start_option_tag(void *pdoc, Node *child)
2309 chtml20 = GET_CHTML20(pdoc);
2313 char *selected = NULL;
2317 for (attr = qs_get_attr(doc,child);
2319 attr = qs_get_next_attr(doc,attr)) {
2320 char *nm = qs_get_attr_name(doc,attr);
2321 char *val = qs_get_attr_value(doc,attr);
2325 if (strcasecmp(nm, "selected") == 0) {
2326 /*--------------------------------------------------------------------*/
2327 /* CHTML 1.0 version 2.0 */
2328 /*--------------------------------------------------------------------*/
2329 selected = apr_pstrdup(doc->buf.pool, val);
2335 if (strcasecmp(nm, "value") == 0) {
2336 /*--------------------------------------------------------------------*/
2337 /* CHTML 1.0 version 2.0 */
2338 /*--------------------------------------------------------------------*/
2339 value = apr_pstrdup(doc->buf.pool, val);
2348 if (value && *value) {
2358 return chtml20->out;
2363 * It is a handler who processes the OPTION tag.
2365 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2366 * destination is specified.
2367 * @param node [i] The OPTION tag node is specified.
2368 * @return The conversion result is returned.
2371 s_chtml20_end_option_tag(void *pdoc, Node *UNUSED(child))
2373 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2377 return chtml20->out;
2382 * It is a handler who processes the DIV tag.
2384 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2385 * destination is specified.
2386 * @param node [i] The DIV tag node is specified.
2387 * @return The conversion result is returned.
2390 s_chtml20_start_div_tag(void *pdoc, Node *child)
2397 chtml20 = GET_CHTML20(pdoc);
2405 for (attr = qs_get_attr(doc,child);
2407 attr = qs_get_next_attr(doc,attr)) {
2408 char *nm = qs_get_attr_name(doc,attr);
2409 char *val = qs_get_attr_value(doc,attr);
2410 if (STRCASEEQ('a','A', "align", nm)) {
2411 /*----------------------------------------------------------------------*/
2412 /* CHTML 1.0 (W3C version 3.2) */
2413 /*----------------------------------------------------------------------*/
2414 if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
2415 align = apr_pstrdup(doc->buf.pool, val);
2425 return chtml20->out;
2430 * It is a handler who processes the DIV tag.
2432 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2433 * destination is specified.
2434 * @param node [i] The DIV tag node is specified.
2435 * @return The conversion result is returned.
2438 s_chtml20_end_div_tag(void *pdoc, Node *UNUSED(child))
2440 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2441 Doc *doc = chtml20->doc;
2445 return chtml20->out;
2450 * It is a handler who processes the H1 tag.
2452 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2453 * destination is specified.
2454 * @param node [i] The H1 tag node is specified.
2455 * @return The conversion result is returned.
2458 s_chtml20_start_h1_tag(void *pdoc, Node *node)
2465 chtml20 = GET_CHTML20(pdoc);
2470 for (attr = qs_get_attr(doc,node);
2472 attr = qs_get_next_attr(doc,attr)) {
2473 char *name = qs_get_attr_name(doc,attr);
2474 char *value = qs_get_attr_value(doc,attr);
2475 if (STRCASEEQ('a','A',"align", name)) {
2476 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2485 return chtml20->out;
2490 * It is a handler who processes the H1 tag.
2492 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2493 * destination is specified.
2494 * @param node [i] The H1 tag node is specified.
2495 * @return The conversion result is returned.
2498 s_chtml20_end_h1_tag(void *pdoc, Node *UNUSED(child))
2503 chtml20 = GET_CHTML20(pdoc);
2508 return chtml20->out;
2513 * It is a handler who processes the H2 tag.
2515 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2516 * destination is specified.
2517 * @param node [i] The H2 tag node is specified.
2518 * @return The conversion result is returned.
2521 s_chtml20_start_h2_tag(void *pdoc, Node *node)
2528 chtml20 = GET_CHTML20(pdoc);
2533 for (attr = qs_get_attr(doc,node);
2535 attr = qs_get_next_attr(doc,attr)) {
2536 char *name = qs_get_attr_name(doc,attr);
2537 char *value = qs_get_attr_value(doc,attr);
2538 if (STRCASEEQ('a','A',"align", name)) {
2539 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2548 return chtml20->out;
2553 * It is a handler who processes the H2 tag.
2555 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2556 * destination is specified.
2557 * @param node [i] The H2 tag node is specified.
2558 * @return The conversion result is returned.
2561 s_chtml20_end_h2_tag(void *pdoc, Node *UNUSED(child))
2563 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2564 Doc *doc = chtml20->doc;
2569 return chtml20->out;
2574 * It is a handler who processes the H3 tag.
2576 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2577 * destination is specified.
2578 * @param node [i] The H3 tag node is specified.
2579 * @return The conversion result is returned.
2582 s_chtml20_start_h3_tag(void *pdoc, Node *node)
2589 chtml20 = GET_CHTML20(pdoc);
2594 for (attr = qs_get_attr(doc,node);
2596 attr = qs_get_next_attr(doc,attr)) {
2597 char *name = qs_get_attr_name(doc,attr);
2598 char *value = qs_get_attr_value(doc,attr);
2599 if (STRCASEEQ('a','A',"align", name)) {
2600 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2609 return chtml20->out;
2614 * It is a handler who processes the H3 tag.
2616 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2617 * destination is specified.
2618 * @param node [i] The H3 tag node is specified.
2619 * @return The conversion result is returned.
2622 s_chtml20_end_h3_tag(void *pdoc, Node *UNUSED(child))
2624 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2625 Doc *doc = chtml20->doc;
2629 return chtml20->out;
2634 * It is a handler who processes the H4 tag.
2636 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2637 * destination is specified.
2638 * @param node [i] The H4 tag node is specified.
2639 * @return The conversion result is returned.
2642 s_chtml20_start_h4_tag(void *pdoc, Node *node)
2649 chtml20 = GET_CHTML20(pdoc);
2654 for (attr = qs_get_attr(doc,node);
2656 attr = qs_get_next_attr(doc,attr)) {
2657 char *name = qs_get_attr_name(doc,attr);
2658 char *value = qs_get_attr_value(doc,attr);
2659 if (STRCASEEQ('a','A',"align", name)) {
2660 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2669 return chtml20->out;
2674 * It is a handler who processes the H4 tag.
2676 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2677 * destination is specified.
2678 * @param node [i] The H4 tag node is specified.
2679 * @return The conversion result is returned.
2682 s_chtml20_end_h4_tag(void *pdoc, Node *UNUSED(child))
2684 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2685 Doc *doc = chtml20->doc;
2689 return chtml20->out;
2694 * It is a handler who processes the H5 tag.
2696 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2697 * destination is specified.
2698 * @param node [i] The H5 tag node is specified.
2699 * @return The conversion result is returned.
2702 s_chtml20_start_h5_tag(void *pdoc, Node *node)
2709 chtml20 = GET_CHTML20(pdoc);
2714 for (attr = qs_get_attr(doc,node);
2716 attr = qs_get_next_attr(doc,attr)) {
2717 char *name = qs_get_attr_name(doc,attr);
2718 char *value = qs_get_attr_value(doc,attr);
2719 if (STRCASEEQ('a','A',"align", name)) {
2720 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2729 return chtml20->out;
2734 * It is a handler who processes the H5 tag.
2736 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2737 * destination is specified.
2738 * @param node [i] The H5 tag node is specified.
2739 * @return The conversion result is returned.
2742 s_chtml20_end_h5_tag(void *pdoc, Node *UNUSED(child))
2744 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2745 Doc *doc = chtml20->doc;
2749 return chtml20->out;
2754 * It is a handler who processes the H6 tag.
2756 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2757 * destination is specified.
2758 * @param node [i] The H6 tag node is specified.
2759 * @return The conversion result is returned.
2762 s_chtml20_start_h6_tag(void *pdoc, Node *node)
2769 chtml20 = GET_CHTML20(pdoc);
2774 for (attr = qs_get_attr(doc,node);
2776 attr = qs_get_next_attr(doc,attr)) {
2777 char *name = qs_get_attr_name(doc,attr);
2778 char *value = qs_get_attr_value(doc,attr);
2779 if (STRCASEEQ('a','A',"align", name)) {
2780 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2789 return chtml20->out;
2794 * It is a handler who processes the H6 tag.
2796 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2797 * destination is specified.
2798 * @param node [i] The H6 tag node is specified.
2799 * @return The conversion result is returned.
2802 s_chtml20_end_h6_tag(void *pdoc, Node *UNUSED(child))
2804 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2805 Doc *doc = chtml20->doc;
2809 return chtml20->out;
2814 * It is a handler who processes the PRE tag.
2816 * @param pdoc [i/o] The pointer to the XHTML structure at the output
2817 * destination is specified.
2818 * @param node [i] The PRE tag node is specified.
2819 * @return The conversion result is returned.
2822 s_chtml20_start_pre_tag(void *pdoc, Node *UNUSED(node))
2824 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2825 Doc *doc = chtml20->doc;
2827 chtml20->pre_flag++;
2830 return chtml20->out;
2835 * It is a handler who processes the PRE tag.
2837 * @param pdoc [i/o] The pointer to the XHTML structure at the output
2838 * destination is specified.
2839 * @param node [i] The PRE tag node is specified.
2840 * @return The conversion result is returned.
2843 s_chtml20_end_pre_tag(void *pdoc, Node *UNUSED(child))
2845 chtml20_t *chtml20 = GET_CHTML20(pdoc);
2846 Doc *doc = chtml20->doc;
2850 chtml20->pre_flag--;
2852 return chtml20->out;
2857 * It is a handler who processes the P tag.
2859 * @param pdoc [i/o] The pointer to the XHTML structure at the output
2860 * destination is specified.
2861 * @param node [i] The P tag node is specified.
2862 * @return The conversion result is returned.
2865 s_chtml20_start_p_tag(void *pdoc, Node *node)
2873 chtml20 = GET_CHTML20(pdoc);
2878 for (attr = qs_get_attr(doc,node);
2880 attr = qs_get_next_attr(doc,attr)) {
2881 char *nm = qs_get_attr_name(doc,attr);
2882 char *val = qs_get_attr_value(doc,attr);
2883 if (STRCASEEQ('a','A',"align", nm)) {
2884 /*----------------------------------------------------------------------*/
2885 /* CHTML 1.0 (W3C version 3.2) */
2886 /*----------------------------------------------------------------------*/
2887 if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
2888 align = apr_pstrdup(doc->buf.pool, val);
2900 return chtml20->out;
2905 * It is a handler who processes the P tag.
2907 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2908 * destination is specified.
2909 * @param node [i] The P tag node is specified.
2910 * @return The conversion result is returned.
2913 s_chtml20_end_p_tag(void *pdoc, Node *UNUSED(child))
2919 chtml20 = GET_CHTML20(pdoc);
2925 return chtml20->out;
2930 s_chtml20_chxjif_tag(void *pdoc, Node *node)
2937 chtml20 = GET_CHTML20(pdoc);
2941 for (child = qs_get_child_node(doc, node);
2943 child = qs_get_next_node(doc, child)) {
2946 s_chtml20_chxjif_tag(pdoc, child);
2954 * It is a handler who processes the TEXTARE tag.
2956 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2957 * destination is specified.
2958 * @param node [i] The TEXTAREA tag node is specified.
2959 * @return The conversion result is returned.
2962 s_chtml20_start_textarea_tag(void *pdoc, Node *node)
2969 chtml20 = GET_CHTML20(pdoc);
2973 chtml20->textarea_flag++;
2975 for (attr = qs_get_attr(doc,node);
2977 attr = qs_get_next_attr(doc,attr)) {
2978 char *name = qs_get_attr_name(doc,attr);
2979 char *value = qs_get_attr_value(doc,attr);
2983 if (strcasecmp(name, "accesskey") == 0 && value && *value != 0) {
2984 W_L(" accesskey=\"");
2992 if (strcasecmp(name, "name") == 0 && value && *value != 0) {
3001 if (strcasecmp(name, "rows") == 0 && value && *value != 0) {
3010 if (strcasecmp(name, "cols") == 0 && value && *value != 0) {
3019 if (strcasecmp(name, "istyle") == 0 && value && (*value == '1' || *value == '2' || *value == '3' || *value == '4')) {
3032 return chtml20->out;
3037 * It is a handler who processes the TEXTAREA tag.
3039 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3040 * destination is specified.
3041 * @param node [i] The TEXTAREA tag node is specified.
3042 * @return The conversion result is returned.
3045 s_chtml20_end_textarea_tag(void *pdoc, Node *UNUSED(child))
3047 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3048 Doc *doc = chtml20->doc;
3052 chtml20->textarea_flag--;
3054 return chtml20->out;
3059 s_chtml20_text_tag(void *pdoc, Node *child)
3071 chtml20 = GET_CHTML20(pdoc);
3075 textval = qs_get_node_value(doc,child);
3076 if (strlen(textval) == 0) {
3077 return chtml20->out;
3080 tmp = apr_palloc(r->pool, qs_get_node_size(doc,child)+1);
3081 memset(tmp, 0, qs_get_node_size(doc,child)+1);
3083 tdst = qs_alloc_zero_byte_string(r);
3084 memset(one_byte, 0, sizeof(one_byte));
3087 for (ii=0; ii<qs_get_node_size(doc,child); ii++) {
3089 int rtn = s_chtml20_search_emoji(chtml20, &textval[ii], &out);
3091 tdst = qs_out_apr_pstrcat(r, tdst, out, &tdst_len);
3095 if (is_sjis_kanji(textval[ii])) {
3096 one_byte[0] = textval[ii+0];
3097 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
3098 one_byte[0] = textval[ii+1];
3099 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
3103 if (chtml20->pre_flag) {
3104 one_byte[0] = textval[ii+0];
3105 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
3108 if (chtml20->textarea_flag) {
3109 one_byte[0] = textval[ii+0];
3110 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
3113 if (textval[ii] != '\r' && textval[ii] != '\n') {
3114 one_byte[0] = textval[ii+0];
3115 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
3119 return chtml20->out;
3124 * It is a handler who processes the BLOCKQUOTE tag.
3126 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3127 * destination is specified.
3128 * @param node [i] The BLOCKQUOTE tag node is specified.
3129 * @return The conversion result is returned.
3132 s_chtml20_start_blockquote_tag(void *pdoc, Node *UNUSED(child))
3134 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3135 Doc *doc = chtml20->doc;
3136 W_L("<blockquote>");
3138 return chtml20->out;
3143 * It is a handler who processes the BLOCKQUOTE tag.
3145 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3146 * destination is specified.
3147 * @param node [i] The BLOCKQUOTE tag node is specified.
3148 * @return The conversion result is returned.
3151 s_chtml20_end_blockquote_tag(void *pdoc, Node *UNUSED(child))
3153 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3154 Doc *doc = chtml20->doc;
3155 W_L("</blockquote>");
3157 return chtml20->out;
3162 * It is a handler who processes the DIR tag.
3164 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3165 * destination is specified.
3166 * @param node [i] The DIR tag node is specified.
3167 * @return The conversion result is returned.
3170 s_chtml20_start_dir_tag(void *pdoc, Node *UNUSED(child))
3172 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3173 Doc *doc = chtml20->doc;
3176 return chtml20->out;
3181 * It is a handler who processes the DIR tag.
3183 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3184 * destination is specified.
3185 * @param node [i] The DIR tag node is specified.
3186 * @return The conversion result is returned.
3189 s_chtml20_end_dir_tag(void *pdoc, Node *UNUSED(child))
3191 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3192 Doc *doc = chtml20->doc;
3196 return chtml20->out;
3201 * It is a handler who processes the DL tag.
3203 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3204 * destination is specified.
3205 * @param node [i] The DL tag node is specified.
3206 * @return The conversion result is returned.
3209 s_chtml20_start_dl_tag(void *pdoc, Node *UNUSED(child))
3211 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3212 Doc *doc = chtml20->doc;
3215 return chtml20->out;
3220 * It is a handler who processes the DL tag.
3222 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3223 * destination is specified.
3224 * @param node [i] The DL tag node is specified.
3225 * @return The conversion result is returned.
3228 s_chtml20_end_dl_tag(void *pdoc, Node *UNUSED(child))
3230 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3231 Doc *doc = chtml20->doc;
3234 return chtml20->out;
3239 * It is a handter who processes the DT tag.
3241 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3242 * destination is specified.
3243 * @param node [i] The DT tag node is specified.
3244 * @return The conversion result is returned.
3247 s_chtml20_start_dt_tag(void *pdoc, Node *UNUSED(child))
3249 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3250 Doc *doc = chtml20->doc;
3252 return chtml20->out;
3257 * It is a handter who processes the DT tag.
3259 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3260 * destination is specified.
3261 * @param node [i] The DT tag node is specified.
3262 * @return The conversion result is returned.
3265 s_chtml20_end_dt_tag(void *pdoc, Node *UNUSED(child))
3267 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3269 return chtml20->out;
3274 * It is a handder who processes the DD tag.
3276 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3277 * destination is specified.
3278 * @param node [i] The DD tag node is specified.
3279 * @return The conversion result is returned.
3282 s_chtml20_start_dd_tag(void *pdoc, Node *UNUSED(child))
3284 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3285 Doc *doc = chtml20->doc;
3287 return chtml20->out;
3292 * It is a handder who processes the DD tag.
3294 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3295 * destination is specified.
3296 * @param node [i] The DD tag node is specified.
3297 * @return The conversion result is returned.
3300 s_chtml20_end_dd_tag(void *pdoc, Node *UNUSED(child))
3302 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3304 return chtml20->out;
3309 * It is a hanmenuer who processes the MENU tag.
3311 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3312 * destination is specified.
3313 * @param node [i] The MENU tag node is specified.
3314 * @return The conversion result is returned.
3317 s_chtml20_start_menu_tag(void *pdoc, Node *UNUSED(child))
3319 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3320 Doc *doc = chtml20->doc;
3324 return chtml20->out;
3329 * It is a hanmenuer who processes the MENU tag.
3331 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3332 * destination is specified.
3333 * @param node [i] The MENU tag node is specified.
3334 * @return The conversion result is returned.
3337 s_chtml20_end_menu_tag(void *pdoc, Node *UNUSED(child))
3339 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3340 Doc *doc = chtml20->doc;
3344 return chtml20->out;
3349 * It is a hanplaintexter who processes the PLAINTEXT tag.
3351 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3352 * destination is specified.
3353 * @param node [i] The PLAINTEXT tag node is specified.
3354 * @return The conversion result is returned.
3357 s_chtml20_start_plaintext_tag(void *pdoc, Node *node)
3359 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3360 Doc *doc = chtml20->doc;
3363 s_chtml20_start_plaintext_tag_inner(pdoc,node);
3364 return chtml20->out;
3368 s_chtml20_start_plaintext_tag_inner(void *pdoc, Node *node)
3370 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3371 Doc *doc = chtml20->doc;
3374 for (child = qs_get_child_node(doc, node);
3376 child = qs_get_next_node(doc, child)) {
3378 s_chtml20_start_plaintext_tag_inner(pdoc, child);
3380 return chtml20->out;
3385 * It is a hanplaintexter who processes the PLAINTEXT tag.
3387 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3388 * destination is specified.
3389 * @param node [i] The PLAINTEXT tag node is specified.
3390 * @return The conversion result is returned.
3393 s_chtml20_end_plaintext_tag(void *pdoc, Node *UNUSED(child))
3395 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3396 return chtml20->out;
3400 * It is a hanblinker who processes the BLINK tag.
3402 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3403 * destination is specified.
3404 * @param node [i] The BLINK tag node is specified.
3405 * @return The conversion result is returned.
3408 s_chtml20_start_blink_tag(void *pdoc, Node *UNUSED(child))
3410 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3411 Doc *doc = chtml20->doc;
3413 return chtml20->out;
3418 * It is a hanblinker who processes the BLINK tag.
3420 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3421 * destination is specified.
3422 * @param node [i] The BLINK tag node is specified.
3423 * @return The conversion result is returned.
3426 s_chtml20_end_blink_tag(void *pdoc, Node *UNUSED(child))
3428 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3429 Doc *doc = chtml20->doc;
3432 return chtml20->out;
3437 * It is a hanmarqueeer who processes the MARQUEE tag.
3439 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3440 * destination is specified.
3441 * @param node [i] The MARQUEE tag node is specified.
3442 * @return The conversion result is returned.
3445 s_chtml20_start_marquee_tag(void *pdoc, Node *node)
3447 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3448 Doc *doc = chtml20->doc;
3451 /*--------------------------------------------------------------------------*/
3452 /* Get Attributes */
3453 /*--------------------------------------------------------------------------*/
3454 for (attr = qs_get_attr(doc,node);
3456 attr = qs_get_next_attr(doc,attr)) {
3457 char *name = qs_get_attr_name(doc,attr);
3458 char *value = qs_get_attr_value(doc,attr);
3459 if (STRCASEEQ('d','D',"direction", name)) {
3460 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value))) {
3461 W_L(" direction=\"");
3466 else if (STRCASEEQ('b','B',"behavior",name)) {
3467 if (value && (STRCASEEQ('s','S',"scroll",value) || STRCASEEQ('s','S',"slide",value) || STRCASEEQ('a','A',"alternate",value))) {
3468 W_L(" behavior=\"");
3473 else if (STRCASEEQ('l','L',"loop",name)) {
3474 if (value && *value) {
3482 return chtml20->out;
3487 * It is a hanmarqueeer who processes the MARQUEE tag.
3489 * @param pdoc [i/o] The pointer to the CHTML structure at the output
3490 * destination is specified.
3491 * @param node [i] The MARQUEE tag node is specified.
3492 * @return The conversion result is returned.
3495 s_chtml20_end_marquee_tag(void *pdoc, Node *UNUSED(child))
3497 chtml20_t *chtml20 = GET_CHTML20(pdoc);
3498 Doc *doc = chtml20->doc;
3501 return chtml20->out;