Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Not finished: handling of lists
  • Loading branch information
kthoden committed Jul 19, 2019
1 parent ed7eecd commit 31aaf05
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tei2imxml.py
Expand Up @@ -774,6 +774,22 @@ def handle_refs_hyperimage(ref):
del cell.attrib["role"]
real_table_element.append(row)

#########
# Lists #
#########
eoa_lists = xml_tree.xpath("//t:body//t:list", namespaces=NS_MAP)
for eoalist in eoa_lists:
if eoalist.get("type") == "ordered":
pass
if eoalist.get("type") == "unordered":
pass
if eoalist.get("type") == "gloss":
eoalist.set("type", "description")
items = eoalist.findall("t:item", namespaces=NS_MAP)
for listitem in items:
listitem.tag = "p"
libeoaconvert.wrap_into_element(etree.Element("item"), listitem)

##############
# References #
##############
Expand Down

0 comments on commit 31aaf05

Please sign in to comment.