Updated
I have some huge data, which becomes a large table say table parent
each table parent\'s row will
I have same problem and simplest way to solve it is to use Saxon. Here you can find my solution Incrementing and checking the counter variable in XSLT