I am trying to use xdmp:node-replace to change a node value.  Assume 
'theTranslation' is a value I am matching in another document, and 'firmname' 
exists as a node or as text, depending on how I reference it, how do I use 
node-replace to change the value of theFirmname?

xdmp:node-replace($theFirmname/text(),$translation/text())



The theTranslation firmname to insert is:
text
Freehill, Hogan & Mahar, LLP

The firmname to be changed is:
text <http://10.6.0.95:8000/qconsole/>
Freehill, Hogan & Mahar


Or.... I could do it this way, (and I specified firmname to be a node value not 
text.... Will return a conflicting updates exception.

xdmp:node-replace($theFirmname,<firmname>$translation/text()</firmname>)

[1.0-ml] XDMP-CONFLICTINGUPDATES: xdmp:eval("xquery version 
&quot;1.0-ml&quot;;&#10;declare namespace html = ...", (), <options 
xmlns="xdmp:eval"><database>4793418423724769125</database><modules>529627520719988...</options>)
 -- Conflicting updates 
xdmp:node-replace(fn:doc("/olympus/pacer-xml/1155991_2:13-cv-00188")/case/parties/party[1]/representedBy/counsel/firmname,
 <firmname>$translation/text()</firmname>) and 
xdmp:node-replace(fn:doc("/olympus/pacer-xml/1155991_2:13-cv-00188")/case/parties/party[1]/representedBy/counsel/firmname,
 <firmname>$translation/text()</firmname>)

I am feeling flustered.  Is there an easier way to do this?






_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to