Hi Bob,

I guess there is simply no other way. Just make sure you perform the two 
actions as part of the same transaction, by comma-separating them in a single 
newAdhocXquery call.

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
> Runstein, Robert E. (Contr) (IS)
> Sent: woensdag 20 mei 2009 19:55
> To: [email protected]
> Subject: [MarkLogic Dev General] Re: Saving a document with properties
>
>
> I do think that my example would be atomic.  I was just
> asking if this is the best way to accomplish this.  Sorry if
> the last line of my previous post was misleading.  The
> example is just one call to the database.
>
> Bob
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> [email protected]
> Sent: Wednesday, May 20, 2009 11:18 AM
> To: [email protected]
> Subject: General Digest, Vol 59, Issue 25
>
> Send General mailing list submissions to
>       [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       http://xqzone.com/mailman/listinfo/general
> or, via email, send a message with subject or body 'help' to
>       [email protected]
>
> You can reach the person managing the list at
>       [email protected]
>
> When replying, please edit your Subject line so it is more
> specific than
> "Re: Contents of General digest..."
>
>
> Today's Topics:
>
>    1. ingest log files? (Jakob Fix)
>    2. start using lib-search (Meropi Petraki)
>    3. session.insertContent vs        xdmp:document-insert
>       (Runstein, Robert E. (Contr) (IS))
>    4. Saving a document with properties
>       (Runstein, Robert E. (Contr) (IS))
>    5. Re: Saving a document with properties (Michael Blakeley)
>    6. RE: session.insertContent vs    xdmp:document-insert (Danny
> Sokolsky)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 20 May 2009 10:38:03 +0200
> From: Jakob Fix <[email protected]>
> Subject: [MarkLogic Dev General] ingest log files?
> To: [email protected]
> Message-ID:
>       <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello,
>
> here's another question from a MarkLogic newbie.  I was
> thinking of indexing Apache log files (or any other
> line-based log files, for this
> matter) for later exploitation.  I was thinking of feeding
> this XML to some kind of dashboard application which would be
> able to create nice graphs and buckets etc.
>
> Is it possible and does it make sense at all to create a CPF
> pipeline that will parse and enrich each line to create an
> XML representation?
> Is something like this already worked on? Another approach?
>
> --
> cheers,
> Jakob.
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 20 May 2009 13:09:49 +0300
> From: "Meropi Petraki" <[email protected]>
> Subject: [MarkLogic Dev General] start using lib-search
> To: <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
>
>
> Sorry for the following question but I'm new to MarkLogic and
> have some difficulties with some basic stuff you mention in
> the lib-search.
>
> In the Get-started section some steps are mentioned, where
> some clarrification could help:
>
>
>
> Step 1: Create a project folder. Where should I create the
> project folder?
> Inside the installation directory of MarkLogic? Or anywhere
> on my computer?
>
>
>
> Step 3: Createn an XDMP site. What is an XDMP site? I know
> that xdmp is a namespace prefix that is used for invoking
> some build - in functions.
> But
> how I create a XDMP site? And how do I point to a project
> folder and to the database I want.
>
>
>
> Step 4: Fire up CQ. The CQ is the known Content Query
> Application I installed to start working with my uploaded
> data? If yes then its until there Okay. But how I point to
> the XDMP site using CQ?
>
>
>
> I suggest that understanding these 3 steps will make it
> easier to understand to make step 4 and step 5.
>
>
>
> Thank you.
>
>
>
> With Regards,
>
> Meropi
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://xqzone.marklogic.com/pipermail/general/attachments/2009
> 0520/e6176
> 750/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Wed, 20 May 2009 10:00:43 -0500
> From: "Runstein, Robert E. (Contr) (IS)" <[email protected]>
> Subject: [MarkLogic Dev General] session.insertContent vs
>       xdmp:document-insert
> To: <[email protected]>
> Message-ID:
>
> <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
>
> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://xqzone.marklogic.com/pipermail/general/attachments/2009
> 0520/26660
> 404/attachment-0001.html
>
> ------------------------------
>
> Message: 4
> Date: Wed, 20 May 2009 10:16:20 -0500
> From: "Runstein, Robert E. (Contr) (IS)" <[email protected]>
> Subject: [MarkLogic Dev General] Saving a document with properties
> To: <[email protected]>
> Message-ID:
>
> <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
>
> I want to insert a new document with some custom properties using xcc.
> The xdmp:document-add-properties function requires the
> document to exist in the database and I want the insert and
> add of the properties to be atomic.  While I could probably
> do something like
>
> xdmp:document-insert($document, $documentUri),
> xdmp:document-add-properties($documentUri, $properties)
>
> I'm wondering if there is a way to do this with a single call
> to to the database.  Thanks.
>
> Bob
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://xqzone.marklogic.com/pipermail/general/attachments/2009
> 0520/6f7db
> e20/attachment-0001.html
>
> ------------------------------
>
> Message: 5
> Date: Wed, 20 May 2009 08:57:03 -0700
> From: Michael Blakeley <[email protected]>
> Subject: Re: [MarkLogic Dev General] Saving a document with properties
> To: General Mark Logic Developer Discussion
>       <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Robert,
>
> Why wouldn't your example be an atomic statement?
>
> The transaction model might be clearer after a review of
> chapter 3 in the developer guide: "Understanding Transactions
> in MarkLogic Server"
>
>    http://developer.marklogic.com/pubs/
>
> You may find the section titled "Example: Incrementing the
> System Timestamp" especially illuminating.
>
> -- Mike
>
> On 2009-05-20 08:16, Runstein, Robert E. (Contr) (IS) wrote:
> > I want to insert a new document with some custom properties
> using xcc.
> The xdmp:document-add-properties function requires the
> document to exist in the database and I want the insert and
> add of the properties to be atomic.  While I could probably
> do something like
> >
> > xdmp:document-insert($document, $documentUri),
> xdmp:document-add-properties($documentUri, $properties)
> >
> > I'm wondering if there is a way to do this with a single call to to
> the database.  Thanks.
> >
> > Bob
> >
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 20 May 2009 10:36:49 -0700
> From: Danny Sokolsky <[email protected]>
> Subject: RE: [MarkLogic Dev General] session.insertContent vs
>       xdmp:document-insert
> To: General Mark Logic Developer Discussion
>       <[email protected]>
> Message-ID:
>
> <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
>
> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://xqzone.marklogic.com/pipermail/general/attachments/2009
> 0520/f306d
> dbb/attachment.html
>
> ------------------------------
>
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>
>
> End of General Digest, Vol 59, Issue 25
> ***************************************
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>

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

Reply via email to