title: Grouping in a node with 3 attributes in xslt 1.0
body: <p>i need some help regarding grouping nodes in xslt 1.0. I am able to this in xslt 2.0 with for-each-group  but i don't know how to do it in 1.0. Shown below is sample xml, in which i want to group the 'CLM' node using a combination of ServiceId, WorkerId and Date of service on 'ClaimId' attribute and sum of 'Units'. If service given on same day by same worker more than once than combine those 'CLM' nodes.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;PRV ProviderId="100" PName="Giga health" Provsuv="1563"&gt;
      &lt;CLT ClientId="4444" ClientFName="John" ClientLastName="Pulaski" Phone="56462561"&gt;
          &lt;CLM Claimid="1"  DateOfService="01/02/2011" EndOfService="05/05/2011" ServiceId="S1" WorkerName="WORK1" WorkerId="6446" Unit= '5' Amount= '5000'/&gt;
          &lt;CLM Claimid="2"  DateOfService="01/02/2011" EndOfService="05/05/2011" ServiceId="S1" WorkerName="WORK1" WorkerId="6446" Unit= '6' Amount= '5000'/&gt;
          &lt;CLM Claimid="3"  DateOfService="01/02/2011" EndOfService="05/05/2011" ServiceId="S2" WorkerName="WORK1" WorkerId="2006" Unit= '7' Amount= '5000'/&gt;
          &lt;CLM Claimid="4"  DateOfService="01/03/2011" EndOfService="05/05/2011" ServiceId="S1" WorkerName="WOK2" WorkerId="6446" Unit= '3' Amount= '5000'/&gt;
          &lt;CLM Claimid="5"  DateOfService="01/03/2011" EndOfService="05/05/2011" ServiceId="S2" WorkerName="WORK2" WorkerId="6446" Unit= '8' Amount= '5000'/&gt;
          &lt;CLM Claimid="6" DateOfService="01/03/2011" EndOfService="05/05/2011" ServiceId="S2" WorkerName="WORK1" WorkerId="6446" Unit= '1' Amount= '5000'/&gt;
      &lt;/CLT&gt;
  </code></pre>
  
  <p></p>
  
  <p>My output should look like</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;PRV ProviderId="100" PName="Giga health" Provsuv="1563"&gt;
      &lt;CLT ClientId="4444" ClientFName="John" ClientLastName="Pulaski" Phone="56462561"&gt;
          &lt;CLM Claimid="1,2"  DateOfService="01/02/2011" EndOfService="05/05/2011" ServiceId="S1" WorkerName="WORK1" WorkerId="6446" Unit= '11' Amount= '10000'/&gt;
          &lt;CLM Claimid="3"  DateOfService="01/02/2011" EndOfService="05/05/2011" ServiceId="S2" WorkerName="WORK1" WorkerId="2006" Unit= '7' Amount= '5000'/&gt;
          &lt;CLM Claimid="4"  DateOfService="01/03/2011" EndOfService="05/05/2011" ServiceId="S1" WorkerName="WOK2" WorkerId="6446" Unit= '3' Amount= '5000'/&gt;
          &lt;CLM Claimid="5,6"  DateOfService="01/03/2011" EndOfService="05/05/2011" ServiceId="S2" WorkerName="WORK2" WorkerId="6446" Unit= '9' Amount= '10000'/&gt;
      &lt;/CLT&gt;
  </code></pre>
  
  <p></p>
  
  <p>My output xml should have 'Claimid' combined and Units to be summed up for same serviceId on same DateofService for a specific 'WorkerId'. Thanks in advance.</p>