from lxml import etree
from lxml.etree import tostring
+list_topic = False
+
filemakerxml = 'meksme-utf8.xml'
tree = etree.parse(filemakerxml)
if lang and '[' not in w:
w += "[%s]" % lang
entry.append(E.indexterm(E.primary(w)))
- glossary = E.glosslist()
+ glossary = E.glossary()
for e in sorted(words, key=lambda x: langsort(lang, x)):
ldesc = 'desc-%s' % lang
if 'topic' in e and lang in topicmap:
e['topic'] = topicmap[lang][e['topic']]
if lang in e:
entry = E.glossentry()
- if 'topic' in e:
+ if list_topic and 'topic' in e:
entry.append(E.glossterm('%s [%s]' % (e[lang], e['topic'])))
else:
entry.append(E.glossterm(e[lang]))