Skip to content

Commit b37e49e

Browse files
committed
[bugfix] eXist-db's URL Resolver previously preserved the DocType for Embedded Resources, but not for XML-RPC resources, this corrects the issue so that both APIs preserve the DocType
1 parent edbd511 commit b37e49e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

exist-core/src/main/java/org/exist/protocolhandler/xmlrpc/XmlrpcDownload.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
3737

3838
import org.exist.protocolhandler.xmldb.XmldbURL;
39+
import org.exist.storage.serializers.EXistOutputKeys;
40+
41+
import javax.xml.transform.OutputKeys;
3942

4043
import static java.nio.charset.StandardCharsets.UTF_8;
4144

@@ -75,8 +78,9 @@ public void stream(final XmldbURL xmldbURL, final OutputStream os) throws IOExce
7578

7679
// Setup xml serializer
7780
final Map<String, String> options = new HashMap<>();
78-
options.put("indent", "no");
79-
options.put("encoding", UTF_8.name());
81+
options.put(OutputKeys.INDENT, "no");
82+
options.put(OutputKeys.ENCODING, UTF_8.name());
83+
options.put(EXistOutputKeys.OUTPUT_DOCTYPE, "yes"); // Preserve doctype
8084

8185
// Setup client parameters
8286
final List<Object> params = new ArrayList<>();

0 commit comments

Comments
 (0)