#NEWLINE# def handle_starttag( self , tag , attrs , use_dtd = True ) : #NEWLINE# #INDENT# if ( tag == 'html' ) : #NEWLINE# #INDENT# import pdb #NEWLINE# #UNINDENT# a = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , value ) in attrs : #NEWLINE# #INDENT# if ( key in ( 'class' , 'id' ) ) : #NEWLINE# #INDENT# value = value . lower ( ) #NEWLINE# #UNINDENT# a [ key ] = value #NEWLINE# #UNINDENT# attrs = a #NEWLINE# if ( use_dtd and ( self . current_dtd . children is not DTDElement . ANY ) ) : #NEWLINE# #INDENT# self . current_dtd . apply_missing_start_tags ( tag , self ) #NEWLINE# #UNINDENT# if ( ( tag in self . force_close ) and ( self . tag_stack [ ( - 1 ) ] == tag ) ) : #NEWLINE# #INDENT# self . handle_endtag ( tag ) #NEWLINE# #UNINDENT# self . tag_stack . append ( tag ) #NEWLINE# self . builder . begin_element ( tag , attrs ) #NEWLINE# if ( tag in self . force_empty ) : #NEWLINE# #INDENT# self . handle_endtag ( tag )