tagNLMARK, /* New Line Code */
tagOBJECT,
tagPARAM,
+ tagCAPTION,
} tag_type;
typedef struct mod_chxj_config mod_chxj_config;
NULL,
NULL,
},
+ /* tagCAPTION */
+ {
+ NULL,
+ NULL,
+ },
};
NULL,
NULL,
},
+ /* tagCAPTION */
+ {
+ NULL,
+ NULL,
+ },
};
/**
NULL,
NULL,
},
+ /* tagCAPTION */
+ {
+ NULL,
+ NULL,
+ },
};
NULL,
NULL,
},
+ /* tagCAPTION */
+ {
+ NULL,
+ NULL,
+ },
};
NULL,
NULL,
},
+ /* tagCAPTION */
+ {
+ NULL,
+ NULL,
+ },
};
NULL,
NULL,
},
+ /* tagCAPTION */
+ {
+ NULL,
+ NULL,
+ },
};
/**
static char *s_ixhtml10_start_object_tag (void *pdoc, Node *node);
static char *s_ixhtml10_end_object_tag (void *pdoc, Node *node);
static char *s_ixhtml10_start_param_tag (void *pdoc, Node *node);
+static char *s_ixhtml10_start_caption_tag (void *pdoc, Node *node);
+static char *s_ixhtml10_end_caption_tag (void *pdoc, Node *node);
static void s_init_ixhtml10(ixhtml10_t *ixhtml10, Doc *doc, request_rec *r, device_table *spec);
s_ixhtml10_start_param_tag,
NULL,
},
+ /* tagCAPTION */
+ {
+ s_ixhtml10_start_caption_tag,
+ s_ixhtml10_end_caption_tag,
+ },
};
return ixhtml10->out;
}
+/**
+ * It is a handler who processes the CAPTION tag.
+ *
+ * @param pdoc [i/o] The pointer to the IXHTML10 structure at the output
+ * destination is specified.
+ * @param node [i] The CAPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_ixhtml10_start_caption_tag(void *pdoc, Node *node)
+{
+ ixhtml10_t *ixhtml10;
+ Doc *doc;
+ request_rec *r;
+ Attr *attr;
+ char *attr_style = NULL;
+ char *attr_align = NULL;
+
+ ixhtml10 = GET_IXHTML10(pdoc);
+ doc = ixhtml10->doc;
+ r = doc->r;
+
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char *name = qs_get_attr_name(doc,attr);
+ char *value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value &&
+ (STRCASEEQ('l','L',"left",value)
+ || STRCASEEQ('r','R',"right",value)
+ || STRCASEEQ('t','T',"top",value)
+ || STRCASEEQ('b','B',"bottom",value)
+ )) {
+ attr_align = value;
+ }
+ }
+ else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+ attr_style = value;
+ }
+ }
+ W_L("<caption");
+ if(attr_align){
+ W_L(" align=\"");
+ W_V(attr_align);
+ W_L("\"");
+ }
+ W_L(">");
+ return ixhtml10->out;
+}
+
+
+/**
+ * It is a handler who processes the CAPTION tag.
+ *
+ * @param pdoc [i/o] The pointer to the IXHTML10 structure at the output
+ * destination is specified.
+ * @param node [i] The CAPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_ixhtml10_end_caption_tag(void *pdoc, Node *UNUSED(node))
+{
+ ixhtml10_t *ixhtml10 = GET_IXHTML10(pdoc);
+ Doc *doc = ixhtml10->doc;
+
+ W_L("</caption>");
+ return ixhtml10->out;
+}
+
/*
* vim:ts=2 et
*/
NULL,
NULL,
},
+ /* tagCAPTION */
+ {
+ NULL,
+ NULL,
+ },
};
static char *s_jxhtml_start_object_tag (void *pdoc, Node *node);
static char *s_jxhtml_end_object_tag (void *pdoc, Node *node);
static char *s_jxhtml_start_param_tag (void *pdoc, Node *node);
+static char *s_jxhtml_start_caption_tag (void *pdoc, Node *node);
+static char *s_jxhtml_end_caption_tag (void *pdoc, Node *node);
static void s_init_jxhtml(jxhtml_t *jxhtml, Doc *doc, request_rec *r, device_table *spec);
s_jxhtml_start_param_tag,
NULL,
},
+ /* tagCAPTION */
+ {
+ s_jxhtml_start_caption_tag,
+ s_jxhtml_end_caption_tag,
+ },
};
W_L(" />");
return jxhtml->out;
}
+/**
+ * It is a handler who processes the CAPTION tag.
+ *
+ * @param pdoc [i/o] The pointer to the JXHTML structure at the output
+ * destination is specified.
+ * @param node [i] The CAPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_jxhtml_start_caption_tag(void *pdoc, Node *node)
+{
+ jxhtml_t *jxhtml;
+ Doc *doc;
+ request_rec *r;
+ Attr *attr;
+ char *attr_style = NULL;
+ char *attr_align = NULL;
+
+ jxhtml = GET_JXHTML(pdoc);
+ doc = jxhtml->doc;
+ r = doc->r;
+
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char *name = qs_get_attr_name(doc,attr);
+ char *value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value &&
+ (STRCASEEQ('l','L',"left",value)
+ || STRCASEEQ('r','R',"right",value)
+ || STRCASEEQ('t','T',"top",value)
+ || STRCASEEQ('b','B',"bottom",value)
+ )) {
+ attr_align = value;
+ }
+ }
+ else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+ attr_style = value;
+ }
+ }
+
+ W_L("<caption");
+ if(attr_align){
+ W_L(" align=\"");
+ W_V(attr_align);
+ W_L("\"");
+ }
+ W_L(">");
+
+ return jxhtml->out;
+}
+
+
+/**
+ * It is a handler who processes the CAPTION tag.
+ *
+ * @param pdoc [i/o] The pointer to the JXHTML structure at the output
+ * destination is specified.
+ * @param node [i] The CAPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_jxhtml_end_caption_tag(void *pdoc, Node *UNUSED(child))
+{
+ jxhtml_t* jxhtml = GET_JXHTML(pdoc);
+ Doc* doc = jxhtml->doc;
+
+ W_L("</caption>");
+
+ return jxhtml->out;
+}
+
+
/*
* vim:ts=2 et
*/
if (handlers[tagCENTER].end_tag_handler)
handlers[tagCENTER].end_tag_handler(pdoc, child);
}
+ else
+ /*----------------------------------------------------------------------*/
+ /* <CAPTION> */
+ /*----------------------------------------------------------------------*/
+ if (strcasecmp(name, "caption") == 0) {
+ if (handlers[tagCAPTION].start_tag_handler)
+ handlers[tagCAPTION].start_tag_handler(pdoc, child);
+
+ chxj_node_convert(spec, r, pdoc, doc, child, indent+1);
+
+ if (handlers[tagCAPTION].end_tag_handler)
+ handlers[tagCAPTION].end_tag_handler(pdoc, child);
+ }
/*----------------------------------------------------------------------*/
/* <CHXJ:IF> */
/*----------------------------------------------------------------------*/
static char *s_xhtml_1_0_start_object_tag (void *pdoc, Node *node);
static char *s_xhtml_1_0_end_object_tag (void *pdoc, Node *node);
static char *s_xhtml_1_0_start_param_tag (void *pdoc, Node *node);
+static char *s_xhtml_1_0_start_caption_tag (void *pdoc, Node *node);
+static char *s_xhtml_1_0_end_caption_tag (void *pdoc, Node *node);
static void s_init_xhtml(xhtml_t *xhtml, Doc *doc, request_rec *r, device_table *spec);
static int s_xhtml_search_emoji(xhtml_t *xhtml, char *txt, char **rslt);
s_xhtml_1_0_start_param_tag,
NULL,
},
+ /* tagCAPTION */
+ {
+ s_xhtml_1_0_start_caption_tag,
+ s_xhtml_1_0_end_caption_tag,
+ },
};
/**
W_L(" />");
return xhtml->out;
}
+/**
+ * It is a handler who processes the CAPTION tag.
+ *
+ * @param pdoc [i/o] The pointer to the XHTML structure at the output
+ * destination is specified.
+ * @param node [i] The CAPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_xhtml_1_0_start_caption_tag(void *pdoc, Node *node)
+{
+ xhtml_t *xhtml = GET_XHTML(pdoc);
+ Doc *doc = xhtml->doc;
+ Attr *attr;
+ char *attr_style = NULL;
+ char *attr_align = NULL;
+
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char *name = qs_get_attr_name(doc,attr);
+ char *value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value &&
+ (STRCASEEQ('l','L',"left",value)
+ || STRCASEEQ('r','R',"right",value)
+ || STRCASEEQ('t','T',"top",value)
+ || STRCASEEQ('b','B',"bottom",value)
+ )) {
+ attr_align = value;
+ }
+ }
+ else if (STRCASEEQ('s','S',"style",name) && value && *value) {
+ attr_style = value;
+ }
+ }
+
+ W_L("<h1");
+ if(attr_align){
+ W_L(" align=\"");
+ W_V(attr_align);
+ W_L("\"");
+ }
+ W_L(">");
+
+ return xhtml->out;
+}
+
+
+/**
+ * It is a handler who processes the CAPTION tag.
+ *
+ * @param pdoc [i/o] The pointer to the XHTML structure at the output
+ * destination is specified.
+ * @param node [i] The CAPTION tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char *
+s_xhtml_1_0_end_caption_tag(void *pdoc, Node *UNUSED(child))
+{
+ xhtml_t *xhtml = GET_XHTML(pdoc);
+ Doc *doc = xhtml->doc;
+
+ W_L("</caption>");
+ return xhtml->out;
+}
+
+
/*
* vim:ts=2 et
*/