protected void startTag(TagElement tag) throws ChangedCharSetException {
  Element elem=tag.getElement();
  if (!elem.isEmpty() || ((last != null) && !last.breaksFlow()) || (textpos != 0)) {
    handleText(tag);
  }
 else {
    last=tag;
    space=false;
  }
  lastBlockStartPos=currentBlockStartPos;
  for (AttributeList a=elem.atts; a != null; a=a.next) {
    if ((a.modifier == REQUIRED) && ((attributes.isEmpty()) || ((!attributes.isDefined(a.name)) && (!attributes.isDefined(HTML.getAttributeKey(a.name)))))) {
      error("req.att ",a.getName(),elem.getName());
    }
  }
  if (elem.isEmpty()) {
    handleEmptyTag(tag);
  }
 else {
    recent=elem;
    stack=new TagStack(tag,stack);
    handleStartTag(tag);
  }
}

protected void startTag ( TagElement tag ) throws ChangedCharSetException { Element elem = tag . getElement ( ) ; if ( ! elem . isEmpty ( ) || ( ( last != null ) && ! last . breaksFlow ( ) ) || ( textpos != 0 ) ) { handleText ( tag ) ; } else { last = tag ; space = false ; } lastBlockStartPos = currentBlockStartPos ; for ( AttributeList a = elem . atts ; a != null ; a = a . next ) { if ( ( a . modifier == REQUIRED ) && ( ( attributes . isEmpty ( ) ) || ( ( ! attributes . isDefined ( a . name ) ) && ( ! attributes . isDefined ( HTML . getAttributeKey ( a . name ) ) ) ) ) ) { error ( "req.att " , a . getName ( ) , elem . getName ( ) ) ; } } if ( elem . isEmpty ( ) ) { handleEmptyTag ( tag ) ; } else { recent = elem ; stack = new TagStack ( tag , stack ) ; handleStartTag ( tag ) ; } }
handle a start tag . the new tag is pushed onto the tag stack . the attribute list is checked for required attributes .
