I have Created a Bi Template with some sub templates. I need to get Multiple Copies of Sub templates in pdf according to its quantity.

I used the below code for that , but its not working...
<?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,/
Quantity_ID10,1)?>

For Eg: if there are three Sub templates and quantity for each is 3,5 and 2 respectively then the number of PDF copies printed will be 3 for first sub templates next 5, 2 respectively.

For above code it working as, if there are three Sub templates and quantity for each is 3,5 and 2 respectively then the number of PDF copies printed will be 3 for all sub templates.
Only the initial templates quantity is read

Anybody can help.....?