Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
b7e02afa
Commit
b7e02afa
authored
Nov 16, 2018
by
mrodzis
💪
Browse files
Adapt whitespace handling
parent
37911e67
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimpleprint/tidysimple.xqm
View file @
b7e02afa
...
...
@@ -327,26 +327,10 @@ 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"))
and ($node/following::*[. << $target][self::tei:milestone[@unit = "line"]]
or $target/following::*[. << $node][self::tei:milestone[@unit = "line"]])) then
if(not(ends-with($node//text()[last()], "@P"))) then
attribute break {"true"}
else
(),
if($node/following::text()[. << $target][not(normalize-space(.) = "")]
or $target/following::text()[. << $node][not(normalize-space(.) = "")]) then
attribute text-inbetween {"true"}
else
())
else if($node/@prev) then
let $target-id := replace($node/@prev, "#", "")
let $target := $node/ancestor::tei:text//*[@xml:id = $target-id]
return
if($node/following::text()[. << $target][not(normalize-space(.) = "")]
or $target/following::text()[. << $node][not(normalize-space(.) = "")]) then
attribute text-inbetween {"true"}
else
()
()
else
(),
tidySimple:whitespaces($node/node())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment