Added support for name attribute

This commit is contained in:
matic_t
2020-07-16 01:31:16 -07:00
parent a22490c0fc
commit 6f9142b046
4 changed files with 46 additions and 30 deletions

View File

@@ -29,13 +29,17 @@ def export_entry(entry):
headword.appendChild(headword_lemma)
head.appendChild(headword)
homonyms = doc.createElement("homonymy")
headword.appendChild(homonyms)
homonymy = doc.createElement("homonymy")
headword.appendChild(homonymy)
for h in entry.homonymy:
homonymy = doc.createElement("homonymyFeature")
homonymy.textContent = h
homonyms.appendChild(homonymy)
console.log(h)
feature = doc.createElement("homonymyFeature")
feature.textContent = h.value
feature.setAttribute("name", h["name"])
homonymy.appendChild(feature)
console.log(homonymy)
# if({}) works uncorrectly in transcrypt
if len(entry.lexical_unit) > 0: