Skip to content
Snippets Groups Projects
Commit 5f425c17 authored by usikora's avatar usikora :monkey:
Browse files

tei:pb[@break='no'] just in cases it is deviding an orthographic unit. new...

tei:pb[@break='no'] just in cases it is deviding an orthographic unit. new flag @break='yes' in case it should break
parent fb0aa61a
No related branches found
No related tags found
No related merge requests found
......@@ -188,20 +188,23 @@ declare function pre:preprocessing
case element(pb) return (
let $preceeding-sibling := $node/preceding-sibling::node()[1]
let $following-sibling := $node/following-sibling::node()[1]
let $first := $node = $node/parent::node()/node()[not(self::text() and normalize-space(self::node()) = '')][1]
let $ignore := ("docAuthor", "app", "index", "seg", "bibl")
return
element {$node/name()}{
$node/@*,
if ( ends-with($preceeding-sibling, " ") eq false() and starts-with($following-sibling, " ") eq false() ) then (
attribute {"break"}{"no"}
) else ( )(:,
attribute {"whitespace"}{
if (ends-with($preceeding-sibling, " ")) then (
"before"
) else (),
if (starts-with($following-sibling, " ")) then (
"after"
) else ()
}:)
if (
( $preceeding-sibling[self::text() and not(normalize-space(.) = '')] and ends-with($preceeding-sibling, " ") = false() )
and
( $following-sibling[self::text() and not(normalize-space(.) = '')] and starts-with($following-sibling, " ") = false() )
) then ( attribute {"break"}{"no"} )
else if ( $following-sibling[self::docAuthor or self::app or self::index or self::seg or self::bibl] ) then (
attribute {"break"}{"yes"}
)
else ( )
}
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment