CSSElement(String name){
  setTagId(TAG_CSS_SELECTOR);
  int index=name.indexOf('[');
  String tagName=name;
  if (index != -1) {
    tagName=name.substring(0,index);
    if (HTMLComponent.PROCESS_HTML_MP1_ONLY) {
      setTagId(TAG_CSS_ILLEGAL_SELECTOR);
    }
 else {
      while (index != -1) {
        int endIndex=name.indexOf(']');
        if ((endIndex != -1) && (endIndex > index + 1)) {
          String str=name.substring(index + 1,endIndex);
          addAttributeSelection(str);
        }
 else {
          setTagId(TAG_CSS_ILLEGAL_SELECTOR);
          break;
        }
        name=name.substring(endIndex + 1);
        index=name.indexOf('[');
      }
    }
  }
  setTagName(tagName);
  for (int i=0; i <= LAST_CSS_PROPERTY_INDEX; i++) {
    attrVals[i]=-1;
  }
}

CSSElement ( String name ) { setTagId ( TAG_CSS_SELECTOR ) ; int index = name . indexOf ( '[' ) ; String tagName = name ; if ( index != - 1 ) { tagName = name . substring ( 0 , index ) ; if ( HTMLComponent . PROCESS_HTML_MP1_ONLY ) { setTagId ( TAG_CSS_ILLEGAL_SELECTOR ) ; } else { while ( index != - 1 ) { int endIndex = name . indexOf ( ']' ) ; if ( ( endIndex != - 1 ) && ( endIndex > index + 1 ) ) { String str = name . substring ( index + 1 , endIndex ) ; addAttributeSelection ( str ) ; } else { setTagId ( TAG_CSS_ILLEGAL_SELECTOR ) ; break ; } name = name . substring ( endIndex + 1 ) ; index = name . indexOf ( '[' ) ; } } } setTagName ( tagName ) ; for ( int i = 0 ; i <= LAST_CSS_PROPERTY_INDEX ; i ++ ) { attrVals [ i ] = - 1 ; } }
constructs a csselement , this basically sets the name and id and resets the attrvals array .
