Gitlab Community Edition Instance

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

Merge branch 'develop' into 'main'

fix: minors

See merge request subugoe/ahiqar/backend!209
parents d4f5f664 2020be6e
Branches
No related tags found
No related merge requests found
Pipeline #247027 passed
project.name=https://ahikar-test.sub.uni-goettingen.de/
project.version=7.7.1
project.version=7.7.2
project.title=Ahiqar
project.abbrev=ahikar-test
project.processorversion=5.3.0
......
......@@ -36,15 +36,20 @@ as map()* {
tei:add |
tei:del |
tei:damage |
tei:choice |
tei:choice[not(parent::tei:damage)] |
tei:unclear |
tei:cit[tei:bibl] |
tei:surplus
(: | 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)
let $value := string($map("body")("value"))
(: remove empty value annotations :)
where $value ne ""
return
$map
};
declare function edit:make-map($annotation as element(),
......@@ -106,9 +111,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
......@@ -122,8 +127,7 @@ as xs:string {
"a damaged passage. legible text: " || $text
case element(tei:choice) return
if ($annotation/parent::tei:damage) then () (: skip damage here :)
else if($annotation/tei:sic) then
if($annotation/tei:sic) then
let $resp :=
if ($annotation/tei:corr/@resp) then
"by the editor"
......@@ -163,6 +167,7 @@ as xs:string {
()
return
(: normalize space of an empty sequence will return an empty string! :)
normalize-space($value)
};
......
......@@ -78,8 +78,8 @@ as map() {
};
declare
%test:args("sample_teixml", "83b") %test:assertXPath("count($result) = 80")
%test:args("sample_syriac_teixml", "86r") %test:assertXPath("count($result) = 9")
%test:args("sample_teixml", "83b") %test:assertXPath("count($result) ge 70")
%test:args("sample_syriac_teixml", "86r") %test:assertXPath("count($result) ge 7")
function t:get-annotations($teixml-uri as xs:string,
$page as xs:string)
as map()+ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment