src/chxj_chtml20.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_chtml20_start_select_tag(void *pdoc, Node *child)
{
  chtml20_t   *chtml20;
  Doc         *doc;
  request_rec *r;
  Attr        *attr;
  chtml20 = GET_CHTML20(pdoc);
  doc     = chtml20->doc;
  r       = doc->r;
  char *size      = NULL;
  char *name      = NULL;
  char *multiple  = NULL;
  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);
    switch(*nm) {
    case 's':
    case 'S':
      if (strcasecmp(nm, "size") == 0) {
        size = apr_pstrdup(doc->buf.pool, val);
      }
      break;
    case 'n':
    case 'N':
      if (strcasecmp(nm, "name") == 0) {
        name = apr_pstrdup(doc->buf.pool, val);
      }
      break;
    case 'm':
    case 'M':
      if (strcasecmp(nm, "multiple") == 0) {
        multiple = apr_pstrdup(doc->buf.pool, val);
      }
      break;
    default:
      break;
    }
  }
  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 chtml20->out;
}
static char * s_chtml20_start_select_tag ( void * pdoc , Node * child ) { chtml20_t * chtml20 ; Doc * doc ; request_rec * r ; Attr * attr ; chtml20 = GET_CHTML20 ( pdoc ) ; doc = chtml20 -> doc ; r = doc -> r ; char * size = NULL ; char * name = NULL ; char * multiple = 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 ) ; switch ( * nm ) { case ' ' : case ' ' : if ( strcasecmp ( nm , " " ) == 0 ) { size = apr_pstrdup ( doc -> buf . pool , val ) ; } break ; case ' ' : case ' ' : if ( strcasecmp ( nm , " " ) == 0 ) { name = apr_pstrdup ( doc -> buf . pool , val ) ; } break ; case ' ' : case ' ' : if ( strcasecmp ( nm , " " ) == 0 ) { multiple = apr_pstrdup ( doc -> buf . pool , val ) ; } break ; default : break ; } } 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 chtml20 -> 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                                              */ /*--------------------------------------------------------------------*/