Permalink
Browse files

Remove some rend tags from paragraphs

  • Loading branch information...
kthoden committed Nov 22, 2018
1 parent 1b7310b commit 9e5bcbde0e10849f500088b8e8f958a1ffeea2bf
Showing with 4 additions and 0 deletions.
  1. +4 −0 fix_tei.py
@@ -328,6 +328,10 @@ def cleanup_xml(xml_tree):
for footnote in footnotes:
footnote.set("place", "bottom")

paragraphs = xml_tree.xpath("//t:p[contains(@rend, 'Text') or contains(@rend, 'Footnote')]", namespaces=NS_MAP)
for paragraph in paragraphs:
paragraph.attrib.pop("rend")

etree.strip_tags(xml_tree, "tagtobestripped")

return xml_tree

0 comments on commit 9e5bcbd

Please sign in to comment.