Anways I got my thing working correctly so please don’t think about this too hard – I have a working version now. Kudo’s to you and Chris for the offers and suggestions. The logging suggestion really cleared up a lot of confusion – even though I was printing results out in qconsole it was much more cler to me when reading it as a log file.
From: [email protected] [mailto:[email protected]] On Behalf Of Kari Cowan Sent: Tuesday, May 12, 2015 1:57 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] xdmp:node-replace Sure – that would be great if you can take a look. I have commented out the action on the script so it wouldn’t actually change the node in my document, but the document it’s using and comparing is attached. I also have a translation xml doc that I loaded. It’s rather large so I didn’t attach it. Since you’re only looking at 1 record can you assume that: Freehill, Hogan & Mahar – will return from translation node as Freehill, Hogan & Mahar, LLP Grist Mill Square – is already correct and translation node would be empty From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Indrajeet Verma Sent: Tuesday, May 12, 2015 9:17 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] xdmp:node-replace Hi Kary, Send us the XML samples along with your code snippet (that you want to perform exactly). I can help you to make it works. Regards, Indy On Tue, May 12, 2015 at 9:11 PM, Christopher Hamlin <[email protected]<mailto:[email protected]>> wrote: Hi, You can't make two changes to the same node, but somehow that is what is happening. In this case you are making two changes to fn:doc("/olympus/pacer-xml/1155991_2:13-cv-00188")/case/parties/party[1]/representedBy/counsel/firmname The definition says: ==================== Cause The application attempted to perform multiple updates to the same document within the same transaction. A single statement may not perform more than one update to the same document. For example, you cannot update a node and add a child element to that node in the same statement. Response Revise your application code to perform the conflicting operations in two separate statements. For example, use the semicolon transaction delimiter, or execute the second update inside an xdmp:eval with the isolation option set to different-transaction. ==================== There is a bit more info here: https://help.marklogic.com/knowledgebase/article/View/25/16/xdmp-conflictingupdates-and-how-to-avoid-it Maybe use xdmp:log and instead of making the change, log the URIs/xpath/whatever. Then you would see what's going on and whether it is what you expect. You can use xdmp:describe to dump things out. Note that it will truncate by default, but that can be overridden. /ch _______________________________________________ General mailing list [email protected]<mailto:[email protected]> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general ________________________________ Learn more about ALM, visit http://www.alm.com . – ALM, an Integrated Media Company, is a leading provider of news and information for the legal and commercial real estate markets. ALM’s market-leading brands include The American Lawyer, Corporate Counsel, GlobeSt.com, Insight Conferences, Law.com, Law Journal Press, LegalTech, The National Law Journal and Real Estate Forum.
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
