I like Aljandro's answer, but in case somebody insists on using a higher version of XSLT and treating the values really as those of year, month, day-of-month, hours, minutes and seconds, then something like below can be used,
This transformation may look a little bit more complex, but it treats the children of as values of these typed objects and will throw an error if an invalid component value is encountered -- such as Feb 30th, month: 13, hour: 25, or minute/second 61
When this transformation is applied on the provided source xml document:
Bob the Builder
00290035
g
2019
3
18
14
52
0
Bob the Builder
00290035
c
2018
3
18
14
22
0
Mike Zeh
00200060
c
2019
3
17
10
15
0
the wanted, correct result is produced:
Mike Zeh
00200060
c
2019
3
17
10
15
0
Bob the Builder
00290035
c
2018
3
18
14
22
0
Bob the Builder
00290035
g
2019
3
18
14
52
0