diff --git a/prepare_tei.py b/prepare_tei.py index 170ee1f..fccf00c 100644 --- a/prepare_tei.py +++ b/prepare_tei.py @@ -280,7 +280,7 @@ def fix_document_structure(xml_tree): # def fix_document_structure ends here -def fix_tei_header(xml_tree): +def fix_tei_header(xml_tree, bibfile_string): """Populate TEI header with mandatory data""" title_statement = xml_tree.xpath("//t:titleStmt", namespaces=NS_MAP)[0] @@ -296,7 +296,7 @@ def fix_tei_header(xml_tree): # licence_text = etree.SubElement(licence, "p").text = """Distributed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany License.""" source_desc = xml_tree.xpath("//t:sourceDesc", namespaces=NS_MAP)[0] - bibfile = etree.SubElement(source_desc, "listBibl", source=str(args.bibfile), type="monograph") + bibfile = etree.SubElement(source_desc, "listBibl", source=bibfile_string, type="monograph") profile_desc = etree.SubElement(xml_tree, "profileDesc") langusage = etree.SubElement(profile_desc, "langUsage")