Commit a03afc98 authored by mrodzis's avatar mrodzis 🌎
Browse files

Fix bug in index sorting (closes print#67)

parent a63d491e
......@@ -962,15 +962,21 @@ $index-type as xs:string) as element()* {
element {QName("http://www.tei-c.org/ns/1.0", "term")} {
attribute type {"key"},
let $main := index-info:get-info-about($index-type, $ref, "regular-name")
let $affix := substring-after($main, "\.")
let $name :=
if(contains($main, ".")) then
substring-before($main, ".")
else
$main
let $affix := substring-after($main, ".")
let $key :=
replace($main, "Ä", "A")
replace($name, "Ä", "A")
=> replace("ä", "a")
=> replace("Ö", "O")
=> replace("ö", "o")
=> replace("Ü", "U")
=> replace("ü", "u")
=> replace(" ", "")
=> replace("\.", "")
return
(: sorts terms with a trailer, e.g. 'Friederich II. von Sachsen' after the ones
without, e.g. 'Friederich II.' :)
......
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