#NEWLINE# def make_node( self , name , attribs , * content ) : #NEWLINE# #INDENT# if ( name in ( 'Text' , 'ASIS' , 'Fragments' ) ) : #NEWLINE# #INDENT# elemclass = getattr ( POM , name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == '_' ) : #NEWLINE# #INDENT# return NBSP #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == 'JS' ) : #NEWLINE# #INDENT# Scr = self . get_dtd_element ( 'Script' ) #NEWLINE# elem = Scr ( type = 'text/javascript' ) #NEWLINE# for cont in content : #NEWLINE# #INDENT# elem . add_cdata ( cont ) #NEWLINE# #UNINDENT# return elem #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( name == 'code' ) : #NEWLINE# #INDENT# if elemclass : #NEWLINE# #INDENT# return DynamicNode ( content [ 0 ] , ** attribs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return DynamicNode ( content [ 0 ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# elemclass = self . get_dtd_element ( name ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if attribs : #NEWLINE# #INDENT# elem = elemclass ( ** attribs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# elem = elemclass ( ) #NEWLINE# #UNINDENT# for cont in content : #NEWLINE# #INDENT# if isinstance ( cont , ( POM . ElementNode , POM . Text , POM . ASIS ) ) : #NEWLINE# #INDENT# elem . append ( cont ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# elem . add_text ( cont ) #NEWLINE# #UNINDENT# #UNINDENT# return elem