src/chxj_chtml50.c
/**
 * It is a handler who processes the SELECT tag.
 *
 * @param pdoc  [i/o] The pointer to the CHTML structure at the output
 *                     destination is specified.
 * @param node   [i]   The SELECT tag node is specified.
 * @return The conversion result is returned.
 */
It is a handler who processes the SELECT tag.
@param pdoc  [i/o] The pointer to the CHTML structure at the output
destination is specified.
@param node   [i]   The SELECT tag node is specified.
@return The conversion result is returned.
It is a handler who processes the SELECT tag . @param pdoc [ i / o ] The pointer to the CHTML structure at the output destination is specified . @param node [ i ] The SELECT tag node is specified . @return The conversion result is returned .
static char *
s_chtml50_start_select_tag(void *pdoc, Node *child)
{
  chtml50_t   *chtml50  = GET_CHTML50(pdoc);
  Doc         *doc      = chtml50->doc;
  char        *size     = NULL;
  char        *name     = NULL;
  char        *multiple = NULL;
  Attr        *attr;
  W_L("<select");
  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('s','S',"size", nm)) {
      size = apr_pstrdup(doc->buf.pool, val);
    }
    else if (STRCASEEQ('n','N',"name", nm)) {
      name = apr_pstrdup(doc->buf.pool, val);
    }
    else if (STRCASEEQ('m','M',"multiple", nm)) {
      multiple = apr_pstrdup(doc->buf.pool, val);
    }
  }
  if (size && *size) {
    W_L(" size=\"");
    W_V(size);
    W_L("\"");
  }
  if (name && *name) {
    W_L(" name=\"");
    W_V(name);
    W_L("\"");
  }
  if (multiple) {
    W_L(" multiple");
  }
  W_L(">");
  return chtml50->out;
}
static char * s_chtml50_start_select_tag ( void * pdoc , Node * child ) { chtml50_t * chtml50 = GET_CHTML50 ( pdoc ) ; Doc * doc = chtml50 -> doc ; char * size = NULL ; char * name = NULL ; char * multiple = NULL ; Attr * attr ; 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 ) ) { size = apr_pstrdup ( doc -> buf . pool , val ) ; } else if ( STRCASEEQ ( ' ' , ' ' , " " , nm ) ) { name = apr_pstrdup ( doc -> buf . pool , val ) ; } else if ( STRCASEEQ ( ' ' , ' ' , " " , nm ) ) { multiple = apr_pstrdup ( doc -> buf . pool , val ) ; } } if ( size && * size ) { W_L ( " \" " ) ; W_V ( size ) ; W_L ( " \" " ) ; } if ( name && * name ) { W_L ( " \" " ) ; W_V ( name ) ; W_L ( " \" " ) ; } if ( multiple ) { W_L ( " " ) ; } W_L ( " " ) ; return chtml50 -> out ; }
It is a handler who processes the SELECT tag.
It is a handler who processes the SELECT tag .
/*----------------------------------------------------------------------*/ /* CHTML 1.0 version 2.0                                                */ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ /* CHTML 1.0 version 2.0                                                */ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ /* CHTML 1.0 version 2.0                                                */ /*----------------------------------------------------------------------*/