Hi Everybody,
I want to split up individual records from a complex xml output by XSLT mapping.
Below is input xml:
<EmployeeTime> <EmployeeTime> <userId>100</userId> <timeType>A</timeType> <timeCalendar> <EmployeeTimeCalendar> <date>2018-05-10</date> <quantityInHours>8</quantityInHours> </EmployeeTimeCalendar> </timeCalendar> </EmployeeTime> <EmployeeTime> <userId>110</userId> <timeType>B</timeType> <timeCalendar> <EmployeeTimeCalendar> <date>2018-06-05</date> <quantityInHours>8</quantityInHours> </EmployeeTimeCalendar> <EmployeeTimeCalendar> <date>2018-06-06</date> <quantityInHours>8</quantityInHours> </EmployeeTimeCalendar> </timeCalendar> </EmployeeTime> </EmployeeTime>
Output should be like:
<EmployeeTime> <EmployeeTime> <userId>100</userId> <timeType>A</timeType> <timeCalendar> <EmployeeTimeCalendar> <date>2018-05-10</date> <quantityInHours>8</quantityInHours> </EmployeeTimeCalendar> </timeCalendar> </EmployeeTime> <EmployeeTime> <userId>110</userId> <timeType>B</timeType> <timeCalendar> <EmployeeTimeCalendar> <date>2018-06-05</date> <quantityInHours>8</quantityInHours> </EmployeeTimeCalendar> </timeCalendar> </EmployeeTime> <EmployeeTime> <userId>110</userId> <timeType>B</timeType> <timeCalendar> <EmployeeTimeCalendar> <date>2018-06-06</date> <quantityInHours>8</quantityInHours> </EmployeeTimeCalendar> </timeCalendar> </EmployeeTime> </EmployeeTime>
Can you please advise how to achieve this in XSLT.
Regards,
Matt