Skip to content
Snippets Groups Projects
Commit 4b38b4d9 authored by MRodz's avatar MRodz
Browse files

Undo changes (have been introduced for testing)

parent 2d8ea5d8
No related branches found
No related tags found
No related merge requests found
...@@ -31,9 +31,9 @@ declare function whitespace:text ...@@ -31,9 +31,9 @@ declare function whitespace:text
( $text as text()*, $escape-char as xs:string? ) as text()* { ( $text as text()*, $escape-char as xs:string? ) as text()* {
let $whitespace-node := $text[matches(., "[\s\n\r\t]") and normalize-space(.) = ""] let $whitespace-node := $text[matches(., "[\s\n\r\t]") and normalize-space(.) = ""]
let $single-whitespace-between-nodes := $text = ' ' let $single-whitespace-between-nodes := $text = " "
return return
if ( not($whitespace-node) or $single-whitespace-between-nodes) then ( if (not($whitespace-node)) then (
if ($escape-char) then ( if ($escape-char) then (
whitespace:escape-text($text, "@") whitespace:escape-text($text, "@")
...@@ -63,3 +63,16 @@ declare function whitespace:escape-text ...@@ -63,3 +63,16 @@ declare function whitespace:escape-text
text {replace($text, '[\s]+', $escape)} text {replace($text, '[\s]+', $escape)}
}; };
declare function whitespace:remove($nodes as node()*) as node()* {
for $node in $nodes
return
typeswitch ($node)
case text() return
if([matches($node, "[\s\n\r\t]") and normalize-space(.) = ""]) then
()
else
$node
default return
$node
};
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