diff --git a/fix_tei.py b/fix_tei.py index 1797f93..f537f37 100644 --- a/fix_tei.py +++ b/fix_tei.py @@ -361,7 +361,7 @@ def cleanup_xml(xml_tree): for attribute in xml_preserve: attribute.attrib.pop("{http://www.w3.org/XML/1998/namespace}space") - formulae = xmltree.xpath("//t:formula", namespaces=NS_MAP) + formulae = xml_tree.xpath("//t:formula", namespaces=NS_MAP) logging.info(f"Found {len(formulae)} formulae.") for formula in formulae: