Fix array out of bounds error for text content
I hope this doesn't double texts
Change-Id: Ibb9f0ef6ef388fbeac50851c0735e7d8757f78ff
diff --git a/nor2tei.py b/nor2tei.py
index 5c67bdc..2a28da5 100644
--- a/nor2tei.py
+++ b/nor2tei.py
@@ -48,7 +48,7 @@
uris = root.find(".//*{http://www.tei-c.org/ns/1.0}bibl/{http://www.tei-c.org/ns/1.0}pubPlace")
authors = root.find(".//*{http://www.tei-c.org/ns/1.0}bibl/{http://www.tei-c.org/ns/1.0}author")
dates = root.find(".//*{http://www.tei-c.org/ns/1.0}bibl/{http://www.tei-c.org/ns/1.0}date")
- texts = root.findall(".//*{http://www.tei-c.org/ns/1.0}body/{http://www.tei-c.org/ns/1.0}div")
+ texts = root.findall(".//*{http://www.tei-c.org/ns/1.0}body/{http://www.tei-c.org/ns/1.0}div")
domains = root.find(".//*[@type]")
# Count text elements
@@ -58,6 +58,7 @@
for div in body:
number_of_texts+=1
+ number_of_texts = len(texts)
# Remove all elements from root
for elem in root.findall("*"):
root.remove(elem)