Hi,
I am new to XSL and I'm having issues coming up with a solution for this problem.
I have the XML structure below:
<Root>
<CUs>
<CU>
<ContractNr>12345</ContractNr>
<FullName>Alison full</FullName>
<id>111</id>
</CU>
<CU>
<ContractNr>45678</ContractNr>
<FullName>Nancy Full</FullName>
<id>222</id>
</CU>
</CUs>
<Results>
<Result>
<AccountId>0000-0000-0005</AccountId>
<OrgNr>12345</OrgNr>
<Status>Active</Status>
<FullName>Alison full</FullName>
</Result>
<Result>
<AccountId>0000-0000-0005</AccountId>
<OrgNr>45678</OrgNr>
<Status>Active</Status>
<FullName>Steve Full</FullName>
</Result>
</Results>
</Root>
I need using XSLT to output the following XML result:
<Output>
<Customer>
<ContractNr>45678</ContractNr>
<FullName>Nancy Full</FullName>
<Status>Active</Status>
</Customer>
</Output>
What i need is to loop into all <CU> and using the <ContractNr> value to finds its match <Result>. The <OrgNr> of a Result will contain the same value as <ContractNr> in a CU.
Once the 2 records are matched I need to compare the FullName from the <CU> against the FullName of the <Result>. If the FullNames are not the same then output the XML above.
If the fullname is the same then do nothing.
So the output xml above is what I'd get if i use the input xml at the begining.
Thanks!