Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit ea45db66 authored by Mathias Goebel's avatar Mathias Goebel
Browse files

fix: orig and damage mix annotations

closes #246
ci-reimport-files
parent b342ca35
Branches
No related tags found
No related merge requests found
Pipeline #246642 failed
......@@ -43,8 +43,12 @@ as map()* {
(: | tei:quote # remove quotations :)
)
for $annotation in $annotation-elements return
edit:make-map($annotation, $teixml-uri)
for $annotation in $annotation-elements
let $map := edit:make-map($annotation, $teixml-uri)
(: remove empty value annotations :)
where $map("body")("value") ne ""
return
$map
};
declare function edit:make-map($annotation as element(),
......@@ -106,9 +110,9 @@ as xs:string {
case element(tei:damage) return
if ($annotation/tei:choice/tei:orig and $annotation/tei:choice/tei:supplied) then
"a damaged passage. original: " || $annotation/tei:orig || ", supplied text: " || $annotation/tei:supplied
"a damaged passage. original: " || $annotation//tei:orig || ", supplied text: " || $annotation//tei:supplied
else if ($annotation/tei:choice/tei:orig and $annotation/tei:choice/tei:corr) then
"a damaged passage. original: " || $annotation/tei:orig || ", corrected text: " || $annotation/tei:corr
"a damaged passage. original: " || $annotation//tei:orig || ", corrected text: " || $annotation//tei:corr
else if ($annotation/text()[matches(., "[\w]")]) then
"a damaged passage. legible text: " || $annotation
else if ($annotation/tei:g) then
......@@ -163,6 +167,7 @@ as xs:string {
()
return
(: normalize space of an empty sequence will return an empty string! :)
normalize-space($value)
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment