Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove some rend tags from paragraphs
  • Loading branch information
Klaus Thoden committed Nov 22, 2018
1 parent 1b7310b commit 9e5bcbd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fix_tei.py
Expand Up @@ -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
Expand Down

0 comments on commit 9e5bcbd

Please sign in to comment.