Re: Process non-xml files from a zip into another zip

Hi Eric,

we’ve made an extension step [1] that will use Java’s unzip method to 
unzip the archive (currently: to the directory where the archive is 
located, so you gotta have write perms there – should probably use a 
temp dir for that [2]). You can check out a Calabash 1.0.15 that is 
shipped with this extension from our Subversion repo:

svn co https://subversion.le-tex.de/common/calabash/

Unzipping the complete archive is useful for example if you don’t know 
in advance which files your subsequent XSLT step will need to read.
The step returns a c:files document with the base URI of the archive and 
with c:file/@name entries for the contained files (and also for 
directories, it seems). You can pxf:copy the file entries to other 
directories and then create a c:zip-manifest for the new archive from a 
p:directory-list or by transforming the c:files result.

Hope this helps,

Gerrit


[1] https://subversion.le-tex.de/common/calabash/lib/ltx/ltx-unzip/
[2] 
http://stackoverflow.com/questions/617414/create-a-temporary-directory-in-java




On 29.10.2013 13:59, Erik Siegel wrote:
> Hi all,
>
> I have a problem where I need to process data in a zip file. Fine as
> long as its XML.
>
> However, i also need to extract non-xml files from the source zip (e.g.
> jpg files) and add them to the destination zip file. I'm trying to
> figure out if I can do this using Calabash only. Anyone that can help me
> out on this?
>
> Thanks,
> Erik Siegel
>

-- 
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsieke@le-tex.de, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vöckler

Received on Tuesday, 29 October 2013 20:12:28 UTC