From bfc4bd1cbc28cf6da37119b1c64ea218ab403ffc Mon Sep 17 00:00:00 2001 From: Michelle Rodzis <rodzis@sub.uni-goettingen.de> Date: Wed, 28 Feb 2018 12:28:34 +0100 Subject: [PATCH] deleted unused variables, added types --- modules/intermediate_format/whitespace-handling.xqm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/intermediate_format/whitespace-handling.xqm b/modules/intermediate_format/whitespace-handling.xqm index 485d513..cd2a09e 100644 --- a/modules/intermediate_format/whitespace-handling.xqm +++ b/modules/intermediate_format/whitespace-handling.xqm @@ -9,7 +9,6 @@ xquery version "3.0"; : @author Uwe Sikora :) module namespace whitespace="http://bdn-edition.de/intermediate_format/whitespace_handling"; -import module namespace pre="http://bdn-edition.de/intermediate_format/preprocessing" at "preprocessing.xqm"; declare default element namespace "http://www.tei-c.org/ns/1.0"; @@ -31,7 +30,6 @@ declare default element namespace "http://www.tei-c.org/ns/1.0"; declare function whitespace:text ( $text as text()*, $escape-char as xs:string? ) as text()* { - let $normalized := normalize-space($text) let $whitespace-node := $text[matches(., "[\s\n\r\t]") and normalize-space(.) = ""] let $single-whitespace-between-nodes := $text = ' ' return @@ -61,7 +59,7 @@ declare function whitespace:text : @author Uwe Sikora :) declare function whitespace:escape-text - ( $text, $escape as xs:string ) as text()* { + ($text as text()*, $escape as xs:string) as text()* { text {replace($text, '[\s]+', $escape)} }; -- GitLab