Commit 0755db3e authored by di68kap's avatar di68kap

- tst_MLW_grammar.py: XML-switch repaired

parent c770ba56
......@@ -18,7 +18,7 @@ SCHREIBWEISE
BEDEUTUNG pannus, faciale, sudarium -- Gesichtstuch, Schweißtuch,
Tuch {(usu liturg.}{de re v. {=> eintrag/ibi_X})}:
Tuch; usu liturg.; de re v.: {=> eintrag/ibi_X}:
* CATAL. thes. Germ.; 28,11 (post 851) "#facitergulum III"
......
......@@ -257,7 +257,7 @@ Sonderbelege {
font-style: italic;
}
Zusatz {
Zusatz, FesterZusatz, FreierZusatz, VariaLectio {
font-style: italic;
}
......
DHParser-submodule @ 75c51cb9
Subproject commit 169128d210baae10b4beb55c113c378063258533
Subproject commit 75c51cb95fdcc33cef0dabda577eb42fdda20c8a
......@@ -473,7 +473,9 @@ MLW_AST_transformation_table = {
"LemmaVariante": [flatten, strip, normalize_wsp_nodes,
collapse_if(not_one_of("Zusatz", "FesterZusatz"), PlainText)],
"LemmaVarianten": [flatten, drop_whitespace],
"GrammatikPosition": [flatten],
"Grammatik": [move_whitespace],
"GrammatikPosition": [flatten, move_whitespace],
"GrammatikVarianten": [move_whitespace],
"GrammatikVariante": [flatten, flatten(is_one_of('Belege')), drop_whitespace],
"wortart": [flatten, move_whitespace, reduce_single_child],
"wa_ergänzung": [flatten, move_whitespace, reduce_single_child],
......@@ -483,9 +485,9 @@ MLW_AST_transformation_table = {
"deklination": [],
"konjugation": [],
"FLEX": [flatten, move_whitespace, reduce_single_child],
"genus": [],
"genus": [move_whitespace],
"nomen, verb, adverb, adjektiv, praeposition": [collapse],
"maskulinum, femininum, neutrum": [reduce_single_child],
"maskulinum, femininum, neutrum": [move_whitespace, reduce_single_child],
"EtymologiePosition": [],
"EtymologieVariante": [],
"EtymologieDetail": [flatten, flatten(is_one_of('Belege'))],
......@@ -1785,7 +1787,7 @@ class AusgabeTransformation(TreeProcessor):
def on_Beleg(self, node):
node = self.fallback_compiler(node)
if not any(nd.tag_name == "Beleg" # or nd.tag_name.find('Position') >= 0
if not any(nd.tag_name in ("Beleg", "GrammatikVarianten")
for nd in self.context[:-1]):
self.abschließender_Punkt(node)
return node
......@@ -1804,12 +1806,13 @@ class AusgabeTransformation(TreeProcessor):
varianten = [gv for gv in node.children if gv.tag_name == "GrammatikVariante"]
if varianten:
self.davor(varianten[0], '(')
self.danach(varianten[-1], ')')
self.danach(varianten[-1], ').')
return node
def on_GVariante(self, node):
node = self.fallback_compiler(node)
return self.danach(node, ': ')
self.unmittelbar_danach(node, ': ')
return node
def on_flexion(self, node):
node = self.trenne(node, 'FLEX', ', ')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment