title: Specific Attribute node replacement
body: <p>How to do node replacement in MarkLogic for a particular attribute? For example like below:</p>
  
  <pre><code>&lt;chapters&gt;
  &lt;title id="primary"&gt;first primary content&lt;/title&gt;
  &lt;title id="primary"&gt;second primary content&lt;/title&gt;
  &lt;title id="secondary"&gt;this is amy middle content&lt;/title&gt;
  &lt;title id="terciary"&gt;this is amy last content&lt;/title&gt;
  &lt;/chapters&gt;
  </code></pre>
  
  <p>I want like below:</p>
  
  <pre><code>&lt;chapters&gt;
  &lt;title id="primary"&gt;third primary content&lt;/title&gt;
  &lt;title id="secondary"&gt;this is amy middle content&lt;/title&gt;
  &lt;title id="terciary"&gt;this is amy last content&lt;/title&gt;
  &lt;/chapters&gt;
  </code></pre>
  
  <p>I mean suppose <code>A.xml</code> file stored in MarkLogic database server that contain data like bleow:</p>
  
  <pre><code>&lt;chaptermetadata&gt;
  &lt;chapters&gt;
  &lt;title id="primary"&gt;first content&lt;/title&gt;
  &lt;title id="primary"&gt;second content&lt;/title&gt;
  &lt;title id="secondary"&gt;This is middle content&lt;/title&gt;
  &lt;title id="terciary"&gt;This is last content&lt;/title&gt;
  &lt;/chapters&gt;
  &lt;chapters&gt;
  &lt;title id="primary"&gt;fouth content&lt;/title&gt;
  &lt;title id="primary"&gt;fifth content&lt;/title&gt;
  &lt;title id="primary"&gt;sixth content&lt;/title&gt;
  &lt;title id="secondary"&gt;This is new content&lt;/title&gt;
  &lt;title id="terciary"&gt;This is old content&lt;/title&gt;
  &lt;/chapters&gt;
  &lt;chaptermetadata&gt;
  </code></pre>
  
  <p>Now, I want to replace a node in all the element <code>title</code> which contain attribute <code>@id='primary'</code> in all chapter like below:</p>
  
  <pre><code>&lt;chaptermetadata&gt;
  &lt;chapters&gt;
  &lt;title id="primary"&gt;common content&lt;/title&gt;
  &lt;title id="secondary"&gt;This is middle content&lt;/title&gt;
  &lt;title id="terciary"&gt;This is last content&lt;/title&gt;
  &lt;/chapters&gt;
  &lt;chapters&gt;
  &lt;title id="primary"&gt;common content&lt;/title&gt;
  &lt;title id="secondary"&gt;This is new content&lt;/title&gt;
  &lt;title id="terciary"&gt;This is old content&lt;/title&gt;
  &lt;/chapters&gt;
  &lt;chaptermetadata&gt; 
  </code></pre>