From 21f2c6de815ffb2a2894676b4083e5b89328bff2 Mon Sep 17 00:00:00 2001 From: Juri Leino Date: Mon, 14 Nov 2022 12:14:54 +0100 Subject: [PATCH] fix(body): XML includes the document-node Ensure items appearinge before and after the root element, such as processing instructions or comments are preserved. --- content/body.xqm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/body.xqm b/content/body.xqm index 59ce592..4cd4c8a 100644 --- a/content/body.xqm +++ b/content/body.xqm @@ -58,7 +58,7 @@ declare function body:parse ($request as map(*)) { let $data := request:get-data() return typeswitch ($data) - case node() return $data/node() + case node() return $data default return parse-xml($data) (: Treat everything else as binary data :) default return request:get-data()