Or putting or posting it to some Xquery behind a MarkLogic HTTP server that does the unquote for you would work as well. That way you don't depend on XCC library at all. One could debate about efficiency, but not requiring XCC to load the content might be useful in some cases.
Kind regards, Geert > Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of > Lee, David > Sent: woensdag 20 mei 2009 20:23 > To: General Mark Logic Developer Discussion > Subject: RE: [MarkLogic Dev General]session.insertContent > vsxdmp:document-insert > > Great suggestion ! I hadn't thought of that. > Passing an external parameter with the body of the doc to > document-insert .... > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of > Michael Blakeley > Sent: Wednesday, May 20, 2009 2:21 PM > To: General Mark Logic Developer Discussion > Subject: Re: [MarkLogic Dev General]session.insertContent > vsxdmp:document-insert > > That would be true for xdmp:document-load(), but > xdmp:document-insert() does not rely on the filesystem. An > XCC program could pass XML as an external variable of type > xs:string to an XQuery module, which would unquote it, then > doc-insert the result. For an example of this technique, see > http://developer.marklogic.com/svn/recordloader/trunk/README.h > tml (under "CONTENT_FACTORY_CLASSNAME"). > > But as Danny points out, XCC's built-in Content class is > likely to be more efficient for most applications. One > exception relates to Robert's other recent question: "Saving > a document with properties". It's fairly simple to use > xdmp:document-insert() and xdmp:document-add-properties() in > a single transaction, while XCC's ContentCreateOptions API > does not support document properties. > > -- Mike > > On 2009-05-20 10:38, Lee, David wrote: > > The other issue is "where is the source content". > > If the ML server is on a machine which does not have local > file access > > to the source content, then the ONLY way to get it there is > with session.insertContent() which reads from the client machine. > > > > > > > > From: [email protected] > > [mailto:[email protected]] On Behalf Of Danny > > Sokolsky > > Sent: Wednesday, May 20, 2009 1:37 PM > > To: General Mark Logic Developer Discussion > > Subject: RE: [MarkLogic Dev General] session.insertContent > > vsxdmp:document-insert > > > > Hi Robert, > > > > I am not a much of a Java guy, so others might be better to > comment on this one, but I think the difference is that with > session.insertContent, you are using Java to stream in the > content to MarkLogic Server. With xdmp:document-insert, you > are using XQuery to create the content in memory to insert. > If you have a large amount of content on the client machine > (where the XCC program is running) to load, then it makes > sense to use insertContent. I believe this is what the open > source project RecordLoader does > (http://developer.marklogic.com/code/#recordloader). > > > > -Danny > > > > From: [email protected] > > [mailto:[email protected]] On Behalf Of > > Runstein, Robert E. (Contr) (IS) > > Sent: Wednesday, May 20, 2009 8:01 AM > > To: [email protected] > > Subject: [MarkLogic Dev General] session.insertContent vs > > xdmp:document-insert > > > > > > What is the difference between session.insertContent and > xdmp:document-insert? When using xcc is there any advantage > to using one over the other? Thanks. > > > > Bob > > > > > _______________________________________________ > General mailing list > [email protected] > http://xqzone.com/mailman/listinfo/general > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
