Xproc3 struggling to update ZIPs


I have been trying to find the best way in Xproc3 to take a .docx file,
process only a couple of the content files then save to a new ZIP
containing the unchanged plus updated files.
I am trying to avoid having to load or process files in the ZIP that I do
not need to update.

I have got stuck at the point I update the ZIP.
I have tried various approaches, created a small test case to simply add a
file to an archive (below) and changed the .docx to a windows created Zip
or Zip created by other applications but no matter what I try I get the
following message

Copyright 2011-2020 by <xml-project /> Achim Berndzen

<?xml version="1.0" encoding="UTF-8"?>
<c:errors xmlns:c="http://www.w3.org/ns/xproc-step"><c:error
code="err:XC0085" name="saveZIP" type="p:archive"
line="11" column="31" xmlns:p="http://www.w3.org/ns/xproc" xmlns:err="
http://www.w3.org/ns/xproc-error"><message>Error processing ZIP archive:
invalid entry compressed size (expected 3537 but got 3304

When I look inside the ZIP or check the zip-manifest then the compressed
file size for the first file in the ZIP is  3537 bytes.

Is this a bug or am I doing something wrong?

The Xproc is

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="
    xmlns:cm="http://macksol.co.uk"  xmlns:xs="
    version="3.0" name="autoDocX" type="cm:autoDocX">

    <p:input port="source" sequence="true"/>
    <p:output port="result" primary="true" sequence="true" />

    <p:load name="fileToAdd" href="manifestShell.xml"/>

    <p:archive name="saveZIP">
       <p:with-input port="manifest" pipe="@fileToAdd"/>
       <p:with-input port="archive" href="fileTest.zip"/>
    <p:store name="storeZIP" href="fileTestOut.zip"/>


The manifest file loaded @fileToAdd  that points to the file to be added is

<?xml version="1.0" encoding="UTF-8"?>
<c:archive xmlns:c="http://www.w3.org/ns/xproc-step">
    <c:entry name="logic.xml" href="logic.xml"/>



Received on Wednesday, 27 May 2020 14:27:37 UTC