Commit 4753d4f5 authored by mrodzis's avatar mrodzis 🌎
Browse files

Improve whitespace handling (cf. print#44)

parent 519e4d6f
......@@ -328,10 +328,13 @@ declare function tidySimple:whitespaces($nodes as node()*) as node()* {
let $target-id := replace($node/@next, "#", "")
let $target := $node/ancestor::tei:text//*[@xml:id = $target-id]
return
if(not(ends-with($node//text()[last()], "@P"))) then
attribute break {"true"}
else
if(ends-with($node//text()[last()], "@P")
(: example: C6 Kapell:drf. :)
or $node[self::tei:abbr][ends-with(., ":")]
or $node[self::tei:rs]/tei:choice[not(following-sibling::*)][tei:abbr[ends-with(., ":")]]) then
()
else
attribute break {"true"}
else
(),
tidySimple:whitespaces($node/node())
......
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