Append/Merge in XSLT
hi all,
We have a requirement in our project where we need to convert the following source xml into the target xml.
source:
<Request xmlns="http://xmlns.oracle.com/testApp_jws/Extract/Extract">
<Reg>
<RefNum>RefNum1</RefNum>
<Name>Name2</Name>
<Status>Status3</Status>
</Reg>
<Reg>
<RefNum>RefNum4</RefNum>
<Name>Name5</Name>
<Status>Status6</Status>
</Reg>
<Reg>
<RefNum>RefNum1</RefNum>
<Name>Name2</Name>
<Status>Status3_New</Status>
</Reg>
<Reg>
<RefNum>RefNum7</RefNum>
<Name>Name8</Name>
<Status>Status9</Status>
</Reg>
</Request>
target:
<client:Response xmlns:client="http://xmlns.oracle.com/testApp_jws/Extract/Extract">
<client:Reg_Target>
<client:RefNum>RefNum1</client:RefNum>
<client:Name>Name2</client:Name>
<client:Status>
<client:Status>Status3</client:Status>
<client:Status>Status3_New</client:Status>
</client:Status>
</client:Reg_Target>
<client:Reg_Target>
<client:RefNum>RefNum4</client:RefNum>
<client:Name>Name5</client:Name>
<client:Status>
<client:Status>Status6</client:Status>
</client:Status>
</client:Reg_Target>
<client:Reg_Target>
<client:RefNum>RefNum7</client:RefNum>
<client:Name>Name8</client:Name>
<client:Status>
<client:Status>Status9</client:Status>
</client:Status>
</client:Reg_Target>
</client:Response>
Basically, we need to look out for IDs and merge the Statuses using XSLT. Please throw some light on this if anybody has worked on it before.
Thanks,
KK
Edited by: 863732 on 15-Jan-2012 19:42