From 77f67d10f0b341d5f08309fa00616a4658d313cb Mon Sep 17 00:00:00 2001 From: Michelle Rodzis <rodzis@sub.uni-goettingen.de> Date: Wed, 28 Feb 2018 12:27:19 +0100 Subject: [PATCH] default process is enough to achieve correct serialization of a Leittextwechsel --- modules/intermediate_format/markerset.xqm | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/modules/intermediate_format/markerset.xqm b/modules/intermediate_format/markerset.xqm index 4a9f0fc..c260317 100644 --- a/modules/intermediate_format/markerset.xqm +++ b/modules/intermediate_format/markerset.xqm @@ -17,7 +17,7 @@ declare default element namespace "http://www.tei-c.org/ns/1.0"; (:~ : markerset:collect-markers() : This function collect markers for a given reading. - : It destinguishes tei:lem and tei:rdg. In case of tei:lem it collects all sibling tei:rdgs. In case of tei:rdg it collect itself. + : It distinguishes tei:lem and tei:rdg. In case of tei:lem it collects all sibling tei:rdgs. In case of tei:rdg it collects itself. : : @param $reading the reading node to collect readings for : @return node() representing a markerset of readings for the given node @@ -31,9 +31,9 @@ declare function markerset:collect-markers let $markers := ( if ($reading[self::lem]) then ( - (: In case of tei:lem ignore all siglae for types "typo_corr", "invisible-ref", "varying-target" :) + (: In case of tei:lem ignore all sigla for types "typo-correction", "invisible-ref", "varying-target" :) attribute {"count"}{count($reading/following-sibling::rdg)}, - for $sibling in $reading/following-sibling::rdg[ not(@type="typo_corr" or @type="invisible-ref" or @type="varying-target") ] + for $sibling in $reading/following-sibling::rdg[ not(@type="typo-correction" or @type="invisible-ref" or @type="varying-target") ] return( element {name($sibling)} { $sibling/@*, @@ -42,22 +42,10 @@ declare function markerset:collect-markers ) ) else if ($reading[self::rdg]) then ( - (: Preparing "Leittextwechsel" :) - if ($reading[@type = "ppl" or @type = "pp"][descendant::lem[@wit]]) then ( - let $children-readings := $reading/descendant::rdg - return( - element {name($reading)} { - $reading/@*, - attribute {"context"}{"changed-lem ", data($children-readings/@wit)} - } - ) - ) - else ( element {name($reading)} { $reading/@*, attribute {"context"}{"rdg"} } - ) ) else () ) -- GitLab