diff --git a/modules/intermediate_format/preprocessing.xqm b/modules/intermediate_format/preprocessing.xqm index fbbbd8712deb86e5e6e881e09670709ef6553a37..b2d73a70a72dfaae5af37e0f8ad0307859127d6f 100644 --- a/modules/intermediate_format/preprocessing.xqm +++ b/modules/intermediate_format/preprocessing.xqm @@ -198,9 +198,6 @@ declare function pre:preprocessing case element(pb) return ( let $preceding-sibling := $node/preceding-sibling::node()[1] let $following-sibling := $node/following-sibling::node()[1] - let $following-element := $node/following::*[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/@*, @@ -210,13 +207,6 @@ declare function pre:preprocessing and ( $following-sibling[self::text() and not(normalize-space(.) = '')] and starts-with($following-sibling, " ") = false() ) ) then ( attribute {"break"}{"no"} ) - - (:else if ( - ( $preceeding-sibling[self::text() and not(normalize-space(.) = '')] and ends-with($preceeding-sibling, " ") = true() ) - and - ( $following-sibling[self::text() and not(normalize-space(.) = '')] and starts-with($following-sibling, " ") = true() ) - ) then ( attribute {"clear"}{"left"} ) :) - else if ( ( $preceding-sibling[matches(., "[\s\n\r\t]") and normalize-space(.) = ""] ) and @@ -271,7 +261,7 @@ declare function pre:preprocessing } ) else ( - pre:default-element( $node, pre:preprocessing($node/node()) ) + whitespace:set-additional-whitespace($node) ) ) ) diff --git a/modules/intermediate_format/whitespace-handling.xqm b/modules/intermediate_format/whitespace-handling.xqm index cac89fa012092e91e587c448f83566d30e3408e9..94b6cc28d534da057b909ac26d11958aeca2d990 100644 --- a/modules/intermediate_format/whitespace-handling.xqm +++ b/modules/intermediate_format/whitespace-handling.xqm @@ -38,7 +38,7 @@ declare function whitespace:text if ( not($whitespace-node) or $single-whitespace-between-nodes) then ( if ($escape-char) then ( - whitespace:escape-text($text, "#") + whitespace:escape-text($text, "@") ) else ( whitespace:escape-text($text, " ") ) ) @@ -87,7 +87,7 @@ declare function whitespace:set-additional-whitespace($node as node()) as node() (if($following-node[matches(., "[\s\n\r\t]") and normalize-space(.) = ""] and $following-sibling[self::ref or self::app or self::hi or self::bibl or self::foreign or self::choice or self::milestone or self::persName - or self::choice or self::index]) + or self::choice or self::index or self::seg]) then attribute {"break-after"}{"yes"} else ()),