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

Improve sorting

parent 6db34b63
......@@ -40,6 +40,21 @@ declare function presort:sort($nodes as node()*) as node()* {
()
case element(tei:rs) return
if($node[@next and not(child::*)]) then
let $next-node := presort:find-corresp-node($node, "next")
return
if($next-node[not(child::*)]) then
($node, $next-node)
else
presort:exclude-copied($node)
else if($node[@prev and not(child::*)]) then
let $prev-node := presort:find-corresp-node($node, "prev")
return
if($prev-node[not(child::*)]) then
()
else
presort:exclude-copied($node)
else
presort:exclude-copied($node)
default return
......
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