Commit 5fd3e0f6 authored by mrodzis's avatar mrodzis 🐸
Browse files

Fix bug in whitespace setting (cf. print#62 Schloß- Brauerei)

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