Thanks Mike & Geert for your replies. It worked like charm!

-Samah

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://developer.marklogic.com/pipermail/general/attachments/20130305/46b4fea9/attachment-0001.html
 

------------------------------

Message: 2
Date: Tue, 5 Mar 2013 15:09:53 -0800
From: Michael Blakeley <[email protected]>
Subject: Re: [MarkLogic Dev General] xdmp:zip-create
To: MarkLogic Developer Discussion <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

It sounds like you might want to add a Content-Disposition header: 
http://stackoverflow.com/questions/1012437/uses-of-content-disposition-in-an-http-response-header
 has some pointers. Try the 'filename' option.

http://docs.marklogic.com/xdmp:save supports an omit-xml-declaration option.

-- Mike

Message: 4
Date: Wed, 6 Mar 2013 07:51:36 +0100
From: Geert Josten <[email protected]>
Subject: Re: [MarkLogic Dev General] xdmp:zip-create
To: MarkLogic Developer Discussion <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Hi Samah,



Regarding the xml declaration: keep in mind that the XML and DOCTYPE 
declaration are not really part of the document node you have within your code, 
and only added upon serialization. Xdmp:save and xdmp:zip apparently have their 
own serialization defaults. It might help to declare output serialization 
options at the top of your XQuery, but you can also use xdmp:quote to 
explicitly specify serialization options for a specific document. You can find 
an example here:



http://stackoverflow.com/questions/14886242/in-marklogic-5-x-how-can-i-include-a-doctype-declaration-in-a-zipped-document



Kind regards,

Geert



*Van:* [email protected] [mailto:
[email protected]] *Namens *Samah Abu-Mahmeed
*Verzonden:* dinsdag 5 maart 2013 22:13
*Aan:* [email protected]
*Onderwerp:* [MarkLogic Dev General] xdmp:zip-create



Hi all,





I have a script that creates word docs of xml files. It returns a zipped file 
of all the word docs.



[image: Description:
C:\Users\SABU-M~1.JMP\AppData\Local\Temp\SNAGHTML14f3505e.PNG]



1.      Is there a way to re-name the response? I can set the type of the
response. I want also to rename it



2.      The output of the step in line 4 are word ML files. When I save the
output of this step to the file system, the word ML files have the Xml 
declaration

<?xml version="1.0" encoding="UTF-8"?>



But when I save the output of the zip-create step, I lose that declaration.
How do we tell zip-create to keep the XML declaration?



Best,



-Samah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://developer.marklogic.com/pipermail/general/attachments/20130306/741a7d11/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 27247 bytes
Desc: not available
Url : 
http://developer.marklogic.com/pipermail/general/attachments/20130306/741a7d11/attachment.png
 

------------------------------

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


End of General Digest, Vol 105, Issue 6
***************************************
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to