Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
a03afc98
Commit
a03afc98
authored
Jan 07, 2019
by
mrodzis
🌿
Browse files
Fix bug in index sorting (closes print#67)
parent
a63d491e
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimpleprint/tei2teisimple.xqm
View file @
a03afc98
...
@@ -962,15 +962,21 @@ $index-type as xs:string) as element()* {
...
@@ -962,15 +962,21 @@ $index-type as xs:string) as element()* {
element {QName("http://www.tei-c.org/ns/1.0", "term")} {
element {QName("http://www.tei-c.org/ns/1.0", "term")} {
attribute type {"key"},
attribute type {"key"},
let $main := index-info:get-info-about($index-type, $ref, "regular-name")
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 :=
let $key :=
replace($
main
, "Ä", "A")
replace($
name
, "Ä", "A")
=> replace("ä", "a")
=> replace("ä", "a")
=> replace("Ö", "O")
=> replace("Ö", "O")
=> replace("ö", "o")
=> replace("ö", "o")
=> replace("Ü", "U")
=> replace("Ü", "U")
=> replace("ü", "u")
=> replace("ü", "u")
=> replace(" ", "")
=> replace(" ", "")
=> replace("\.", "")
return
return
(: sorts terms with a trailer, e.g. 'Friederich II. von Sachsen' after the ones
(: sorts terms with a trailer, e.g. 'Friederich II. von Sachsen' after the ones
without, e.g. 'Friederich II.' :)
without, e.g. 'Friederich II.' :)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment