I need to group the records based on the value in OperationID tag. If more than one record has same operationId, those records should be present in combinations tag and operationId should be common under operationdetails tag. I am using XSL vesion 1.0. Please find below the input xml and the required xml format. Kindly suggest some solution using 1.0
Input xml :
<root>
<records>
<record>
<OperationID>13</OperationID>
<GroupID>00</GroupID>
<UTC_TIME>2018-12-06</UTC_TIME>
<ID>123456789</ID>
<DocumentID>ShowOperationCode20181206071249</DocumentID>
<AllGroupID>JTH</AllGroupID>
<AllID>B21B1</AllID>
</record>
<record>
<OperationID>13</OperationID>
<GroupID>00</GroupID>
<UTC_TIME>2018-12-06</UTC_TIME>
<ID>123456789</ID>
<DocumentID>ShowOperationCode20181206071249</DocumentID>
<AllGroupID>JTT</AllGroupID>
<AllID>B21FB</AllID>
</record>
<record>
<OperationID>14</OperationID>
<GroupID>01</GroupID>
<UTC_TIME>2018-12-06</UTC_TIME>
<ID>123456788</ID>
<DocumentID>ShowOperationCode20181206071250</DocumentID>
<AllGroupID>KTH</AllGroupID>
<AllID>BFFHT</AllID>
</record>
</records>
</root>
required xml format :
<ApplicationArea>
<UTC_TIME>2018-12-06</UTC_TIME>
<ID>123456789</ID>
</ApplicationArea>
<DataArea>
<OpertionsHeader>
<DocumentID>ShowOperationCode20181206071249</DocumentID>
</OpertionsHeader>
<OperationsDetail>
<OperationID>13</OperationID>
<GroupID>00</GroupID>
<Combinations>
<Allowance>
<AllGroupID>JTH</AllGroupID>
<AllID>B21B1</AllID>
</Allowance>
<Allowance>
<AllGroupID>JTT</AllGroupID>
<AllID>B21FB</AllID>
</Allowance>
</Combinations>
</OperationsDetail>
<OperationsDetail>
<OperationID>14</OperationID>
<GroupID>01</GroupID>
<Combinations>
<Allowance>
<AllGroupID>KTH</AllGroupID>
<AllID>BFFHT</AllID>
</Allowance>
</Combinations>
</OperationsDetail>
</DataArea>