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
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Michael
> Blakeley
> Sent: Wednesday, February 08, 2012 6:34 PM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Creating a downloadable zipfile
> 
> It should "just work". I've done it with zip-create, xdmp:save, and the
> unzip command-line tool.
> 
> Do you have a test case?
> 
> -- Mike
> 
> On 8 Feb 2012, at 15:29 , Tim Meagher wrote:
> 
>> I'm using xdmp:zip-create() to create a zipfile which I can download or
> copy it to my local Windows file system via webdav, but it seems that the
> zipfile contens cannot be read.  Is there some trick to creating the zipfile
> so that I can extract the contents on my local filesystem after downloading
> it?
>> 
>> Thank you!
>> 
>> Tim Meagher
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> 

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to