You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[bugfix] Compressing persistent Documents or Elements that have non-element Child Nodes, previously caused silent corruption of those documents in the generated archive. This is now fixed so that all nodes are correctly compressed.
Copy file name to clipboardExpand all lines: extensions/modules/compression/src/main/java/org/exist/xquery/modules/compression/AbstractCompressFunction.java
+79-29Lines changed: 79 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,7 @@
66
66
importorg.exist.xquery.value.*;
67
67
importorg.w3c.dom.Element;
68
68
importorg.w3c.dom.Node;
69
+
importorg.w3c.dom.NodeList;
69
70
importorg.xml.sax.SAXException;
70
71
71
72
importjavax.annotation.Nullable;
@@ -310,13 +311,7 @@ private void compressElement(final OutputStream os, final Element element, final
310
311
thrownewXPathException(this, "Item must be type of xs:anyURI or element entry.");
311
312
}
312
313
313
-
if (element.getChildNodes().getLength() > 1) {
314
-
thrownewXPathException(this, "Entry content is not valid XML fragment.");
315
-
}
316
-
317
314
Stringname = element.getAttribute("name");
318
-
// if(name == null)
319
-
// throw new XPathException(this, "Entry must have name attribute.");
320
315
321
316
finalStringtype = element.getAttribute("type");
322
317
ZipMethodmethod;
@@ -327,7 +322,7 @@ private void compressElement(final OutputStream os, final Element element, final
0 commit comments