Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Footnotes
  • Loading branch information
Klaus Thoden committed May 29, 2018
1 parent 0338824 commit 3b12541
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tei2imxml.py
Expand Up @@ -469,7 +469,11 @@ def transform_body(xml_tree, cited_data, publang):

fn_parent = footnote.getparent()
# we assert here that the parent of a footnote is always a paragraph
assert(fn_parent.tag == "p")
footnote_id = footnote.xpath("@xml:id")[0]

if fn_parent.tag != "p":
print("This footnote's parent is not a p element: %s. Exiting." % footnote_id)
sys.exit()

fn_paragraphs = footnote.xpath("t:p", namespaces=NS_MAP)
for fn_paragraph in fn_paragraphs:
Expand Down

0 comments on commit 3b12541

Please sign in to comment.