Here address node is repeating. I want to get the number of occurance of the repeating elements. The expected output is:
<?xml version="1.0" encoding="UTF-8"?>
<entry>
<name attr1="hello1">
<name_first>John </name_first>
<name_middle>B. </name_middle>
<name_last>Smith </name_last>
</name>
<address>
<address_1_1>100 Evans Ct.</address_1_1>
<city_1>Carrboro</city_1>
<state_1>NC</state_1>
<zip_1>27510</zip_1>
</address>
<address>
<address_1_2>100 Evans Ct.</address_1_2>
<city_2>Carrboro</city_2>
<state_2>NC</state_2>
<zip_2>27510</zip_2>
</address>
</entry>
If the element zip is repeating again, then the output should be <zip_3>. The same should be applicable for attributes also. Is this posible with XSLT 2.0??? Please help