Skip to content

Commit c4b1d98

Browse files
[bugfix] Correct default serialization item separator.
1 parent 33be9b2 commit c4b1d98

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

exist-core/src/main/java/org/exist/xquery/functions/fn/FunSerialize.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
public class FunSerialize extends BasicFunction {
4444

45-
private final static String DEFAULT_ITEM_SEPARATOR = "\n";
45+
private final static String DEFAULT_ITEM_SEPARATOR = " ";
4646

4747
public final static FunctionSignature[] signatures = {
4848
new FunctionSignature(

exist-core/src/test/xquery/xquery3/serialize.xql

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ function ser:serialize-empty-params() {
214214
};
215215

216216
declare
217-
%test:assertEquals("aaa
218-
bbb")
217+
%test:assertEquals("aaa bbb")
219218
function ser:serialize-atomic() {
220219
let $nodes := ("aaa", "bbb")
221220
return
@@ -775,31 +774,3 @@ function ser:item-separator-text-method() {
775774
let $data := (1, 2)
776775
return ser:serialize-with-item-separator($data, "text")
777776
};
778-
779-
declare
780-
%test:assertEquals("1--2")
781-
function ser:item-separator-html-method() {
782-
let $data := (1, 2)
783-
return ser:serialize-with-item-separator($data, "html")
784-
};
785-
786-
declare
787-
%test:assertEquals("1--2")
788-
function ser:item-separator-xhtml-method() {
789-
let $data := (1, 2)
790-
return ser:serialize-with-item-separator($data, "xhtml")
791-
};
792-
793-
declare
794-
%test:assertEquals("1--2")
795-
function ser:item-separator-xml-method() {
796-
let $data := (1, 2)
797-
return ser:serialize-with-item-separator($data, "xml")
798-
};
799-
800-
declare
801-
%test:assertEquals("1--2")
802-
function ser:item-separator-adaptive-method() {
803-
let $data := (1, 2)
804-
return ser:serialize-with-item-separator($data, "adaptive")
805-
};

0 commit comments

Comments
 (0)