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]] 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
transformFirmname.xqy
Description: transformFirmname.xqy
<case> <caseId>1155991</caseId> <caseName>ASPEN SPECIALTY INSURANCE COMPANY v. M/V CMA CGM GEORGIA et al</caseName> <caseNumberOffice>2</caseNumberOffice> <caseNumberYear>13</caseNumberYear> <caseNumberType>cv</caseNumberType> <caseNumberSequence>00188</caseNumberSequence> <caseChapter> </caseChapter> <caseNatureOfSuit code="120">Contract - Marine</caseNatureOfSuit> <caseJurisdiction> </caseJurisdiction> <caseJuryDemand> </caseJuryDemand> <caseCause> </caseCause> <caseDemand> </caseDemand> <caseFiledDate date="2013-01-09">2013-01-09</caseFiledDate> <caseTermDate date="2013-11-26">2013-11-26</caseTermDate> <caseDismissedDate> </caseDismissedDate> <caseDischargedDate> </caseDischargedDate> <caseDisposition> </caseDisposition> <caseFlags> </caseFlags> <lastPartiesUpdateDate date="2015-01-12">2015-01-12</lastPartiesUpdateDate> <lastDocketUpdateDate date="2000-01-01">2000-01-01</lastDocketUpdateDate> <court> <courtName>New Jersey District Court</courtName> <courtShortName>njdce</courtShortName> </court> <parties> <party> <name>CMA-CGM S.A.</name> <role>Defendant</role> <title> </title> <proSe>false</proSe> <firmname> </firmname> <originalFirmname> </originalFirmname> <addressPreamble> </addressPreamble> <address1> </address1> <address2> </address2> <city> </city> <state> </state> <zip> </zip> <email> </email> <phone> </phone> <addedDate date="2013-01-09">2013-01-09</addedDate> <terminatedDate> </terminatedDate> <updateTS> </updateTS> <representedBy> <counsel> <name>MICHAEL FERNANDEZ</name> <role>Counsel</role> <title> </title> <proSe>false</proSe> <firmname>Freehill, Hogan & Mahar</firmname> <originalFirmname>Freehill, Hogan & Mahar</originalFirmname> <addressPreamble> </addressPreamble> <address1>80 PINE STREET 24TH FLOOR</address1> <address2> </address2> <city>NEW YORK</city> <state>NY</state> <zip>10005</zip> <email>[email protected]</email> <phone>212-425-1900</phone> <addedDate date="2013-03-15">2013-03-15</addedDate> <terminatedDate> </terminatedDate> <updateTS> </updateTS> </counsel> </representedBy> </party> <party> <name>M/V CMA CGM GEORGIA</name> <role>Defendant</role> <title> </title> <proSe>false</proSe> <firmname> </firmname> <originalFirmname> </originalFirmname> <addressPreamble> </addressPreamble> <address1> </address1> <address2> </address2> <city> </city> <state> </state> <zip> </zip> <email> </email> <phone> </phone> <addedDate date="2013-01-09">2013-01-09</addedDate> <terminatedDate> </terminatedDate> <updateTS> </updateTS> <representedBy> <counsel> <name>MICHAEL FERNANDEZ</name> <role>Counsel</role> <title> </title> <proSe>false</proSe> <firmname>Freehill, Hogan & Mahar</firmname> <originalFirmname>Freehill, Hogan & Mahar</originalFirmname> <addressPreamble> </addressPreamble> <address1>80 PINE STREET 24TH FLOOR</address1> <address2> </address2> <city>NEW YORK</city> <state>NY</state> <zip>10005</zip> <email>[email protected]</email> <phone>212-425-1900</phone> <addedDate date="2013-03-15">2013-03-15</addedDate> <terminatedDate> </terminatedDate> <updateTS> </updateTS> </counsel> </representedBy> </party> <party> <name>Stanley R Chesler</name> <role>Judge</role> <title> </title> <proSe> </proSe> <firmname> </firmname> <originalFirmname> </originalFirmname> <addressPreamble> </addressPreamble> <address1> </address1> <address2> </address2> <city> </city> <state> </state> <zip> </zip> <email> </email> <phone> </phone> <addedDate> </addedDate> <terminatedDate> </terminatedDate> <updateTS> </updateTS> </party> <party> <name>ASPEN SPECIALTY INSURANCE COMPANY</name> <role>Plaintiff</role> <title> </title> <proSe>false</proSe> <firmname> </firmname> <originalFirmname> </originalFirmname> <addressPreamble> </addressPreamble> <address1> </address1> <address2> </address2> <city> </city> <state> </state> <zip> </zip> <email> </email> <phone> </phone> <addedDate date="2013-01-09">2013-01-09</addedDate> <terminatedDate> </terminatedDate> <updateTS> </updateTS> <representedBy> <counsel> <name>TIMOTHY DONALD BARROW</name> <role>Counsel</role> <title> </title> <proSe>false</proSe> <firmname>Grist Mill Square</firmname> <originalFirmname>Grist Mill Square</originalFirmname> <addressPreamble> </addressPreamble> <address1>148 MAIN STREET BUILDING 3</address1> <address2> </address2> <city>LEBANON</city> <state>NJ</state> <zip>08833</zip> <email>[email protected]</email> <phone>908-236-2229</phone> <addedDate date="2013-01-09">2013-01-09</addedDate> <terminatedDate> </terminatedDate> <updateTS> </updateTS> </counsel> </representedBy> </party> <party> <name>Cathy L Waldor</name> <role>RefJudge</role> <title> </title> <proSe> </proSe> <firmname> </firmname> <originalFirmname> </originalFirmname> <addressPreamble> </addressPreamble> <address1> </address1> <address2> </address2> <city> </city> <state> </state> <zip> </zip> <email> </email> <phone> </phone> <addedDate> </addedDate> <terminatedDate> </terminatedDate> <updateTS> </updateTS> </party> </parties> </case>
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
