My source xml file has elements in this form:
<Employees>
<Employee>
<Name>ABC</Name>
<City>Delhi</Delhi>
</Employee>
<Employee>
<Name>ABC</Name>
<City>Mumbai</Delhi>
</Employee>
<Employee>
<Name>KBC</Name>
<City>Kolkata</Delhi>
</Employee>
</Employees>
Here, if the employee’s name is same then the XSLT will concatenate the City with pipe.
<Employees>
<Employee>
<Name>ABC</Name>
<City>Delhi|Mumbai</Delhi>
</Employee>
<Employee>
<Name>KBC</Name>
<City>Kolkata</Delhi>
</Employee>
</Employees>
New contributor
Arpit is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.