[MarkLogic Dev General] Can't insert document with square brackets in uri

Geert Josten Geert.Josten at marklogic.com
Wed Mar 18 16:11:02 PDT 2015


Exactly. Thanks for elaborating David..

You could for instance apply xdmp:url-encode on the filenames at insert, and xdmp:url-decode when you build the manifest..

Kind regards,
Geert

From: David Ennis <david.ennis at hinttech.com<mailto:david.ennis at hinttech.com>>
Reply-To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Date: Wednesday, March 18, 2015 at 9:51 PM
To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Subject: Re: [MarkLogic Dev General] Can't insert document with square brackets in uri

I think Geert's point is that zip-create accepts 2 things - a manifest and a sequence of nodes.

The names of the files in the zip can be whatever you want, I believe
The sequence of nodes are then stored in the zip in order where nodes[1] matches the first part, etc.

SO, the name of the file in ML need not necessarily match the filename in the zip.





Kind Regards,
David Ennis


David Ennis
Content Engineer

[HintTech] <http://www.hinttech.com/>
Mastering the value of content
creative | technology | content

Delftechpark 37i
2628 XJ Delft
The Netherlands
T: +31 88 268 25 00
M: +31 63 091 72 80

[http://www.hinttech.com]<http://www.hinttech.com> [http://www.hinttech.com/signature/Twitter_HintTech.png] <https://twitter.com/HintTech>  [http://www.hinttech.com/signature/Facebook_HintTech.png] <http://www.facebook.com/HintTech>  [http://www.hinttech.com/signature/Linkedin_HintTech.png] <http://www.linkedin.com/company/HintTech>

On 18 March 2015 at 21:21, Danny Sinang <d.sinang at gmail.com<mailto:d.sinang at gmail.com>> wrote:
I see. You're suggesting I not save the said file into ML, but rather save it inside a zip (pptx) file which accepts that filename format.

Thanks !

Danny

On Wed, Mar 18, 2015 at 3:18 PM, Geert Josten <Geert.Josten at marklogic.com<mailto:Geert.Josten at marklogic.com>> wrote:
Hi Danny,

I thought it should be possible to specify the name/path at which a file should be stored in the zip with the manifest that you supply to xdmp:zip..

Cheers,
Geert

From: Danny Sinang <d.sinang at gmail.com<mailto:d.sinang at gmail.com>>
Reply-To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Date: Wednesday, March 18, 2015 at 8:03 PM
To: general <General at developer.marklogic.com<mailto:General at developer.marklogic.com>>
Subject: [MarkLogic Dev General] Can't insert document with square brackets in uri

I'm trying to programmatically copy a powerpoint template file from one ML directory to another using xdmp:document-insert().

Problem is, that file's URI (see below) has square brackets in it.

[Content_Types].xml


I wish I could just rename that source file, but that's how MS Powerpoint named it.

Renaming it, and then zipping it up into a .pptx file results in a corrupted Powerpoint file.

Is there another way to do the copying ?

Regards,
Danny



_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general



_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150318/485cf406/attachment.html 


More information about the General mailing list