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_jhtml.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_encoding.h"
23 #include "chxj_url_encode.h"
24 #include "chxj_str_util.h"
27 #define GET_JHTML(X) ((jhtml_t *)(X))
30 #define W_L(X) do { jhtml->out = BUFFERED_WRITE_LITERAL(jhtml->out, &doc->buf, (X)); } while(0)
31 #define W_V(X) do { jhtml->out = (X) ? BUFFERED_WRITE_VALUE(jhtml->out, &doc->buf, (X)) \
32 : BUFFERED_WRITE_LITERAL(jhtml->out, &doc->buf, ""); } while(0)
34 #define W_NLCODE() do { char *nlcode = TO_NLCODE(jhtml->conf); W_V(nlcode); } while (0)
36 static char *s_jhtml_start_html_tag (void *pdoc, Node *node);
37 static char *s_jhtml_end_html_tag (void *pdoc, Node *node);
38 static char *s_jhtml_start_meta_tag (void *pdoc, Node *node);
39 static char *s_jhtml_end_meta_tag (void *pdoc, Node *node);
40 static char *s_jhtml_start_head_tag (void *pdoc, Node *node);
41 static char *s_jhtml_end_head_tag (void *pdoc, Node *node);
42 static char *s_jhtml_start_title_tag (void *pdoc, Node *node);
43 static char *s_jhtml_end_title_tag (void *pdoc, Node *node);
44 static char *s_jhtml_start_base_tag (void *pdoc, Node *node);
45 static char *s_jhtml_end_base_tag (void *pdoc, Node *node);
46 static char *s_jhtml_start_body_tag (void *pdoc, Node *node);
47 static char *s_jhtml_end_body_tag (void *pdoc, Node *node);
48 static char *s_jhtml_start_a_tag (void *pdoc, Node *node);
49 static char *s_jhtml_end_a_tag (void *pdoc, Node *node);
50 static char *s_jhtml_start_pre_tag (void *pdoc, Node *node);
51 static char *s_jhtml_end_pre_tag (void *pdoc, Node *node);
52 static char *s_jhtml_start_p_tag (void *pdoc, Node *node);
53 static char *s_jhtml_end_p_tag (void *pdoc, Node *node);
54 static char *s_jhtml_start_ul_tag (void *pdoc, Node *node);
55 static char *s_jhtml_end_ul_tag (void *pdoc, Node *node);
56 static char *s_jhtml_start_ol_tag (void *pdoc, Node *node);
57 static char *s_jhtml_end_ol_tag (void *pdoc, Node *node);
58 static char *s_jhtml_start_li_tag (void *pdoc, Node *node);
59 static char *s_jhtml_end_li_tag (void *pdoc, Node *node);
60 static char *s_jhtml_start_br_tag (void *pdoc, Node *node);
61 static char *s_jhtml_end_br_tag (void *pdoc, Node *node);
62 static char *s_jhtml_start_tr_tag (void *pdoc, Node *node);
63 static char *s_jhtml_end_tr_tag (void *pdoc, Node *node);
64 static char *s_jhtml_start_font_tag (void *pdoc, Node *node);
65 static char *s_jhtml_end_font_tag (void *pdoc, Node *node);
66 static char *s_jhtml_start_form_tag (void *pdoc, Node *node);
67 static char *s_jhtml_end_form_tag (void *pdoc, Node *node);
68 static char *s_jhtml_start_input_tag (void *pdoc, Node *node);
69 static char *s_jhtml_end_input_tag (void *pdoc, Node *node);
70 static char *s_jhtml_start_center_tag (void *pdoc, Node *node);
71 static char *s_jhtml_end_center_tag (void *pdoc, Node *node);
72 static char *s_jhtml_start_hr_tag (void *pdoc, Node *node);
73 static char *s_jhtml_end_hr_tag (void *pdoc, Node *node);
74 static char *s_jhtml_start_img_tag (void *pdoc, Node *node);
75 static char *s_jhtml_end_img_tag (void *pdoc, Node *node);
76 static char *s_jhtml_start_select_tag (void *pdoc, Node *node);
77 static char *s_jhtml_end_select_tag (void *pdoc, Node *node);
78 static char *s_jhtml_start_option_tag (void *pdoc, Node *node);
79 static char *s_jhtml_end_option_tag (void *pdoc, Node *node);
80 static char *s_jhtml_start_div_tag (void *pdoc, Node *node);
81 static char *s_jhtml_end_div_tag (void *pdoc, Node *node);
82 static char *s_jhtml_start_textarea_tag (void *pdoc, Node *node);
83 static char *s_jhtml_end_textarea_tag (void *pdoc, Node *node);
84 static char *s_jhtml_start_b_tag (void *pdoc, Node *node);
85 static char *s_jhtml_end_b_tag (void *pdoc, Node *node);
86 static char *s_jhtml_chxjif_tag (void *pdoc, Node *node);
87 static char *s_jhtml_text_tag (void *pdoc, Node *node);
88 static char *s_jhtml_start_blockquote_tag(void *pdoc, Node *node);
89 static char *s_jhtml_end_blockquote_tag (void *pdoc, Node *node);
90 static char *s_jhtml_start_dir_tag (void *pdoc, Node *node);
91 static char *s_jhtml_end_dir_tag (void *pdoc, Node *node);
92 static char *s_jhtml_start_dl_tag (void *pdoc, Node *node);
93 static char *s_jhtml_end_dl_tag (void *pdoc, Node *node);
94 static char *s_jhtml_start_dt_tag (void *pdoc, Node *node);
95 static char *s_jhtml_end_dt_tag (void *pdoc, Node *node);
96 static char *s_jhtml_start_dd_tag (void *pdoc, Node *node);
97 static char *s_jhtml_end_dd_tag (void *pdoc, Node *node);
98 static char *s_jhtml_start_h1_tag (void *pdoc, Node *node);
99 static char *s_jhtml_end_h1_tag (void *pdoc, Node *node);
100 static char *s_jhtml_start_h2_tag (void *pdoc, Node *node);
101 static char *s_jhtml_end_h2_tag (void *pdoc, Node *node);
102 static char *s_jhtml_start_h3_tag (void *pdoc, Node *node);
103 static char *s_jhtml_end_h3_tag (void *pdoc, Node *node);
104 static char *s_jhtml_start_h4_tag (void *pdoc, Node *node);
105 static char *s_jhtml_end_h4_tag (void *pdoc, Node *node);
106 static char *s_jhtml_start_h5_tag (void *pdoc, Node *node);
107 static char *s_jhtml_end_h5_tag (void *pdoc, Node *node);
108 static char *s_jhtml_start_h6_tag (void *pdoc, Node *node);
109 static char *s_jhtml_end_h6_tag (void *pdoc, Node *node);
110 static char *s_jhtml_start_menu_tag (void *pdoc, Node *node);
111 static char *s_jhtml_end_menu_tag (void *pdoc, Node *node);
112 static char *s_jhtml_start_plaintext_tag (void *pdoc, Node *node);
113 static char *s_jhtml_start_plaintext_tag_inner (void *pdoc, Node *node);
114 static char *s_jhtml_end_plaintext_tag (void *pdoc, Node *node);
115 static char *s_jhtml_start_blink_tag (void *pdoc, Node *node);
116 static char *s_jhtml_end_blink_tag (void *pdoc, Node *node);
117 static char *s_jhtml_start_marquee_tag(void *pdoc, Node *node);
118 static char *s_jhtml_end_marquee_tag (void *pdoc, Node *node);
119 static char *s_jhtml_newline_mark (void *pdoc, Node *node);
121 static void s_init_jhtml(jhtml_t *jhtml, Doc *doc, request_rec *r, device_table *spec);
123 static int s_jhtml_search_emoji(jhtml_t *jhtml, char *txt, char **rslt);
125 static char *chxj_istyle_to_mode(apr_pool_t *p, const char *s);
129 tag_handler jhtml_handler[] = {
132 s_jhtml_start_html_tag,
133 s_jhtml_end_html_tag,
137 s_jhtml_start_meta_tag,
138 s_jhtml_end_meta_tag,
142 s_jhtml_start_textarea_tag,
143 s_jhtml_end_textarea_tag,
152 s_jhtml_start_pre_tag,
157 s_jhtml_start_ul_tag,
162 s_jhtml_start_li_tag,
167 s_jhtml_start_ol_tag,
172 s_jhtml_start_h1_tag,
177 s_jhtml_start_h2_tag,
182 s_jhtml_start_h3_tag,
187 s_jhtml_start_h4_tag,
192 s_jhtml_start_h5_tag,
197 s_jhtml_start_h6_tag,
202 s_jhtml_start_head_tag,
203 s_jhtml_end_head_tag,
207 s_jhtml_start_title_tag,
208 s_jhtml_end_title_tag,
212 s_jhtml_start_base_tag,
213 s_jhtml_end_base_tag,
217 s_jhtml_start_body_tag,
218 s_jhtml_end_body_tag,
227 s_jhtml_start_br_tag,
237 s_jhtml_start_tr_tag,
252 s_jhtml_start_font_tag,
253 s_jhtml_end_font_tag,
257 s_jhtml_start_form_tag,
258 s_jhtml_end_form_tag,
262 s_jhtml_start_input_tag,
263 s_jhtml_end_input_tag,
267 s_jhtml_start_center_tag,
268 s_jhtml_end_center_tag,
272 s_jhtml_start_hr_tag,
277 s_jhtml_start_img_tag,
282 s_jhtml_start_select_tag,
283 s_jhtml_end_select_tag,
287 s_jhtml_start_option_tag,
288 s_jhtml_end_option_tag,
292 s_jhtml_start_div_tag,
342 s_jhtml_start_dt_tag,
357 s_jhtml_start_blockquote_tag,
358 s_jhtml_end_blockquote_tag,
362 s_jhtml_start_dir_tag,
367 s_jhtml_start_dl_tag,
372 s_jhtml_start_dd_tag,
377 s_jhtml_start_menu_tag,
378 s_jhtml_end_menu_tag,
382 s_jhtml_start_plaintext_tag,
383 s_jhtml_end_plaintext_tag,
387 s_jhtml_start_blink_tag,
388 s_jhtml_end_blink_tag,
392 s_jhtml_start_marquee_tag,
393 s_jhtml_end_marquee_tag,
397 s_jhtml_newline_mark,
404 * converts from CHTML5.0 to JHTML.
406 * @param r [i] Requet_rec is appointed.
407 * @param spec [i] The result of the device specification processing which
408 * was done in advance is appointed.
409 * @param src [i] The character string before the converting is appointed.
410 * @return The character string after the converting is returned.
419 chxjconvrule_entry *entryp,
430 /*--------------------------------------------------------------------------*/
432 /*--------------------------------------------------------------------------*/
434 dst = chxj_qr_code_blob_handler(r, src, (size_t*)dstlen);
436 DBG(r,"I found qrcode xml");
439 DBG(r,"not found qrcode xml");
441 /*--------------------------------------------------------------------------*/
442 /* The CHTML structure is initialized. */
443 /*--------------------------------------------------------------------------*/
444 s_init_jhtml(&jhtml, &doc, r, spec);
446 jhtml.entryp = entryp;
447 jhtml.cookie = cookie;
449 chxj_set_content_type(r, "text/html; charset=Windows-31J");
451 /*--------------------------------------------------------------------------*/
452 /* The character string of the input is analyzed. */
453 /*--------------------------------------------------------------------------*/
454 qs_init_malloc(&doc);
455 qs_init_root_node(&doc);
457 ss = apr_pcalloc(r->pool, srclen + 1);
459 memset(ss, 0, srclen + 1);
460 memcpy(ss, src, srclen);
463 chxj_dump_out("[src] CHTML -> JHTML", ss, srclen);
466 qs_parse_string(&doc,ss,strlen(ss));
468 chxj_buffered_write_init(r->pool, &doc.buf);
469 /*--------------------------------------------------------------------------*/
470 /* It converts it from CHTML to JHTML. */
471 /*--------------------------------------------------------------------------*/
472 chxj_node_convert(spec,r,(void*)&jhtml, &doc, qs_get_root(&doc), 0);
473 jhtml.out = chxj_buffered_write_flush(jhtml.out, &doc.buf);
474 dst = apr_pstrdup(r->pool, jhtml.out);
475 chxj_buffered_write_terminate(&doc.buf);
478 qs_all_free(&doc,QX_LOGMARK);
481 return apr_pstrdup(r->pool,ss);
484 dst = apr_psprintf(r->pool, "\n");
486 *dstlen = strlen(dst);
489 chxj_dump_out("[dst] CHTML -> JHTML", dst, *dstlen);
497 * The CHTML structure is initialized.
499 * @param jhtml [i/o] The pointer to the JHTML structure that wants to be
500 * initialized is specified.
501 * @param doc [i] The Doc structure that should be set to the initialized
502 * JHTML structure is specified.
503 * @param r [i] To use POOL, the pointer to request_rec is specified.
504 * @param spec [i] The pointer to the device_table
507 s_init_jhtml(jhtml_t *jhtml, Doc *doc, request_rec *r, device_table *spec)
509 memset(doc, 0, sizeof(Doc));
510 memset(jhtml, 0, sizeof(jhtml_t));
515 jhtml->out = qs_alloc_zero_byte_string(r->pool);
516 jhtml->conf = chxj_get_module_config(r->per_dir_config, &chxj_module);
517 jhtml->doc->parse_mode = PARSE_MODE_CHTML;
522 * Corresponding EMOJI to a current character-code is retrieved.
523 * The substitution character string is stored in the rslt pointer if agreeing.
525 * @param jhtml [i] The pointer to the CHTML structure is specified.
526 * @param txt [i] The character string to want to examine whether it is
527 * EMOJI is specified.
528 * @param rslt [o] The pointer to the pointer that stores the result is
530 * @return When corresponding EMOJI exists, it returns it excluding 0.
533 s_jhtml_search_emoji(jhtml_t *jhtml, char *txt, char **rslt)
545 if (! spec) DBG(r,"spec is NULL");
547 for (ee = jhtml->conf->emoji;
551 unsigned char hex1byte;
552 unsigned char hex2byte;
555 DBG(r,"emoji->imode is NULL");
559 hex1byte = ee->imode->hex1byte & 0xff;
560 hex2byte = ee->imode->hex2byte & 0xff;
562 if (ee->imode->string
563 && strlen(ee->imode->string) > 0
564 && strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
565 if (spec == NULL || spec->emoji_type == NULL) {
566 *rslt = apr_psprintf(r->pool,"
\e%s
\ f", ee->jphone->string);
567 return strlen(ee->imode->string);
574 && ((unsigned char)txt[0] & 0xff) == ((unsigned char)hex1byte)
575 && ((unsigned char)txt[1] & 0xff) == ((unsigned char)hex2byte)) {
576 if (spec == NULL || spec->emoji_type == NULL) {
577 *rslt = apr_psprintf(r->pool,"
\e%s
\ f", ee->jphone->string);
590 * It is a handler who processes the HTML tag.
592 * @param pdoc [i/o] The pointer to the CHTML structure at the output
593 * destination is specified.
594 * @param node [i] The HTML tag node is specified.
595 * @return The conversion result is returned.
598 s_jhtml_start_html_tag(void *pdoc, Node *UNUSED(node))
605 jhtml = GET_JHTML(pdoc);
608 DBG(r, "start s_jhtml_start_html_tag()");
610 /*--------------------------------------------------------------------------*/
612 /*--------------------------------------------------------------------------*/
615 DBG(r, "end s_jhtml_start_html_tag()");
622 * It is a handler who processes the HTML tag.
624 * @param pdoc [i/o] The pointer to the CHTML structure at the output
625 * destination is specified.
626 * @param node [i] The HTML tag node is specified.
627 * @return The conversion result is returned.
630 s_jhtml_end_html_tag(void *pdoc, Node *UNUSED(child))
632 jhtml_t *jhtml = GET_JHTML(pdoc);
633 Doc *doc = jhtml->doc;
642 * It is a handler who processes the META tag.
644 * @param pdoc [i/o] The pointer to the CHTML structure at the output
645 * destination is specified.
646 * @param node [i] The META tag node is specified.
647 * @return The conversion result is returned.
650 s_jhtml_start_meta_tag(void *pdoc, Node *node)
656 int content_type_flag;
659 jhtml = GET_JHTML(pdoc);
663 content_type_flag = 0;
666 /*--------------------------------------------------------------------------*/
668 /*--------------------------------------------------------------------------*/
669 for (attr = qs_get_attr(doc,node);
671 attr = qs_get_next_attr(doc,attr)) {
672 char *name = qs_get_attr_name(doc,attr);
673 char *value = qs_get_attr_value(doc,attr);
677 if (strcasecmp(name, "http-equiv") == 0 && value && *value) {
678 /*----------------------------------------------------------------------*/
680 /*----------------------------------------------------------------------*/
681 W_L(" http-equiv=\"");
684 if (STRCASEEQ('c','C',"content-type",value)) {
685 content_type_flag = 1;
687 if (STRCASEEQ('r','R',"refresh",value)) {
695 if (strcasecmp(name, "content") == 0 && value && *value) {
696 /*----------------------------------------------------------------------*/
698 /*----------------------------------------------------------------------*/
699 if (content_type_flag) {
703 W_L("text/html; charset=Windows-31J");
712 buf = apr_pstrdup(r->pool, value);
714 url = strchr(buf, ';');
716 sec = apr_pstrdup(r->pool, buf);
719 url = chxj_encoding_parameter(r, url);
720 url = chxj_add_cookie_parameter(r, url, jhtml->cookie);
750 * It is a handler who processes the META tag.
752 * @param pdoc [i/o] The pointer to the CHTML structure at the output
753 * destination is specified.
754 * @param node [i] The META tag node is specified.
755 * @return The conversion result is returned.
758 s_jhtml_end_meta_tag(void *pdoc, Node *UNUSED(child))
760 jhtml_t *jhtml = GET_JHTML(pdoc);
767 * It is a handler who processes the HEAD tag.
769 * @param pdoc [i/o] The pointer to the CHTML structure at the output
770 * destination is specified.
771 * @param node [i] The HEAD tag node is specified.
772 * @return The conversion result is returned.
775 s_jhtml_start_head_tag(void *pdoc, Node *UNUSED(node))
781 jhtml = GET_JHTML(pdoc);
791 * It is a handler who processes the HEAD tag.
793 * @param pdoc [i/o] The pointer to the CHTML structure at the output
794 * destination is specified.
795 * @param node [i] The HEAD tag node is specified.
796 * @return The conversion result is returned.
799 s_jhtml_end_head_tag(void *pdoc, Node *UNUSED(child))
805 jhtml = GET_JHTML(pdoc);
815 * It is a handler who processes the TITLE tag.
817 * @param pdoc [i/o] The pointer to the CHTML structure at the output
818 * destination is specified.
819 * @param node [i] The TITLE tag node is specified.
820 * @return The conversion result is returned.
823 s_jhtml_start_title_tag(void *pdoc, Node *UNUSED(node))
829 jhtml = GET_JHTML(pdoc);
839 * It is a handler who processes the TITLE tag.
841 * @param pdoc [i/o] The pointer to the CHTML structure at the output
842 * destination is specified.
843 * @param node [i] The TITLE tag node is specified.
844 * @return The conversion result is returned.
847 s_jhtml_end_title_tag(void *pdoc, Node *UNUSED(child))
853 jhtml = GET_JHTML(pdoc);
863 * It is a handler who processes the BASE tag.
865 * @param pdoc [i/o] The pointer to the CHTML structure at the output
866 * destination is specified.
867 * @param node [i] The BASE tag node is specified.
868 * @return The conversion result is returned.
871 s_jhtml_start_base_tag(void *pdoc, Node *node)
878 jhtml = GET_JHTML(pdoc);
883 /*--------------------------------------------------------------------------*/
885 /*--------------------------------------------------------------------------*/
886 for (attr = qs_get_attr(doc,node);
888 attr = qs_get_next_attr(doc,attr)) {
889 char *name = qs_get_attr_name(doc,attr);
890 char *value = qs_get_attr_value(doc,attr);
891 if (STRCASEEQ('h','H',"href",name)) {
903 * It is a handler who processes the BASE tag.
905 * @param pdoc [i/o] The pointer to the CHTML structure at the output
906 * destination is specified.
907 * @param node [i] The BASE tag node is specified.
908 * @return The conversion result is returned.
911 s_jhtml_end_base_tag(void *pdoc, Node *UNUSED(child))
913 jhtml_t *jhtml = GET_JHTML(pdoc);
919 * It is a handler who processes the BODY tag.
921 * @param pdoc [i/o] The pointer to the CHTML structure at the output
922 * destination is specified.
923 * @param node [i] The BODY tag node is specified.
924 * @return The conversion result is returned.
927 s_jhtml_start_body_tag(void *pdoc, Node *node)
934 jhtml = GET_JHTML(pdoc);
939 /*--------------------------------------------------------------------------*/
941 /*--------------------------------------------------------------------------*/
942 for (attr = qs_get_attr(doc,node);
944 attr = qs_get_next_attr(doc,attr)) {
945 char *name = qs_get_attr_name(doc,attr);
946 char *value = qs_get_attr_value(doc,attr);
947 if (STRCASEEQ('b','B',"bgcolor",name) && value && *value) {
948 /*----------------------------------------------------------------------*/
950 /*----------------------------------------------------------------------*/
955 else if (STRCASEEQ('t','T',"text",name) && value && *value) {
956 /*----------------------------------------------------------------------*/
958 /*----------------------------------------------------------------------*/
963 else if (STRCASEEQ('l','L',"link",name) && value && *value) {
964 /*----------------------------------------------------------------------*/
966 /*----------------------------------------------------------------------*/
971 else if (STRCASEEQ('a','A',"alink",name)) {
972 /*----------------------------------------------------------------------*/
974 /*----------------------------------------------------------------------*/
977 else if (STRCASEEQ('v','V',"vlink",name)) {
978 /*----------------------------------------------------------------------*/
980 /*----------------------------------------------------------------------*/
990 * It is a handler who processes the BODY tag.
992 * @param pdoc [i/o] The pointer to the CHTML structure at the output
993 * destination is specified.
994 * @param node [i] The BODY tag node is specified.
995 * @return The conversion result is returned.
998 s_jhtml_end_body_tag(void *pdoc, Node *UNUSED(child))
1004 jhtml = GET_JHTML(pdoc);
1014 * It is a handler who processes the A tag.
1016 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1017 * destination is specified.
1018 * @param node [i] The A tag node is specified.
1019 * @return The conversion result is returned.
1022 s_jhtml_start_a_tag(void *pdoc, Node *node)
1029 jhtml = GET_JHTML(pdoc);
1034 /*--------------------------------------------------------------------------*/
1035 /* Get Attributes */
1036 /*--------------------------------------------------------------------------*/
1037 for (attr = qs_get_attr(doc,node);
1039 attr = qs_get_next_attr(doc,attr)) {
1040 char *name = qs_get_attr_name(doc,attr);
1041 char *value = qs_get_attr_value(doc,attr);
1042 if (STRCASEEQ('n','N',"name",name)) {
1043 /*----------------------------------------------------------------------*/
1045 /*----------------------------------------------------------------------*/
1050 else if (STRCASEEQ('h','H',"href",name)) {
1051 /*----------------------------------------------------------------------*/
1053 /*----------------------------------------------------------------------*/
1054 value = chxj_encoding_parameter(r, value);
1055 value = chxj_add_cookie_parameter(r, value, jhtml->cookie);
1060 else if (STRCASEEQ('a','A',"accesskey",name)) {
1061 /*----------------------------------------------------------------------*/
1063 /*----------------------------------------------------------------------*/
1064 W_L(" accesskey=\"");
1068 else if (STRCASEEQ('c','C',"cti",name)) {
1069 /*----------------------------------------------------------------------*/
1071 /*----------------------------------------------------------------------*/
1076 else if (STRCASEEQ('i','I',"ijam",name)) {
1077 /*----------------------------------------------------------------------*/
1079 /*----------------------------------------------------------------------*/
1082 else if (STRCASEEQ('u','U',"utn",name)) {
1083 /*----------------------------------------------------------------------*/
1085 /* It is special only for CHTML. */
1086 /*----------------------------------------------------------------------*/
1089 else if (STRCASEEQ('t','T',"telbook",name)) {
1090 /*----------------------------------------------------------------------*/
1092 /*----------------------------------------------------------------------*/
1095 else if (STRCASEEQ('k','K',"kana",name)) {
1096 /*----------------------------------------------------------------------*/
1098 /*----------------------------------------------------------------------*/
1101 else if (STRCASEEQ('e','E',"email",name)) {
1102 /*----------------------------------------------------------------------*/
1104 /*----------------------------------------------------------------------*/
1107 else if (STRCASEEQ('i','I',"ista",name)) {
1108 /*----------------------------------------------------------------------*/
1110 /*----------------------------------------------------------------------*/
1113 else if (STRCASEEQ('i','I',"ilet",name)) {
1114 /*----------------------------------------------------------------------*/
1116 /*----------------------------------------------------------------------*/
1119 else if (STRCASEEQ('i','I',"iswf",name)) {
1120 /*----------------------------------------------------------------------*/
1122 /*----------------------------------------------------------------------*/
1125 else if (STRCASEEQ('i','I',"irst",name)) {
1126 /*----------------------------------------------------------------------*/
1128 /*----------------------------------------------------------------------*/
1138 * It is a handler who processes the A tag.
1140 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1141 * destination is specified.
1142 * @param node [i] The A tag node is specified.
1143 * @return The conversion result is returned.
1146 s_jhtml_end_a_tag(void *pdoc, Node *UNUSED(child))
1152 jhtml = GET_JHTML(pdoc);
1162 * It is a handler who processes the BR tag.
1164 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1165 * destination is specified.
1166 * @param node [i] The BR tag node is specified.
1167 * @return The conversion result is returned.
1170 s_jhtml_start_br_tag(void *pdoc, Node *node)
1177 jhtml = GET_JHTML(pdoc);
1182 /*--------------------------------------------------------------------------*/
1183 /* Get Attributes */
1184 /*--------------------------------------------------------------------------*/
1185 for (attr = qs_get_attr(doc,node);
1187 attr = qs_get_next_attr(doc,attr)) {
1188 char *name = qs_get_attr_name(doc,attr);
1189 char *value = qs_get_attr_value(doc,attr);
1190 if (STRCASEEQ('c','C',"clear",name)) {
1191 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('a','A',"all",value))) {
1204 * It is a handler who processes the BR tag.
1206 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1207 * destination is specified.
1208 * @param node [i] The BR tag node is specified.
1209 * @return The conversion result is returned.
1212 s_jhtml_end_br_tag(void *pdoc, Node *UNUSED(child))
1214 jhtml_t *jhtml = GET_JHTML(pdoc);
1220 * It is a handler who processes the TR tag.
1222 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1223 * destination is specified.
1224 * @param node [i] The TR tag node is specified.
1225 * @return The conversion result is returned.
1228 s_jhtml_start_tr_tag(void *pdoc, Node *UNUSED(node))
1234 jhtml = GET_JHTML(pdoc);
1244 * It is a handler who processes the TR tag.
1246 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1247 * destination is specified.
1248 * @param node [i] The TR tag node is specified.
1249 * @return The conversion result is returned.
1252 s_jhtml_end_tr_tag(void *pdoc, Node *UNUSED(child))
1254 jhtml_t *jhtml = GET_JHTML(pdoc);
1260 * It is a handler who processes the FONT tag.
1262 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1263 * destination is specified.
1264 * @param node [i] The FONT tag node is specified.
1265 * @return The conversion result is returned.
1268 s_jhtml_start_font_tag(void *pdoc, Node *node)
1276 jhtml = GET_JHTML(pdoc);
1280 /*--------------------------------------------------------------------------*/
1281 /* Get Attributes */
1282 /*--------------------------------------------------------------------------*/
1283 for (attr = qs_get_attr(doc,node);
1285 attr = qs_get_next_attr(doc,attr)) {
1286 char *name = qs_get_attr_name(doc,attr);
1287 char *value = qs_get_attr_value(doc,attr);
1288 if (STRCASEEQ('c','C',"color",name) && value && *value) {
1289 color = apr_pstrdup(doc->buf.pool, value);
1292 else if (STRCASEEQ('s','S',"size",name)) {
1293 /*----------------------------------------------------------------------*/
1295 /*----------------------------------------------------------------------*/
1300 W_L("<font color=\"");
1310 * It is a handler who processes the FONT tag.
1312 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1313 * destination is specified.
1314 * @param node [i] The FONT tag node is specified.
1315 * @return The conversion result is returned.
1318 s_jhtml_end_font_tag(void *pdoc, Node *UNUSED(child))
1324 jhtml = GET_JHTML(pdoc);
1328 if (jhtml->font_flag) {
1337 * It is a handler who processes the FORM tag.
1339 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1340 * destination is specified.
1341 * @param node [i] The FORM tag node is specified.
1342 * @return The conversion result is returned.
1345 s_jhtml_start_form_tag(void *pdoc, Node *node)
1352 jhtml = GET_JHTML(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);
1365 if (STRCASEEQ('a','A',"action",name)) {
1366 /*----------------------------------------------------------------------*/
1368 /*----------------------------------------------------------------------*/
1369 value = chxj_add_cookie_parameter(r, value, jhtml->cookie);
1374 else if (STRCASEEQ('m','M',"method",name)) {
1375 /*----------------------------------------------------------------------*/
1377 /*----------------------------------------------------------------------*/
1382 else if (STRCASEEQ('u','U',"utn",name)) {
1383 /*----------------------------------------------------------------------*/
1385 /* It is special only for CHTML. */
1386 /*----------------------------------------------------------------------*/
1396 * It is a handler who processes the FORM tag.
1398 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1399 * destination is specified.
1400 * @param node [i] The FORM tag node is specified.
1401 * @return The conversion result is returned.
1404 s_jhtml_end_form_tag(void *pdoc, Node *UNUSED(child))
1406 jhtml_t *jhtml = GET_JHTML(pdoc);
1407 Doc *doc = jhtml->doc;
1414 * It is a handler who processes the INPUT tag.
1416 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1417 * destination is specified.
1418 * @param node [i] The INPUT tag node is specified.
1419 * @return The conversion result is returned.
1422 s_jhtml_start_input_tag(void *pdoc, Node *node)
1436 jhtml = GET_JHTML(pdoc);
1449 /*--------------------------------------------------------------------------*/
1450 /* Get Attributes */
1451 /*--------------------------------------------------------------------------*/
1452 type = qs_get_type_attr(doc, node, doc->buf.pool);
1453 name = qs_get_name_attr(doc, node, doc->buf.pool);
1454 value = qs_get_value_attr(doc,node,doc->buf.pool);
1455 istyle = qs_get_istyle_attr(doc,node,doc->buf.pool);
1456 max_length = qs_get_maxlength_attr(doc,node,doc->buf.pool);
1457 checked = qs_get_checked_attr(doc,node,doc->buf.pool);
1458 accesskey = qs_get_accesskey_attr(doc, node, doc->buf.pool);
1459 size = qs_get_size_attr(doc, node, doc->buf.pool);
1462 if (type && (STRCASEEQ('t','T',"text", type) ||
1463 STRCASEEQ('p','P',"password",type) ||
1464 STRCASEEQ('c','C',"checkbox",type) ||
1465 STRCASEEQ('r','R',"radio", type) ||
1466 STRCASEEQ('h','H',"hidden", type) ||
1467 STRCASEEQ('s','S',"submit", type) ||
1468 STRCASEEQ('r','R',"reset", type))) {
1474 if (size && *size) {
1479 if (name && *name) {
1484 if (value && *value) {
1489 if (accesskey && *accesskey) {
1490 W_L(" accesskey=\"");
1494 if (istyle && (*istyle == '1' || *istyle == '2' || *istyle == '3' || *istyle == '4')) {
1495 /*------------------------------------------------------------------------*/
1497 /*------------------------------------------------------------------------*/
1498 if (type && STRCASEEQ('p','P',"password", type) && ! jhtml->entryp->pc_flag ) {
1504 char *vv = chxj_istyle_to_mode(doc->buf.pool,istyle);
1510 else if (type && STRCASEEQ('p','P',"password",type)) {
1515 /*--------------------------------------------------------------------------*/
1516 /* The figure is default for the password. */
1517 /*--------------------------------------------------------------------------*/
1518 if (max_length && *max_length) {
1519 if (chxj_chk_numeric(max_length) == 0) {
1520 W_L(" maxlength=\"");
1535 * It is a handler who processes the INPUT tag.
1537 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1538 * destination is specified.
1539 * @param node [i] The INPUT tag node is specified.
1540 * @return The conversion result is returned.
1543 s_jhtml_end_input_tag(void *pdoc, Node *UNUSED(child))
1545 jhtml_t *jhtml = GET_JHTML(pdoc);
1551 * It is a handler who processes the CENTER tag.
1553 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1554 * destination is specified.
1555 * @param node [i] The CENTER tag node is specified.
1556 * @return The conversion result is returned.
1559 s_jhtml_start_center_tag(void *pdoc, Node *UNUSED(node))
1561 jhtml_t *jhtml = GET_JHTML(pdoc);
1562 Doc *doc = jhtml->doc;
1569 * It is a handler who processes the CENTER tag.
1571 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1572 * destination is specified.
1573 * @param node [i] The CENTER tag node is specified.
1574 * @return The conversion result is returned.
1577 s_jhtml_end_center_tag(void *pdoc, Node *UNUSED(child))
1583 jhtml = GET_JHTML(pdoc);
1593 * It is a handler who processes the li tag.
1595 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1596 * destination is specified.
1597 * @param node [i] The li tag node is specified.
1598 * @return The conversion result is returned.
1601 s_jhtml_start_li_tag(void *pdoc, Node *node)
1608 jhtml = GET_JHTML(pdoc);
1613 /*--------------------------------------------------------------------------*/
1614 /* Get Attributes */
1615 /*--------------------------------------------------------------------------*/
1616 for (attr = qs_get_attr(doc,node);
1618 attr = qs_get_next_attr(doc,attr)) {
1619 char *name = qs_get_attr_name(doc,attr);
1620 char *value = qs_get_attr_value(doc,attr);
1621 if (STRCASEEQ('t','T',"type",name) && value && (*value == '1' || *value == 'a' || *value == 'A')) {
1626 else if (STRCASEEQ('v','V',"value", name) && value && *value) {
1638 * It is a handler who processes the li tag.
1640 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1641 * destination is specified.
1642 * @param node [i] The li tag node is specified.
1643 * @return The conversion result is returned.
1646 s_jhtml_end_li_tag(void *pdoc, Node *UNUSED(child))
1652 jhtml = GET_JHTML(pdoc);
1662 * It is a handler who processes the OL tag.
1664 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1665 * destination is specified.
1666 * @param node [i] The OL tag node is specified.
1667 * @return The conversion result is returned.
1670 s_jhtml_start_ol_tag(void *pdoc, Node *node)
1677 jhtml = GET_JHTML(pdoc);
1682 /*--------------------------------------------------------------------------*/
1683 /* Get Attributes */
1684 /*--------------------------------------------------------------------------*/
1685 for (attr = qs_get_attr(doc,node);
1687 attr = qs_get_next_attr(doc,attr)) {
1688 char *name = qs_get_attr_name(doc,attr);
1689 char *value = qs_get_attr_value(doc,attr);
1690 if (STRCASEEQ('t','T',"type",name) && value && (*value == '1' || *value == 'a' || *value == 'A')) {
1695 else if (STRCASEEQ('s','S',"start",name) && value && *value) {
1707 * It is a handler who processes the OL tag.
1709 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1710 * destination is specified.
1711 * @param node [i] The OL tag node is specified.
1712 * @return The conversion result is returned.
1715 s_jhtml_end_ol_tag(void *pdoc, Node *UNUSED(child))
1721 jhtml = GET_JHTML(pdoc);
1731 * It is a handler who processes the P tag.
1733 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1734 * destination is specified.
1735 * @param node [i] The P tag node is specified.
1736 * @return The conversion result is returned.
1739 s_jhtml_start_p_tag(void *pdoc, Node *node)
1747 jhtml = GET_JHTML(pdoc);
1752 for (attr = qs_get_attr(doc,node);
1754 attr = qs_get_next_attr(doc,attr)) {
1755 char *nm = qs_get_attr_name(doc,attr);
1756 char *val = qs_get_attr_value(doc,attr);
1757 if (STRCASEEQ('a','A',"align", nm)) {
1758 /*----------------------------------------------------------------------*/
1759 /* CHTML 1.0 (W3C version 3.2) */
1760 /*----------------------------------------------------------------------*/
1761 if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
1762 align = apr_pstrdup(doc->buf.pool, val);
1778 * It is a handler who processes the P tag.
1780 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1781 * destination is specified.
1782 * @param node [i] The P tag node is specified.
1783 * @return The conversion result is returned.
1786 s_jhtml_end_p_tag(void *pdoc, Node *UNUSED(child))
1788 jhtml_t *jhtml = GET_JHTML(pdoc);
1789 Doc *doc = jhtml->doc;
1797 * It is a handler who processes the PRE tag.
1799 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1800 * destination is specified.
1801 * @param node [i] The PRE tag node is specified.
1802 * @return The conversion result is returned.
1805 s_jhtml_start_pre_tag(void *pdoc, Node *UNUSED(node))
1807 jhtml_t *jhtml = GET_JHTML(pdoc);
1808 Doc *doc = jhtml->doc;
1817 * It is a handler who processes the PRE tag.
1819 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1820 * destination is specified.
1821 * @param node [i] The PRE tag node is specified.
1822 * @return The conversion result is returned.
1825 s_jhtml_end_pre_tag(void *pdoc, Node *UNUSED(child))
1827 jhtml_t *jhtml = GET_JHTML(pdoc);
1828 Doc *doc = jhtml->doc;
1838 * It is a handler who processes the UL tag.
1840 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1841 * destination is specified.
1842 * @param node [i] The UL tag node is specified.
1843 * @return The conversion result is returned.
1846 s_jhtml_start_ul_tag(void *pdoc, Node *UNUSED(node))
1848 jhtml_t *jhtml = GET_JHTML(pdoc);
1849 Doc *doc = jhtml->doc;
1857 * It is a handler who processes the UL tag.
1859 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1860 * destination is specified.
1861 * @param node [i] The UL tag node is specified.
1862 * @return The conversion result is returned.
1865 s_jhtml_end_ul_tag(void *pdoc, Node *UNUSED(child))
1867 jhtml_t *jhtml = GET_JHTML(pdoc);
1868 Doc *doc = jhtml->doc;
1876 * It is a handler who processes the HR tag.
1878 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1879 * destination is specified.
1880 * @param node [i] The HR tag node is specified.
1881 * @return The conversion result is returned.
1884 s_jhtml_start_hr_tag(void *pdoc, Node *node)
1886 jhtml_t *jhtml = GET_JHTML(pdoc);
1887 Doc *doc = jhtml->doc;
1891 for (attr = qs_get_attr(doc,node);
1893 attr = qs_get_next_attr(doc,attr)) {
1894 char *name = qs_get_attr_name(doc,attr);
1895 char *value = qs_get_attr_value(doc,attr);
1896 if (STRCASEEQ('a','A',"align",name)) {
1897 /*----------------------------------------------------------------------*/
1899 /*----------------------------------------------------------------------*/
1900 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
1906 else if (STRCASEEQ('s','S',"size",name) && value && *value) {
1907 /*----------------------------------------------------------------------*/
1909 /*----------------------------------------------------------------------*/
1914 else if (STRCASEEQ('w','W',"width",name) && value && *value) {
1915 /*----------------------------------------------------------------------*/
1917 /*----------------------------------------------------------------------*/
1922 else if (STRCASEEQ('n','N',"noshade",name)) {
1923 /*----------------------------------------------------------------------*/
1925 /*----------------------------------------------------------------------*/
1928 else if (STRCASEEQ('c','C',"color",name) && value && *value) {
1929 /*----------------------------------------------------------------------*/
1931 /*----------------------------------------------------------------------*/
1943 * It is a handler who processes the HR tag.
1945 * @param jhtml [i/o] The pointer to the CHTML structure at the output
1946 * destination is specified.
1947 * @param node [i] The HR tag node is specified.
1948 * @return The conversion result is returned.
1951 s_jhtml_end_hr_tag(void *pdoc, Node *UNUSED(child))
1953 jhtml_t *jhtml = GET_JHTML(pdoc);
1959 * It is a handler who processes the IMG tag.
1961 * @param pdoc [i/o] The pointer to the CHTML structure at the output
1962 * destination is specified.
1963 * @param node [i] The IMG tag node is specified.
1964 * @return The conversion result is returned.
1967 s_jhtml_start_img_tag(void *pdoc, Node *node)
1969 jhtml_t *jhtml = GET_JHTML(pdoc);
1970 Doc *doc = jhtml->doc;
1971 request_rec *r = doc->r;
1973 #ifndef IMG_NOT_CONVERT_FILENAME
1974 device_table *spec = jhtml->spec;
1978 /*--------------------------------------------------------------------------*/
1979 /* Get Attributes */
1980 /*--------------------------------------------------------------------------*/
1981 for (attr = qs_get_attr(doc,node);
1983 attr = qs_get_next_attr(doc,attr)) {
1984 char *name = qs_get_attr_name(doc,attr);
1985 char *value = qs_get_attr_value(doc,attr);
1986 if (STRCASEEQ('s','S',"src",name)) {
1987 /*----------------------------------------------------------------------*/
1989 /*----------------------------------------------------------------------*/
1990 #ifdef IMG_NOT_CONVERT_FILENAME
1991 value = chxj_encoding_parameter(r, value);
1992 value = chxj_add_cookie_parameter(r, value, jhtml->cookie);
1994 value = apr_psprintf(r->pool,
1997 (strchr(value, '?')) ? '&' : '?',
1998 CHXJ_COOKIE_NOUPDATE_PARAM);
2004 value = chxj_img_conv(r, spec, value);
2005 value = chxj_encoding_parameter(r, value);
2006 value = chxj_add_cookie_parameter(r, value, jhtml->cookie);
2008 value = apr_psprintf(r->pool,
2011 (strchr(value, '?')) ? '&' : '?',
2012 CHXJ_COOKIE_NOUPDATE_PARAM);
2019 else if (STRCASEEQ('a','A',"align",name)) {
2020 /*----------------------------------------------------------------------*/
2022 /*----------------------------------------------------------------------*/
2024 if (STRCASEEQ('t','T',"top", value) ||
2025 STRCASEEQ('m','M',"middle",value) ||
2026 STRCASEEQ('b','B',"bottom",value) ||
2027 STRCASEEQ('l','L',"left", value) ||
2028 STRCASEEQ('r','R',"right", value)) {
2033 else if (STRCASEEQ('c','C',"center",value)) {
2040 else if (STRCASEEQ('w','W',"width",name) && value && *value) {
2041 /*----------------------------------------------------------------------*/
2043 /*----------------------------------------------------------------------*/
2048 else if (STRCASEEQ('h','H',"height",name) && value && *value) {
2049 /*----------------------------------------------------------------------*/
2051 /*----------------------------------------------------------------------*/
2056 else if (STRCASEEQ('h','H',"hspace",name)) {
2057 /*----------------------------------------------------------------------*/
2059 /*----------------------------------------------------------------------*/
2062 else if (STRCASEEQ('v','V',"vspace",name)) {
2063 /*----------------------------------------------------------------------*/
2065 /*----------------------------------------------------------------------*/
2068 else if (STRCASEEQ('a','A',"alt",name) && value && *value) {
2069 /*----------------------------------------------------------------------*/
2071 /*----------------------------------------------------------------------*/
2083 * It is a handler who processes the IMG tag.
2085 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2086 * destination is specified.
2087 * @param node [i] The IMG tag node is specified.
2088 * @return The conversion result is returned.
2091 s_jhtml_end_img_tag(void *pdoc, Node *UNUSED(child))
2093 jhtml_t *jhtml = GET_JHTML(pdoc);
2099 * It is a handler who processes the SELECT tag.
2101 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2102 * destination is specified.
2103 * @param node [i] The SELECT tag node is specified.
2104 * @return The conversion result is returned.
2107 s_jhtml_start_select_tag(void *pdoc, Node *child)
2109 jhtml_t *jhtml = GET_JHTML(pdoc);
2110 Doc *doc = jhtml->doc;
2114 char *multiple = NULL;
2117 for (attr = qs_get_attr(doc,child);
2119 attr = qs_get_next_attr(doc,attr)) {
2120 char *nm = qs_get_attr_name(doc,attr);
2121 char *val = qs_get_attr_value(doc,attr);
2122 if (STRCASEEQ('s','S',"size",nm)) {
2123 /*----------------------------------------------------------------------*/
2124 /* CHTML 1.0 version 2.0 */
2125 /*----------------------------------------------------------------------*/
2126 size = apr_pstrdup(doc->buf.pool, val);
2128 else if (STRCASEEQ('n','N',"name",nm)) {
2129 /*----------------------------------------------------------------------*/
2130 /* CHTML 1.0 version 2.0 */
2131 /*----------------------------------------------------------------------*/
2132 name = apr_pstrdup(doc->buf.pool, val);
2134 else if (STRCASEEQ('m','M',"multiple", nm)) {
2135 /*----------------------------------------------------------------------*/
2136 /* CHTML 1.0 version 2.0 */
2137 /*----------------------------------------------------------------------*/
2138 multiple = apr_pstrdup(doc->buf.pool, val);
2141 if (size && *size) {
2146 if (name && *name) {
2160 * It is a handler who processes the SELECT tag.
2162 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2163 * destination is specified.
2164 * @param node [i] The SELECT tag node is specified.
2165 * @return The conversion result is returned.
2168 s_jhtml_end_select_tag(void *pdoc, Node *UNUSED(child))
2170 jhtml_t *jhtml = GET_JHTML(pdoc);
2171 Doc *doc = jhtml->doc;
2178 * It is a handler who processes the OPTION tag.
2180 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2181 * destination is specified.
2182 * @param node [i] The OPTION tag node is specified.
2183 * @return The conversion result is returned.
2186 s_jhtml_start_option_tag(void *pdoc, Node *child)
2188 jhtml_t *jhtml = GET_JHTML(pdoc);
2189 Doc *doc = jhtml->doc;
2192 char *selected = NULL;
2196 for (attr = qs_get_attr(doc,child);
2198 attr = qs_get_next_attr(doc,attr)) {
2199 char *nm = qs_get_attr_name(doc,attr);
2200 char *val = qs_get_attr_value(doc,attr);
2201 if (STRCASEEQ('s','S',"selected",nm)) {
2202 /*----------------------------------------------------------------------*/
2203 /* CHTML 1.0 version 2.0 */
2204 /*----------------------------------------------------------------------*/
2205 selected = apr_pstrdup(doc->buf.pool, val);
2207 else if (STRCASEEQ('v','V',"value",nm)) {
2208 /*----------------------------------------------------------------------*/
2209 /* CHTML 1.0 version 2.0 */
2210 /*----------------------------------------------------------------------*/
2211 value = apr_pstrdup(doc->buf.pool, val);
2214 if (value && *value) {
2228 * It is a handler who processes the OPTION tag.
2230 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2231 * destination is specified.
2232 * @param node [i] The OPTION tag node is specified.
2233 * @return The conversion result is returned.
2236 s_jhtml_end_option_tag(void *pdoc, Node *UNUSED(child))
2238 jhtml_t *jhtml = GET_JHTML(pdoc);
2245 * It is a handler who processes the DIV tag.
2247 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2248 * destination is specified.
2249 * @param node [i] The DIV tag node is specified.
2250 * @return The conversion result is returned.
2253 s_jhtml_start_div_tag(void *pdoc, Node *child)
2261 jhtml = GET_JHTML(pdoc);
2266 for (attr = qs_get_attr(doc,child);
2268 attr = qs_get_next_attr(doc,attr)) {
2269 char *nm = qs_get_attr_name(doc,attr);
2270 char *val = qs_get_attr_value(doc,attr);
2271 if (STRCASEEQ('a','A',"align",nm)) {
2272 /*----------------------------------------------------------------------*/
2273 /* CHTML 1.0 (W3C version 3.2) */
2274 /*----------------------------------------------------------------------*/
2275 if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
2276 align = apr_pstrdup(doc->buf.pool, val);
2291 * It is a handler who processes the DIV tag.
2293 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2294 * destination is specified.
2295 * @param node [i] The DIV tag node is specified.
2296 * @return The conversion result is returned.
2299 s_jhtml_end_div_tag(void *pdoc, Node *UNUSED(child))
2305 jhtml = GET_JHTML(pdoc);
2315 chxj_istyle_to_mode(apr_pool_t *p, const char *s)
2321 case '1': return apr_psprintf(p, "hiragana");
2322 case '2': return apr_psprintf(p, "hankakukana");
2323 case '3': return apr_psprintf(p, "alphabet");
2324 case '4': return apr_psprintf(p, "numeric");
2326 tmp = apr_palloc(p, 1);
2328 return apr_pstrdup(p, tmp);
2332 tmp = apr_palloc(p, 1);
2334 return apr_pstrdup(p,tmp);
2339 s_jhtml_chxjif_tag(void *pdoc, Node *node)
2346 jhtml = GET_JHTML(pdoc);
2350 for (child = qs_get_child_node(doc, node);
2352 child = qs_get_next_node(doc, child)) {
2354 s_jhtml_chxjif_tag(jhtml, child);
2361 * It is a handler who processes the TEXTARE tag.
2363 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2364 * destination is specified.
2365 * @param node [i] The TEXTAREA tag node is specified.
2366 * @return The conversion result is returned.
2369 s_jhtml_start_textarea_tag(void *pdoc, Node *node)
2376 jhtml = GET_JHTML(pdoc);
2380 jhtml->textarea_flag++;
2382 for (attr = qs_get_attr(doc,node);
2384 attr = qs_get_next_attr(doc,attr)) {
2385 char *name = qs_get_attr_name(doc,attr);
2386 char *value = qs_get_attr_value(doc,attr);
2387 if (STRCASEEQ('a','A',"accesskey",name) && value && *value != 0) {
2388 W_L(" accesskey=\"");
2392 else if (STRCASEEQ('i','I',"istyle", name) && value && (*value == '1' || *value == '2' || *value == '3' || *value == '4')) {
2393 char *vv = chxj_istyle_to_mode(doc->buf.pool,value);
2398 else if (STRCASEEQ('n','N',"name", name) && value && *value) {
2403 else if (STRCASEEQ('r','R',"rows", name) && value && *value) {
2408 else if (STRCASEEQ('c','C',"cols", name) && value && *value) {
2420 * It is a handler who processes the TEXTAREA tag.
2422 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2423 * destination is specified.
2424 * @param node [i] The TEXTAREA tag node is specified.
2425 * @return The conversion result is returned.
2428 s_jhtml_end_textarea_tag(void *pdoc, Node *UNUSED(child))
2434 jhtml = GET_JHTML(pdoc);
2439 jhtml->textarea_flag--;
2446 * It is a handler who processes the B tag.
2448 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2449 * destination is specified.
2450 * @param node [i] The B tag node is specified.
2451 * @return The conversion result is returned.
2454 s_jhtml_start_b_tag(void* pdoc, Node* UNUSED(node))
2460 jhtml = GET_JHTML(pdoc);
2470 * It is a handler who processes the B tag.
2472 * @param pdoc [i/o] The pointer to the CHTML structure at the output
2473 * destination is specified.
2474 * @param node [i] The B tag node is specified.
2475 * @return The conversion result is returned.
2478 s_jhtml_end_b_tag(void* pdoc, Node* UNUSED(child))
2480 jhtml_t* jhtml = GET_JHTML(pdoc);
2481 Doc* doc = jhtml->doc;
2488 s_jhtml_text_tag(void* pdoc, Node* child)
2500 jhtml = GET_JHTML(pdoc);
2504 textval = qs_get_node_value(doc,child);
2505 if (strlen(textval) == 0) {
2509 tmp = apr_palloc(r->pool, qs_get_node_size(doc,child)+1);
2510 memset(tmp, 0, qs_get_node_size(doc,child)+1);
2512 tdst = qs_alloc_zero_byte_string(r->pool);
2513 memset(one_byte, 0, sizeof(one_byte));
2516 for (ii=0; ii<qs_get_node_size(doc,child); ii++) {
2518 int rtn = s_jhtml_search_emoji(jhtml, &textval[ii], &out);
2520 tdst = qs_out_apr_pstrcat(r, tdst, out, &tdst_len);
2525 if (is_sjis_kanji(textval[ii])) {
2526 one_byte[0] = textval[ii+0];
2527 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2528 one_byte[0] = textval[ii+1];
2529 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2533 if (jhtml->pre_flag) {
2534 one_byte[0] = textval[ii+0];
2535 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2538 if (jhtml->textarea_flag) {
2539 one_byte[0] = textval[ii+0];
2540 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2543 if (textval[ii] != '\r' && textval[ii] != '\n') {
2544 one_byte[0] = textval[ii+0];
2545 tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
2555 * It is a handler who processes the BLOCKQUOTE tag.
2557 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2558 * destination is specified.
2559 * @param node [i] The BLOCKQUOTE tag node is specified.
2560 * @return The conversion result is returned.
2563 s_jhtml_start_blockquote_tag(void *pdoc, Node *UNUSED(child))
2565 jhtml_t *jhtml = GET_JHTML(pdoc);
2566 Doc *doc = jhtml->doc;
2567 W_L("<blockquote>");
2573 * It is a handler who processes the BLOCKQUOTE tag.
2575 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2576 * destination is specified.
2577 * @param node [i] The BLOCKQUOTE tag node is specified.
2578 * @return The conversion result is returned.
2581 s_jhtml_end_blockquote_tag(void *pdoc, Node *UNUSED(child))
2583 jhtml_t *jhtml = GET_JHTML(pdoc);
2584 Doc *doc = jhtml->doc;
2585 W_L("</blockquote>");
2591 * It is a handler who processes the DIR tag.
2593 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2594 * destination is specified.
2595 * @param node [i] The DIR tag node is specified.
2596 * @return The conversion result is returned.
2599 s_jhtml_start_dir_tag(void *pdoc, Node *UNUSED(child))
2601 jhtml_t *jhtml = GET_JHTML(pdoc);
2602 Doc *doc = jhtml->doc;
2609 * It is a handler who processes the DIR tag.
2611 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2612 * destination is specified.
2613 * @param node [i] The DIR tag node is specified.
2614 * @return The conversion result is returned.
2617 s_jhtml_end_dir_tag(void *pdoc, Node *UNUSED(child))
2619 jhtml_t *jhtml = GET_JHTML(pdoc);
2620 Doc *doc = jhtml->doc;
2627 * It is a handler who processes the DL tag.
2629 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2630 * destination is specified.
2631 * @param node [i] The DL tag node is specified.
2632 * @return The conversion result is returned.
2635 s_jhtml_start_dl_tag(void *pdoc, Node *UNUSED(child))
2637 jhtml_t *jhtml = GET_JHTML(pdoc);
2638 Doc *doc = jhtml->doc;
2645 * It is a handler who processes the DL tag.
2647 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2648 * destination is specified.
2649 * @param node [i] The DL tag node is specified.
2650 * @return The conversion result is returned.
2653 s_jhtml_end_dl_tag(void *pdoc, Node *UNUSED(child))
2655 jhtml_t *jhtml = GET_JHTML(pdoc);
2656 Doc *doc = jhtml->doc;
2663 * It is a handler who processes the DT tag.
2665 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2666 * destination is specified.
2667 * @param node [i] The DT tag node is specified.
2668 * @return The conversion result is returned.
2671 s_jhtml_start_dt_tag(void *pdoc, Node *UNUSED(child))
2673 jhtml_t *jhtml = GET_JHTML(pdoc);
2674 Doc *doc = jhtml->doc;
2681 * It is a handler who processes the DT tag.
2683 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2684 * destination is specified.
2685 * @param node [i] The DT tag node is specified.
2686 * @return The conversion result is returned.
2689 s_jhtml_end_dt_tag(void *pdoc, Node *UNUSED(child))
2691 jhtml_t *jhtml = GET_JHTML(pdoc);
2697 * It is a handler who processes the DD tag.
2699 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2700 * destination is specified.
2701 * @param node [i] The DD tag node is specified.
2702 * @return The conversion result is returned.
2705 s_jhtml_start_dd_tag(void *pdoc, Node *UNUSED(child))
2707 jhtml_t *jhtml = GET_JHTML(pdoc);
2708 Doc *doc = jhtml->doc;
2715 * It is a handler who processes the DD tag.
2717 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2718 * destination is specified.
2719 * @param node [i] The DD tag node is specified.
2720 * @return The conversion result is returned.
2723 s_jhtml_end_dd_tag(void *pdoc, Node *UNUSED(child))
2725 jhtml_t *jhtml = GET_JHTML(pdoc);
2731 * It is a handler who processes the H1 tag.
2733 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2734 * destination is specified.
2735 * @param node [i] The H1 tag node is specified.
2736 * @return The conversion result is returned.
2739 s_jhtml_start_h1_tag(void *pdoc, Node *node)
2747 jhtml = GET_JHTML(pdoc);
2751 for (attr = qs_get_attr(doc,node);
2753 attr = qs_get_next_attr(doc,attr)) {
2754 char *name = qs_get_attr_name(doc,attr);
2755 char *value = qs_get_attr_value(doc,attr);
2756 if (STRCASEEQ('a','A',"align", name)) {
2757 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2758 jhtml->h1_align_flag++;
2759 align = apr_pstrdup(doc->buf.pool, value);
2765 W_L("<div align=\"");
2774 * It is a handler who processes the H1 tag.
2776 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2777 * destination is specified.
2778 * @param node [i] The H1 tag node is specified.
2779 * @return The conversion result is returned.
2782 s_jhtml_end_h1_tag(void *pdoc, Node *UNUSED(child))
2788 jhtml = GET_JHTML(pdoc);
2792 if (jhtml->h1_align_flag) {
2793 jhtml->h1_align_flag--;
2801 * It is a handler who processes the H2 tag.
2803 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2804 * destination is specified.
2805 * @param node [i] The H1 tag node is specified.
2806 * @return The conversion result is returned.
2809 s_jhtml_start_h2_tag(void *pdoc, Node *node)
2817 jhtml = GET_JHTML(pdoc);
2821 for (attr = qs_get_attr(doc,node);
2823 attr = qs_get_next_attr(doc,attr)) {
2826 name = qs_get_attr_name(doc,attr);
2827 value = qs_get_attr_value(doc,attr);
2828 if (STRCASEEQ('a','A',"align", name)) {
2829 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2830 jhtml->h2_align_flag++;
2831 align = apr_pstrdup(doc->buf.pool, value);
2837 W_L("<div align=\"");
2846 * It is a handler who processes the H2 tag.
2848 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2849 * destination is specified.
2850 * @param node [i] The H1 tag node is specified.
2851 * @return The conversion result is returned.
2854 s_jhtml_end_h2_tag(void *pdoc, Node *UNUSED(child))
2860 jhtml = GET_JHTML(pdoc);
2864 if (jhtml->h2_align_flag) {
2865 jhtml->h2_align_flag--;
2873 * It is a handler who processes the H3 tag.
2875 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2876 * destination is specified.
2877 * @param node [i] The H1 tag node is specified.
2878 * @return The conversion result is returned.
2881 s_jhtml_start_h3_tag(void *pdoc, Node *node)
2889 jhtml = GET_JHTML(pdoc);
2893 for (attr = qs_get_attr(doc,node);
2895 attr = qs_get_next_attr(doc,attr)) {
2898 name = qs_get_attr_name(doc,attr);
2899 value = qs_get_attr_value(doc,attr);
2900 if (STRCASEEQ('a','A',"align", name)) {
2901 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2902 jhtml->h3_align_flag++;
2903 align = apr_pstrdup(doc->buf.pool, value);
2909 W_L("<div align=\"");
2918 * It is a handler who processes the H3 tag.
2920 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2921 * destination is specified.
2922 * @param node [i] The H1 tag node is specified.
2923 * @return The conversion result is returned.
2926 s_jhtml_end_h3_tag(void *pdoc, Node *UNUSED(child))
2932 jhtml = GET_JHTML(pdoc);
2936 if (jhtml->h3_align_flag) {
2937 jhtml->h3_align_flag--;
2945 * It is a handler who processes the H4 tag.
2947 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2948 * destination is specified.
2949 * @param node [i] The H1 tag node is specified.
2950 * @return The conversion result is returned.
2953 s_jhtml_start_h4_tag(void *pdoc, Node *node)
2961 jhtml = GET_JHTML(pdoc);
2965 for (attr = qs_get_attr(doc,node);
2967 attr = qs_get_next_attr(doc,attr)) {
2968 char *name = qs_get_attr_name(doc,attr);
2969 char *value = qs_get_attr_value(doc,attr);
2970 if (STRCASEEQ('a','A',"align", name)) {
2971 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
2972 jhtml->h4_align_flag++;
2973 align = apr_pstrdup(doc->buf.pool, value);
2979 W_L("<div align=\"");
2988 * It is a handler who processes the H4 tag.
2990 * @param pdoc [i/o] The pointer to the JHTML structure at the output
2991 * destination is specified.
2992 * @param node [i] The H1 tag node is specified.
2993 * @return The conversion result is returned.
2996 s_jhtml_end_h4_tag(void *pdoc, Node *UNUSED(child))
3002 jhtml = GET_JHTML(pdoc);
3006 if (jhtml->h4_align_flag) {
3007 jhtml->h4_align_flag--;
3015 * It is a handler who processes the H5 tag.
3017 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3018 * destination is specified.
3019 * @param node [i] The H1 tag node is specified.
3020 * @return The conversion result is returned.
3023 s_jhtml_start_h5_tag(void *pdoc, Node *node)
3031 jhtml = GET_JHTML(pdoc);
3035 for (attr = qs_get_attr(doc,node);
3037 attr = qs_get_next_attr(doc,attr)) {
3038 char *name = qs_get_attr_name(doc,attr);
3039 char *value = qs_get_attr_value(doc,attr);
3040 if (STRCASEEQ('a','A',"align", name)) {
3041 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
3042 jhtml->h5_align_flag++;
3043 align = apr_pstrdup(doc->buf.pool, value);
3049 W_L("<div align=\"");
3058 * It is a handler who processes the H5 tag.
3060 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3061 * destination is specified.
3062 * @param node [i] The H1 tag node is specified.
3063 * @return The conversion result is returned.
3066 s_jhtml_end_h5_tag(void *pdoc, Node *UNUSED(child))
3072 jhtml = GET_JHTML(pdoc);
3076 if (jhtml->h5_align_flag) {
3077 jhtml->h5_align_flag--;
3085 * It is a handler who processes the H6 tag.
3087 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3088 * destination is specified.
3089 * @param node [i] The H1 tag node is specified.
3090 * @return The conversion result is returned.
3093 s_jhtml_start_h6_tag(void *pdoc, Node *node)
3101 jhtml = GET_JHTML(pdoc);
3105 for (attr = qs_get_attr(doc,node);
3107 attr = qs_get_next_attr(doc,attr)) {
3108 char *name = qs_get_attr_name(doc,attr);
3109 char *value = qs_get_attr_value(doc,attr);
3110 if (STRCASEEQ('a','A',"align", name)) {
3111 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
3112 jhtml->h6_align_flag++;
3113 align = apr_pstrdup(doc->buf.pool, value);
3119 W_L("<div align=\"");
3128 * It is a handler who processes the H6 tag.
3130 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3131 * destination is specified.
3132 * @param node [i] The H1 tag node is specified.
3133 * @return The conversion result is returned.
3136 s_jhtml_end_h6_tag(void *pdoc, Node *UNUSED(child))
3142 jhtml = GET_JHTML(pdoc);
3146 if (jhtml->h6_align_flag) {
3147 jhtml->h6_align_flag--;
3155 * It is a handler who processes the MENU tag.
3157 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3158 * destination is specified.
3159 * @param node [i] The MENU tag node is specified.
3160 * @return The conversion result is returned.
3163 s_jhtml_start_menu_tag(void *pdoc, Node *UNUSED(child))
3165 jhtml_t *jhtml = GET_JHTML(pdoc);
3166 Doc *doc = jhtml->doc;
3173 * It is a handler who processes the MENU tag.
3175 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3176 * destination is specified.
3177 * @param node [i] The MENU tag node is specified.
3178 * @return The conversion result is returned.
3181 s_jhtml_end_menu_tag(void *pdoc, Node *UNUSED(child))
3183 jhtml_t *jhtml = GET_JHTML(pdoc);
3184 Doc *doc = jhtml->doc;
3191 * It is a handler who processes the PLAINTEXT tag.
3193 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3194 * destination is specified.
3195 * @param node [i] The PLAINTEXT tag node is specified.
3196 * @return The conversion result is returned.
3199 s_jhtml_start_plaintext_tag(void *pdoc, Node *node)
3204 jhtml = GET_JHTML(pdoc);
3207 s_jhtml_start_plaintext_tag_inner(pdoc,node);
3212 s_jhtml_start_plaintext_tag_inner(void *pdoc, Node *node)
3217 jhtml = GET_JHTML(pdoc);
3219 for (child = qs_get_child_node(doc, node);
3221 child = qs_get_next_node(doc, child)) {
3223 s_jhtml_start_plaintext_tag_inner(pdoc, child);
3230 * It is a handler who processes the PLAINTEXT tag.
3232 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3233 * destination is specified.
3234 * @param node [i] The PLAINTEXT tag node is specified.
3235 * @return The conversion result is returned.
3238 s_jhtml_end_plaintext_tag(void *pdoc, Node *UNUSED(child))
3240 jhtml_t *jhtml = GET_JHTML(pdoc);
3246 * It is a handler who processes the BLINK tag.
3248 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3249 * destination is specified.
3250 * @param node [i] The BLINK tag node is specified.
3251 * @return The conversion result is returned.
3254 s_jhtml_start_blink_tag(void *pdoc, Node *UNUSED(child))
3256 jhtml_t *jhtml = GET_JHTML(pdoc);
3257 Doc *doc = jhtml->doc;
3264 * It is a handler who processes the BLINK tag.
3266 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3267 * destination is specified.
3268 * @param node [i] The BLINK tag node is specified.
3269 * @return The conversion result is returned.
3272 s_jhtml_end_blink_tag(void *pdoc, Node *UNUSED(child))
3274 jhtml_t *jhtml = GET_JHTML(pdoc);
3275 Doc *doc = jhtml->doc;
3282 * It is a handler who processes the MARQUEE tag.
3284 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3285 * destination is specified.
3286 * @param node [i] The MARQUEE tag node is specified.
3287 * @return The conversion result is returned.
3290 s_jhtml_start_marquee_tag(void *pdoc, Node *node)
3292 jhtml_t *jhtml = GET_JHTML(pdoc);
3293 Doc *doc = jhtml->doc;
3296 /*--------------------------------------------------------------------------*/
3297 /* Get Attributes */
3298 /*--------------------------------------------------------------------------*/
3299 for (attr = qs_get_attr(doc,node);
3301 attr = qs_get_next_attr(doc,attr)) {
3302 char *name = qs_get_attr_name(doc,attr);
3303 char *value = qs_get_attr_value(doc,attr);
3304 if (STRCASEEQ('d','D',"direction", name)) {
3305 if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value))) {
3306 W_L(" direction=\"");
3311 else if (STRCASEEQ('b','B',"behavior",name)) {
3314 else if (STRCASEEQ('l','L',"loop",name)) {
3324 * It is a handler who processes the MARQUEE tag.
3326 * @param pdoc [i/o] The pointer to the JHTML structure at the output
3327 * destination is specified.
3328 * @param node [i] The MARQUEE tag node is specified.
3329 * @return The conversion result is returned.
3332 s_jhtml_end_marquee_tag(void *pdoc, Node *UNUSED(child))
3334 jhtml_t *jhtml = GET_JHTML(pdoc);
3335 Doc *doc = jhtml->doc;
3342 * It is handler who processes the New Line Code.
3345 s_jhtml_newline_mark(void *pdoc, Node *UNUSED(node))
3347 jhtml_t *jhtml = GET_JHTML(pdoc);
3348 Doc *doc = jhtml->doc;