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;
@@ -311,13 +312,7 @@ private void compressElement(final OutputStream os, final Element element, final
311
312
thrownewXPathException(this, "Item must be type of xs:anyURI or element entry.");
312
313
}
313
314
314
-
if (element.getChildNodes().getLength() > 1) {
315
-
thrownewXPathException(this, "Entry content is not valid XML fragment.");
316
-
}
317
-
318
315
Stringname = element.getAttribute("name");
319
-
// if(name == null)
320
-
// throw new XPathException(this, "Entry must have name attribute.");
321
316
322
317
finalStringtype = element.getAttribute("type");
323
318
ZipMethodmethod;
@@ -328,7 +323,7 @@ private void compressElement(final OutputStream os, final Element element, final
0 commit comments