src/chxj_chtml10.c
/**
 * It is a handler who processes the DIV tag.
 *
 * @param pdoc  [i/o] The pointer to the CHTML structure at the output
 *                     destination is specified.
 * @param node   [i]   The DIV tag node is specified.
 * @return The conversion result is returned.
 */
It is a handler who processes the DIV tag.
@param pdoc  [i/o] The pointer to the CHTML structure at the output
destination is specified.
@param node   [i]   The DIV tag node is specified.
@return The conversion result is returned.
It is a handler who processes the DIV tag . @param pdoc [ i / o ] The pointer to the CHTML structure at the output destination is specified . @param node [ i ] The DIV tag node is specified . @return The conversion result is returned .
static char *
s_chtml10_start_div_tag(void *pdoc, Node *child)
{
  chtml10_t   *chtml10;
  Doc         *doc;
  request_rec *r;
  Attr        *attr;
  char        *align;
  chtml10 = GET_CHTML10(pdoc);
  doc     = chtml10->doc;
  r       = doc->r;
  align   = NULL;
  W_L("<div");
  for (attr = qs_get_attr(doc,child);
       attr;
       attr = qs_get_next_attr(doc,attr)) {
    char *nm  = qs_get_attr_name(doc,attr);
    char *val = qs_get_attr_value(doc,attr);
    if (STRCASEEQ('a','A',"align", nm)) {
      if (val && (STRCASEEQ('l','L',"left",val) || STRCASEEQ('r','R',"right",val) || STRCASEEQ('c','C',"center",val))) {
        align = apr_pstrdup(doc->buf.pool, val);
      }
    }
  }
  if (align) {
    W_L(" align=\"");
    W_V(align);
    W_L("\"");
  }
  W_L(">");
  return chtml10->out;
}
static char * s_chtml10_start_div_tag ( void * pdoc , Node * child ) { chtml10_t * chtml10 ; Doc * doc ; request_rec * r ; Attr * attr ; char * align ; chtml10 = GET_CHTML10 ( pdoc ) ; doc = chtml10 -> doc ; r = doc -> r ; align = NULL ; W_L ( " " ) ; for ( attr = qs_get_attr ( doc , child ) ; attr ; attr = qs_get_next_attr ( doc , attr ) ) { char * nm = qs_get_attr_name ( doc , attr ) ; char * val = qs_get_attr_value ( doc , attr ) ; if ( STRCASEEQ ( ' ' , ' ' , " " , nm ) ) { if ( val && ( STRCASEEQ ( ' ' , ' ' , " " , val ) || STRCASEEQ ( ' ' , ' ' , " " , val ) || STRCASEEQ ( ' ' , ' ' , " " , val ) ) ) { align = apr_pstrdup ( doc -> buf . pool , val ) ; } } } if ( align ) { W_L ( " \" " ) ; W_V ( align ) ; W_L ( " \" " ) ; } W_L ( " " ) ; return chtml10 -> out ; }
It is a handler who processes the DIV tag.
It is a handler who processes the DIV tag .
/*----------------------------------------------------------------------*/ /* CHTML 1.0 (W3C version 3.2)                                          */ /*----------------------------------------------------------------------*/