remove saving original from grammar
This commit is contained in:
parent
04c8bc1471
commit
76c80baa09
|
@ -57,17 +57,12 @@ def export_entry(entry):
|
||||||
lexunit.appendChild(lexeme)
|
lexunit.appendChild(lexeme)
|
||||||
head.appendChild(lexunit)
|
head.appendChild(lexunit)
|
||||||
|
|
||||||
# Example of keeping original xml and adding changes to it only
|
|
||||||
grammar_category = entry.original_xml.querySelector("head grammar category")
|
|
||||||
if grammar_category is None:
|
|
||||||
grammar = doc.createElement("grammar")
|
grammar = doc.createElement("grammar")
|
||||||
grammar_category = doc.createElement("category")
|
grammar_category = doc.createElement("category")
|
||||||
grammar.appendChild(grammar_category)
|
|
||||||
entry.original_xml.querySelector("head").appendChild(grammar_category)
|
|
||||||
|
|
||||||
grammar_category.textContent = entry.grammar
|
grammar_category.textContent = entry.grammar
|
||||||
|
grammar.appendChild(grammar_category)
|
||||||
head.appendChild(entry.original_xml.querySelector("head grammar"))
|
head.appendChild(grammar)
|
||||||
|
|
||||||
|
|
||||||
if len(entry.measure) > 0:
|
if len(entry.measure) > 0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user