We need a solution to add the count for each node by using XSLT.The count value should take it from the BIG node Records and add to the next node "NTE" and etc.
for example in below xml element BIG exist only one time and NTE ,BSE repeated.
I have input xml below,
<?xml version = '1.0' encoding = 'UTF-8'?>
<PORoot>
<BIG>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-SEG-SEQ/>
</BIG>
<NTE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ/>
</NTE>
<NTE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ/>
</NTE>
<NTE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ/>
</NTE>
<BSE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ/>
</BSE>
<BSE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ/>
</BSE>
</PORoot>
<?xml version = '1.0' encoding = 'UTF-8'?>
<PORoot>
<BIG>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-SEG-SEQ>1</ER-SEG-SEQ>
</BIG>
<NTE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ>2</ER-EXP-SEG-SEQ>
</NTE>
<NTE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ>3</ER-EXP-SEG-SEQ>
</NTE>
<NTE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ>4</ER-EXP-SEG-SEQ>
</NTE>
<BSE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ>5</ER-EXP-SEG-SEQ>
</BSE>
<BSE>
<ER-CUST-ACCOUNT>123</ER-CUST-ACCOUNT>
<ER-EXP-SEG-SEQ>6</ER-EXP-SEG-SEQ>
</BSE>
</PORoot>