I have an xml file (sample below) and I want to group this xml based on consecutive Time_Off_Date.
<Root> <Entry> <Employee_ID>101</Employee_ID> <Time_Off_Details> <Time_Off_Date>2017-12-01</Time_Off_Date> </Time_Off_Details> <Time_Off_Details> <Time_Off_Date>2017-12-02</Time_Off_Date> </Time_Off_Details> <Time_Off_Details> <Time_Off_Date>2017-12-04</Time_Off_Date> </Time_Off_Details> <Time_Off_Details> <Time_Off_Date>2017-12-05</Time_Off_Date> </Time_Off_Details> </Entry> <Entry> <Employee_ID>102</Employee_ID> <Time_Off_Details> <Time_Off_Date>2017-12-10</Time_Off_Date> </Time_Off_Details> <Time_Off_Details> <Time_Off_Date>2017-12-13</Time_Off_Date> </Time_Off_Details> <Time_Off_Details> <Time_Off_Date>2017-12-14</Time_Off_Date> </Time_Off_Details> </Entry> </Root>
The final output should look like this (in CSV format).
Employee ID Time Off Start Time Off End 101 12/1/2017 12/2/2017 101 12/4/2017 12/5/2017 102 12/10/2017 12/10/2017 102 12/13/2017 12/14/2017
Is there a way to achieve this using XSLT 2.0 and without using recursive functions?? I am new to XSLT so any advice is appreciated.