Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
59dd5a7d
Commit
59dd5a7d
authored
Aug 05, 2019
by
mrodzis
💪
Browse files
Remember lines when sorting
parent
f48e58bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/edited-text/sort.xqm
View file @
59dd5a7d
...
...
@@ -170,6 +170,13 @@ declare function fsort:apply-all-nexts($node as node(), $log as xs:string) as no
return
if(count($next-node) = 1) then
(fsort:keep-node($node, "sort", $log),
(: check if the parts are in different lines :)
if($node/ancestor::tei:line = $next-node/ancestor::tei:line) then
()
else
element tei:milestone {
attribute unit {"line"}
},
fsort:apply-all-nexts($next-node, $log))
else if(not($next-node)) then
fsort:add-log-entry($log, "No next node found for " || $node/@next)
...
...
@@ -189,6 +196,13 @@ declare function fsort:apply-all-nexts($node as node(), $log as xs:string) as no
if(count($next-node) = 1) then
($prev-handshift,
fsort:keep-node($node, "sort", $log),
(: check if the parts are in different lines :)
if($node/ancestor::tei:line = $next-node/ancestor::tei:line) then
()
else
element tei:milestone {
attribute unit {"line"}
},
fsort:apply-all-nexts($next-node, $log))
else if(not($next-node)) then
fsort:add-log-entry($log, "No next node found for " || $node/@next)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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