title: XSLT: Remove duplicate nodes based on name attribute
body: <p>I have the below input XML which needs to be transformed with an xslt </p>
  
  <p>Input Xml:</p>
  
  <pre><code>&lt;result&gt;
      &lt;circuit&gt;MX123456&lt;/circuit&gt;
      &lt;psaresult&gt;
          &lt;Live_Alarms&gt;
              &lt;diagnosis&gt;
                  &lt;utr&gt;xxx&lt;/utr&gt;
                  &lt;dtr&gt;xxx&lt;/dtr&gt;
                  &lt;text /&gt;
                  &lt;site&gt;xxx&lt;/site&gt;
                  &lt;address /&gt;
                  &lt;tech_type /&gt;
                  &lt;end /&gt;
                  &lt;network_type&gt;xxx&lt;/network_type&gt;
              &lt;/diagnosis&gt;
              &lt;Alarms&gt;
                  &lt;alarmId&gt;463&lt;/alarmId&gt;
                  &lt;cct&gt;xxx&lt;/cct&gt;
                  &lt;eventTime&gt;12/05/11 09:21:21&lt;/eventTime&gt;
                  &lt;clearTime /&gt;
                  &lt;problemCode&gt;xxxx&lt;/problemCode&gt;
                  &lt;problemText&gt;xxxx&lt;/problemText&gt;
                  &lt;equipmentName&gt;xxx&lt;/equipmentName&gt;
                  &lt;unit&gt;xxx&lt;/unit&gt;
                  &lt;rcKey&gt;xxx&lt;/rcKey&gt;
                  &lt;category&gt;xxx&lt;/category&gt;
                  &lt;rootCause&gt;xxxx&lt;/rootCause&gt;
              &lt;/Alarms&gt;
              &lt;Alarms&gt;
                  &lt;alarmId&gt;464&lt;/alarmId&gt;
                  &lt;cct&gt;xxx&lt;/cct&gt;
                  &lt;eventTime&gt;12/05/11 09:21:22&lt;/eventTime&gt;
                  &lt;clearTime /&gt;
                  &lt;problemCode&gt;yyyy&lt;/problemCode&gt;
                  &lt;problemText&gt;yyyy&lt;/problemText&gt;
                  &lt;equipmentName&gt;yyyy&lt;/equipmentName&gt;
                  &lt;unit&gt;yyyy&lt;/unit&gt;
                  &lt;rcKey&gt;yyyy&lt;/rcKey&gt;
                  &lt;category&gt;yyyy&lt;/category&gt;
                  &lt;rootCause&gt;yyyy&lt;/rootCause&gt;
              &lt;/Alarms&gt;
          &lt;/Live_Alarms&gt;
      &lt;/psaresult&gt;
  &lt;/result&gt;
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>&lt;result&gt;
      &lt;circuit&gt;MX123456&lt;/circuit&gt;
      &lt;psaresult&gt;
          &lt;Live_Alarms&gt;
              &lt;psadiagnosis&gt;
                  &lt;utr&gt;xxx&lt;/utr&gt;
                  &lt;dtr&gt;xxx&lt;/dtr&gt;
                  &lt;text /&gt;
                  &lt;site&gt;xxx&lt;/site&gt;
                  &lt;address /&gt;
                  &lt;tech_type /&gt;
                  &lt;end /&gt;
                  &lt;network_type&gt;xxx&lt;/network_type&gt;
              &lt;/psadiagnosis&gt;
              &lt;Alarms&gt;
                  &lt;alarmId&gt;463&lt;/alarmId&gt;
                  &lt;cct&gt;xxx&lt;/cct&gt;
                  &lt;eventTime&gt;12/05/11 09:21:21&lt;/eventTime&gt;
                  &lt;clearTime /&gt;
                  &lt;problemCode&gt;xxxx&lt;/problemCode&gt;
                  &lt;problemText&gt;xxxx&lt;/problemText&gt;
                  &lt;equipmentName&gt;xxx&lt;/equipmentName&gt;
                  &lt;unit&gt;xxx&lt;/unit&gt;
                  &lt;rcKey&gt;xxx&lt;/rcKey&gt;
                  &lt;category&gt;xxx&lt;/category&gt;
                  &lt;rootCause&gt;xxxx&lt;/rootCause&gt;
              &lt;/Alarms&gt;
          &lt;/Live_Alarms&gt;
      &lt;/psaresult&gt;
  &lt;/result&gt;
  </code></pre>
  
  <p><strong>Note</strong>: Ony the first <code>Alarms</code> node is needed like what <code>SelectSinglenode</code> does and all others needed to be truncated from the output. Can you please advise how this can be achieved from an xslt?</p>