Skip to content

Commit 971f3f4

Browse files
committed
[bugfix] Do not apply REST Server _ output-doctype, _omit-xml-declaration, or _omit-original-xml-declaration parameters to XQuery execution as these can conflict with XQuery Serialization settings
1 parent 40ab663 commit 971f3f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

exist-core/src/main/java/org/exist/http/RESTServer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,11 @@ public void doGet(final DBBroker broker, final Txn transaction, final HttpServle
498498
// found an XQuery or XProc resource, fixup request values
499499
final String pathInfo = pathUri.trimFromBeginning(servletPath).toString();
500500

501+
// reset any output-doctype, omit-xml-declaration, or omit-original-xml-declaration properties, as these can conflict with others set via XQuery Serialization settings
502+
outputProperties.setProperty(EXistOutputKeys.OUTPUT_DOCTYPE, "no");
503+
outputProperties.setProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
504+
outputProperties.setProperty(EXistOutputKeys.OMIT_ORIGINAL_XML_DECLARATION, "yes");
505+
501506
// Should we display the source of the XQuery or XProc or execute it
502507
final Descriptor descriptor = Descriptor.getDescriptorSingleton();
503508
if (source) {

0 commit comments

Comments
 (0)