#NEWLINE# def __init__( self , parser = None , builder = None , name = None , namespace = None , prefix = None , attrs = None , parent = None , previous = None ) : #NEWLINE# #INDENT# 'Basic constructor.' #NEWLINE# if ( parser is None ) : #NEWLINE# #INDENT# self . parser_class = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . parser_class = parser . __class__ #NEWLINE# #UNINDENT# if ( name is None ) : #NEWLINE# #INDENT# raise ValueError ( "No value provided for new tag's name." ) #NEWLINE# #UNINDENT# self . name = name #NEWLINE# self . namespace = namespace #NEWLINE# self . prefix = prefix #NEWLINE# if ( attrs is None ) : #NEWLINE# #INDENT# attrs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( attrs and builder . cdata_list_attributes ) : #NEWLINE# #INDENT# attrs = builder . _replace_cdata_list_attribute_values ( self . name , attrs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# attrs = dict ( attrs ) #NEWLINE# #UNINDENT# #UNINDENT# self . attrs = attrs #NEWLINE# self . contents = [ ] #NEWLINE# self . setup ( parent , previous ) #NEWLINE# self . hidden = False #NEWLINE# if ( builder is not None ) : #NEWLINE# #INDENT# builder . set_up_substitutions ( self ) #NEWLINE# self . can_be_empty_element = builder . can_be_empty_element ( self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . can_be_empty_element = False