Hi Mike, I found the problem:
Using a part with a forward slash, i.e., <part>/test.xml</part>, implies that there is a blank parent directory. Opening the zipfile on Windows 7 without a directory name provides no means for drilling down into the empty subdirectory. The remedy is to remove the forward slash at the beginning of the path or to add a root directory (without a forward slash preceding it as well), e.g., <part>root/test.xml</part>. Tim -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Michael Blakeley Sent: Wednesday, February 08, 2012 7:44 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Creating a downloadable zipfile That looks reasonable enough. Maybe the problem is something to do with webdav? Here's what I see with 5.0-2 and cadaver 0.23.3, both on OS X. $ cadaver http://localhost:7000/ dav:/> get aaa.zip Downloading `/aaa.zip' to aaa.zip: Progress: [=============================>] 100.0% of 129 bytes succeeded. dav:/> ^D Connection to `localhost' closed. $ unzip -l aaa.zip Archive: aaa.zip Length Date Time Name -------- ---- ---- ---- 15 02-08-12 16:40 /test.xml -------- ------- 15 1 file $ unzip -p aaa.zip <aaa>aaa</aaa> -- Mike On 8 Feb 2012, at 16:28 , Tim Meagher wrote: > Hi Mike, > > I'm storing the zipfile using xdmp:document-insert, in which case I > have been able to extract the contents using xdmp:zip-get(). I can't > seem to save it using xdmp:save to my unix file system. Maybe I need > to save to the MarkLogic mount and not to my user account... Anyhow, > here's the code using > document-insert: > > let $zip := xdmp:zip-create( > <parts xmlns="xdmp:zip"> > <part>/test.xml</part> > </parts>, > <aaa>aaa</aaa>) > > return > try {( > xdmp:document-insert("/aaa.zip", $zip) > )} > catch($e) { > $e > } > > Tim > _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
