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

Improve sorting

parent 6db34b63
...@@ -40,7 +40,22 @@ declare function presort:sort($nodes as node()*) as node()* { ...@@ -40,7 +40,22 @@ declare function presort:sort($nodes as node()*) as node()* {
() ()
case element(tei:rs) return case element(tei:rs) return
presort:exclude-copied($node) 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 default return
if(($node/@next and not($node/@prev)) if(($node/@next and not($node/@prev))
......
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