Create a new file on MarkLogic through WebDAV

Hi, I have MarkLogic in a virtual box for developing purposes (on Mac OS X) and tried to create a new file from within oXygen, by using the "Open URL" action. I filled in the info and pressed "Browse" to be sure the info are ok, and everything goes fine. But when I press "OK", I receive a 404. Is it possible to create a new file with this action? If not, is it possible by any other means? Regards, -- Florent Georges http://www.fgeorges.org/

On 3/5/09 3:10 PM, "Florent Georges" <lists@fgeorges.org> wrote:
Hi,
I have MarkLogic in a virtual box for developing purposes (on Mac OS X) and tried to create a new file from within oXygen, by using the "Open URL" action. I filled in the info and pressed "Browse" to be sure the info are ok, and everything goes fine. But when I press "OK", I receive a 404.
Is it possible to create a new file with this action? If not, is it possible by any other means?
You can do it with an XQuery: xdmp:document-insert( "/example.xml", <a>aaa</a>, (xdmp:permission("editor", "read"), xdmp:permission("editor", "update")), "http://examples.com") http://developer.marklogic.com/pubs/3.2/apidocs/UpdateBuiltins.html#document -insert Cheers, E. ---- Eliot Kimber | Senior Solutions Architect | Really Strategies, Inc. email: ekimber@reallysi.com <mailto:ekimber@reallysi.com> office: 610.631.6770 | cell: 512.554.9368 2570 Boulevard of the Generals | Suite 213 | Audubon, PA 19403 www.reallysi.com <http://www.reallysi.com> | http://blog.reallysi.com <http://blog.reallysi.com> | www.rsuitecms.com <http://www.rsuitecms.com>

Eliot Kimber wrote: Hi Eliot,
You can do it with an XQuery: xdmp:document-insert( "/example.xml", <a>aaa</a>, (xdmp:permission("editor", "read"), xdmp:permission("editor", "update")), "http://examples.com")
Thanks. Yes, and then I could open it with "Open URL". I can live with that, even if it is a bit heavy just to create a file. But actually, I try to create a new XQuery module, the WebDAV server is linked to the Module database. So I guess I should then create a second XDBC server, linked also to the Modules database. And even then, will xdmp:document-insert() work to create a new XQuery module, instead of an XML document? I'm afraid I am going to be a bit too much specific to MarkLogic. Maybe we should switch to the ML Users mailing list? Thanks again, -- Florent Georges http://www.fgeorges.org/

Dear Florent,
Thanks. Yes, and then I could open it with "Open URL". I can live with that, even if it is a bit heavy just to create a file. But actually, I try to create a new XQuery module, the WebDAV server is linked to the Module database. So I guess I should then create a second XDBC server, linked also to the Modules database. And even then, will xdmp:document-insert() work to create a new XQuery module, instead of an XML document?
There is a Database Explorer view that can help you on this matter. In order to be able to see the MarkLogic database content you must configure the "WebDAV URL" field from Connection dialog (see http://www.oxygenxml.com/MarkLogic_support.html) .You can then right click on a container and use "Add resource" action to add a file (XML or XQuery) to your database. Best regards, Stefan Vasile http://www.oxygenxml.com

Stefan Vasile wrote: Hi,
There is a Database Explorer view that can help you on this matter. In order to be able to see the MarkLogic database content you must configure the "WebDAV URL" field from Connection dialog
Yes, thanks. But if I am right, if I add an XQuery module, it will be added to the database along with other documents (the 5th "database" field instead of the 4th "modules" field in the XDBC admin page on ML console.) So I can't use it as a library module (in another query, using "import module".) I feel I miss something obvious, but I can't tell what. I will ask the ML Users list, and post back anything interesting I get, if any. Regards, -- Florent Georges http://www.fgeorges.org/
participants (3)
-
Eliot Kimber
-
Florent Georges
-
Stefan Vasile