Sorry I could not reply earlier. Yes, I figured out how to do it and happy that you agree with it !!!
But I have one more requirement I am struggling with.
The file can have under every invoice header /DT_HEADER_01>, many gl lines <DT_GLLINE_04> that can be more than 949 for e.g. 1000. In this case I need to split this invoice into 2 parts - one containing all header information + first 949
<DT_GLLINE_04> lines for that invoice; and another invoice with exactly the same header nodes and the remaining 51 <DT_GLLINE_04> lines in it.
Please could you specify in your latest xslt how to achieve this.
Asking only because I am struggling currently to get my head round xslt commands since I am very new to it.