Commit e9d6c600 authored by mrodzis's avatar mrodzis 🌿
Browse files

Exclude underlined tei:seg from presorting

parent b7e02afa
...@@ -43,9 +43,11 @@ declare function presort:sort($nodes as node()*) as node()* { ...@@ -43,9 +43,11 @@ declare function presort:sort($nodes as node()*) as node()* {
presort:exclude-copied($node) presort:exclude-copied($node)
default return default return
if($node/@next and not($node/@prev)) then if(($node/@next and not($node/@prev))
(presort:apply-all-nexts($node)) and not(matches($node/@style, "underline"))) then
else if($node/@prev or $node/@next) then presort:apply-all-nexts($node)
else if(($node/@prev or $node/@next)
and not(matches($node/@style, "underline"))) then
let $prev-node := presort:find-corresp-node($node, "prev") let $prev-node := presort:find-corresp-node($node, "prev")
let $next-node := presort:find-corresp-node($node, "next") let $next-node := presort:find-corresp-node($node, "next")
return return
...@@ -111,7 +113,8 @@ declare function presort:exclude-copied($node as node()) as element(tei:rs) { ...@@ -111,7 +113,8 @@ declare function presort:exclude-copied($node as node()) as element(tei:rs) {
let $rs-children := $node/node() let $rs-children := $node/node()
let $processed-children := let $processed-children :=
for $child in $rs-children return for $child in $rs-children return
if($child/@next) then if($child/@next
and not(matches($child/@style, "underline"))) then
presort:apply-all-nexts($child) presort:apply-all-nexts($child)
else if($child/@prev) then else if($child/@prev) then
() ()
......
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