title: Select distinct child elements from repeating parent using XPath
body: <p>I want to select distinct child elements from repeating parent using XPath 1.0. 
  Following is the XML:</p>
  
  <pre><code>&lt;parent&gt;
  &lt;something&gt;
      &lt;catalog&gt;
          &lt;title&gt;AAA&lt;/title&gt;
          &lt;artist&gt;111&lt;/artist&gt;
      &lt;/catalog&gt;
      &lt;catalog&gt;
          &lt;title&gt;AAA&lt;/title&gt;
          &lt;artist&gt;111&lt;/artist&gt;
      &lt;/catalog&gt;
      &lt;catalog&gt;
          &lt;title&gt;BBB&lt;/title&gt;
          &lt;artist&gt;222&lt;/artist&gt;
      &lt;/catalog&gt;
  &lt;/something&gt;
  &lt;something&gt;
      &lt;catalog&gt;
          &lt;title&gt;CCC&lt;/title&gt;
          &lt;artist&gt;333&lt;/artist&gt;
      &lt;/catalog&gt;
      &lt;catalog&gt;
          &lt;title&gt;BBB&lt;/title&gt;
          &lt;artist&gt;222&lt;/artist&gt;
      &lt;/catalog&gt;
      &lt;catalog&gt;
          &lt;title&gt;CCC&lt;/title&gt;
          &lt;artist&gt;333&lt;/artist&gt;
      &lt;/catalog&gt;
  &lt;/something&gt;
  &lt;something&gt;
      &lt;catalog&gt;
          &lt;title&gt;AAA&lt;/title&gt;
          &lt;artist&gt;111&lt;/artist&gt;
      &lt;/catalog&gt;
      &lt;catalog&gt;
          &lt;title&gt;BBB&lt;/title&gt;
          &lt;artist&gt;222&lt;/artist&gt;
      &lt;/catalog&gt;
      &lt;catalog&gt;
          &lt;title&gt;CCC&lt;/title&gt;
          &lt;artist&gt;333&lt;/artist&gt;
      &lt;/catalog&gt;
  &lt;/something&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>Now, in the expected output I just want to pick the distinct <code>catalog</code> elements across the entire XML so that I can process it further. So the output should be:</p>
  
  <pre><code>&lt;catalog&gt;
      &lt;title&gt;AAA&lt;/title&gt;
      &lt;artist&gt;111&lt;/artist&gt;
  &lt;/catalog&gt;
  &lt;catalog&gt;
      &lt;title&gt;BBB&lt;/title&gt;
      &lt;artist&gt;222&lt;/artist&gt;
  &lt;/catalog&gt;
  &lt;catalog&gt;
      &lt;title&gt;CCC&lt;/title&gt;
      &lt;artist&gt;333&lt;/artist&gt;
  &lt;/catalog&gt;
  </code></pre>
  
  <p>I looked at some existing solutions, like <code>not(. = ../following-sibling::*)</code> but it is not helping me because I am trying to pick distinct items across repeating parent items. Please help and sorry for the outrageous xml.</p>