Hi Christian, Thanks - I rewrote to use the archive module and it works beautifully. Please note: the Wiki entry for the Zip module still reads: "It may soon be replaced by the Archive Module. " I'll happily update the Wiki entry for you if you like. Kind regards, C. -----Original Message----- From: Christian Grün [mailto:christian.gruen@gmail.com] Sent: 17 November 2015 19:31 To: Hondros, Constantine (ELS-AMS) Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] zip:update-entries - unexpected results We didn’t spend energy in the ZIP Module for a long time. Did you try to use the Archive Module? On Mon, Nov 16, 2015 at 5:06 PM, Hondros, Constantine (ELS-AMS) <C.Hondros@elsevier.com> wrote:
Hi all,
I’m attempting to create a modified copy a zipfile using zip:update-entries, but my output is a zip structure with zero-byte files. Am I missing a step? I’ve followed the example in: http://docs.basex.org/wiki/ZIP_Module#zip:update-entries
Code snippet as follows:
declare function util:clean-zip($zip as xs:string, $out as xs:string) {
copy $doc := zip:entries($zip)
modify delete node $doc//zip:entry[ends-with(lower-case(@name), '.pdf')]
return zip:update-entries($doc, $out)
};
Thanks for any pointers ;-)
C.
________________________________
Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.
________________________________ Elsevier B.V. Registered Office: Radarweg 29, 1043 NX Amsterdam, The Netherlands, Registration No. 33156677, Registered in The Netherlands.