W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2014

RE: Whitepsace in filenames in zip problems

From: Erik Siegel <mailing@xatapult.nl>
Date: Thu, 15 May 2014 10:10:59 +0200
To: "'Nic Gibson'" <nicg@corbas.co.uk>, <xproc-dev@w3.org>
Cc: "'Erik Siegel'" <erik@xatapult.nl>
Message-ID: <009a01cf7015$34a7ccb0$9df76610$@xatapult.nl>
Hi Nic,


The name comes from the pxp:unzip step. So, this name contains a space also.




Van: Nic Gibson [mailto:nicg@corbas.co.uk] 
Verzonden: donderdag 15 mei 2014 10:06
Aan: xproc-dev@w3.org
CC: Erik Siegel
Onderwerp: Re: Whitepsace in filenames in zip problems


Just a thought but... if you list the files in the with pxp:unzip what does the path to that file look like?





From: "Erik Siegel" <erik@xatapult.nl>
To: xproc-dev@w3.org
Sent: Thursday, 15 May, 2014 8:03:32 AM
Subject: Whitepsace in filenames in zip problems




(Using Calabash 1.0.16-95 from within oXygen)


I'm trying to extract a non-xml file from a zip file. The name of this file-in-the-zip contains a space. 


<pxp:unzip content-type="application/octet-stream">
                <p:with-option name="href" select="(ref-to-zip-file)"/>
                <p:with-option name="file" select="'content/learningunit1/script_00006/media/Bvj_1vg_oef_th1_leerdoel 6.jpg '"/>


What I get is an error message like:


Pipeline failed: java.lang.IllegalArgumentException: Illegal character in opaque part at index 144: zip:file:/home/conversion/in/VOoruit/ypub/projectToc_4592_1399461943.scorm.zip!content/learningunit1/script_00006/media/Bvj_1vg_oef_th1_leerdoel 6.jpg


(Character 144 is the space directly before the 6.jpg part)


I've tried to replace the offending space with a %20, but that gives me the message:


ZIP file does not contain 'content/learningunit1/script_00006/media/Bvj_1vg_oef_th1_leerdoel%206.jpg'


So, now I'm stuck... Anybody an idea how to solve this (except from forbidding spaces in filenames)?



Erik Siegel




Corbas Consulting / @CorbasLtd
Digital Publishing Consultancy and Training
http://www.corbas.co.uk, +44 (0)7718 906817/+44 (0)1273 930765

Received on Thursday, 15 May 2014 08:11:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:12 UTC