#NEWLINE# def handle_header( self , elt , context ) : #NEWLINE# #INDENT# titles = elt . findall ( 'titleStmt/title' ) #NEWLINE# if titles : #NEWLINE# #INDENT# self . title = '\n' . join ( ( title . text . strip ( ) for title in titles ) ) #NEWLINE# #UNINDENT# authors = elt . findall ( 'titleStmt/author' ) #NEWLINE# if authors : #NEWLINE# #INDENT# self . author = '\n' . join ( ( author . text . strip ( ) for author in authors ) ) #NEWLINE# #UNINDENT# editors = elt . findall ( 'titleStmt/editor' ) #NEWLINE# if editors : #NEWLINE# #INDENT# self . editor = '\n' . join ( ( editor . text . strip ( ) for editor in editors ) ) #NEWLINE# #UNINDENT# resps = elt . findall ( 'titleStmt/respStmt' ) #NEWLINE# if resps : #NEWLINE# #INDENT# self . resps = '\n\n' . join ( ( '\n' . join ( ( resp_elt . text . strip ( ) for resp_elt in resp ) ) for resp in resps ) )