diff --git a/eoatex2imxml.py b/eoatex2imxml.py index e9d5b79..57940b6 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2018-08-22 15:24:35 (kthoden)> +# Time-stamp: <2018-08-24 17:17:19 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -1636,7 +1636,9 @@ def cleanup(): upper_div = bib_parent_element.xpath("./ancestor::div1")[0] previous_div0 = upper_div.getparent() -other_content = bib_parent_element.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") +# possible culprit for not finding the index +# other_content = bib_parent_element.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") +other_content = upper_div.xpath(".//EOAtocentry | .//EOAprintpersonindex | .//EOAprintlocationindex | .//EOAprintindex") if len(other_content) > 0: for element in other_content: previous_div0.append(element) diff --git a/imxml2django.py b/imxml2django.py index 7044d03..2b19662 100755 --- a/imxml2django.py +++ b/imxml2django.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2018-08-22 15:44:39 (kthoden)> +# Time-stamp: <2018-08-24 17:37:51 (kthoden)> """ Create an XML file that can be inserted into the Django database @@ -1526,7 +1526,7 @@ def bring_footnote_down_django(footnote, fragment, footnote_number, object_numbe # If EOAprintpersonindex is found, append xml_eoa_print_person_index to xmlEOAdocument # xmlPrintindex = xmlDjangoTree.find(".//EOAprintpersonindex") -xmlPrintindex = xmlTree.find(".//EOAprintpersonindex") +xmlPrintindex = xmlTree.find("//EOAprintpersonindex") if xmlPrintindex is not None != 0: # Remove

from xmlDjangoTree xmlPrintindex.tag = "temp"