Re: [MarkLogic Dev General] XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace

2016-09-28 Thread Justin Makeig
The general pattern for doing updates on persisted JSON documents in JavaScript is to 1) get the document 2) turn it into an object 3) update the object 4) replace the document node with the updated object Here's an example that updates the `balance` property of every document in the

Re: [MarkLogic Dev General] XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace

2016-09-28 Thread Shiv Shankar
Hi Rob, Thanks for quick reply, Here is the sample scenario. I would be building random data and put in to newObjData in a for loop. 01.json = {"firstName": "abc", "lastName": "xyz"} newObjectData.firstName= "Donald"; for Loop { xdmp.nodeReplace(cts.doc("/test/01.json"),newObjectData);

Re: [MarkLogic Dev General] XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace

2016-09-28 Thread Rob Szkutak
Hi, Do you have a reproducible case of this I could look at? Best, Rob Rob Szkutak Senior Consultant MarkLogic Corporation rob.szku...@marklogic.com www.marklogic.com From: Shiv Shankar [shiv.shivshan...@gmail.com] Sent: Wednesday,

Re: [MarkLogic Dev General] How XSL will work insted of xquery If we have more then one same record in XML, ignore them and extract only rest data

2016-09-28 Thread Nalini Shrma
thanks, thats is working On Thu, Sep 29, 2016 at 12:25 AM, Evan Lenz wrote: > You could output it only if the current group has one item. Inside > : > > > > > > Evan > > Evan Lenz > President, Lenz Consulting Group, Inc. >

Re: [MarkLogic Dev General] How XSL will work insted of xquery If we have more then one same record in XML, ignore them and extract only rest data

2016-09-28 Thread Evan Lenz
You could output it only if the current group has one item. Inside : Evan Evan Lenz President, Lenz Consulting Group, Inc. http://lenzconsulting.com On Wed, Sep 28, 2016 at 11:42 AM, Nalini Shrma wrote: > Hi, > > I have one problem where i am

[MarkLogic Dev General] XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace

2016-09-28 Thread Shiv Shankar
Hi, I am getting XDMP-CONFLICTINGUPDATES: while using xdmp.nodeReplace to update JSON attributes, instead of over-writing entire document. Any advice. BTW, I used xdmp.eval, but it is not identifying the java script variables. Thanks ShivShankar. ___

Re: [MarkLogic Dev General] How XSL will work insted of xquery If we have more then one same record in XML, ignore them and extract only rest data

2016-09-28 Thread Nalini Shrma
sorry, that is working, On Thu, Sep 29, 2016 at 12:12 AM, Nalini Shrma wrote: > Hi, > > I have one problem where i am writing XSL insted of XQUERY to How XSL will > work If we have more then one same record in XML, ignore them and extract > only rest data. my xsl code

[MarkLogic Dev General] How XSL will work insted of xquery If we have more then one same record in XML, ignore them and extract only rest data

2016-09-28 Thread Nalini Shrma
Hi, I have one problem where i am writing XSL insted of XQUERY to How XSL will work If we have more then one same record in XML, ignore them and extract only rest data. my xsl code handling only duplicate value, i need only that record which is not duplicate or more then one. Below is my XSL:

Re: [MarkLogic Dev General] Validate XML documents while ingesting and maintain logs of failed documents #CGO#

2016-09-28 Thread Mary Holstege
You need to throw an error to abort the whole transaction. Call fn:error from the catch block. //Mary On Sep 27, 2016 10:57 PM, "Jain, Abhishek" wrote: Hi Greet, I tried to implement pre-commit solution. In my action module I am trying check if input xml