I have a piece of XML data with information for multiple persons represented as -
<phoneContact>
<firstName>XXXXX</firstName>
<middleName>Y</middleName>
<lastName>ZZZZZ</lastName>
<phone>1234567890</phone>
</phoneContact>
<phoneContact>
<firstName>AAAA</firstName>
<middleName>B</middleName>
<lastName>CCCCC</lastName>
<phone>9876543210</phone>
</phoneContact>
There may be any number of persons available. I want to transform this into -
<phoneContact1>
<firstName>XXXXX</firstName>
<middleName>Y</middleName>
<lastName>ZZZZZ</lastName>
<phone>1234567890</phone>
</phoneContact1>
<phoneContact2>
<firstName>AAAA</firstName>
<middleName>B</middleName>
<lastName>CCCCC</lastName>
<phone>9876543210</phone>
</phoneContact2>
.. and so forth. How do I construct an XSL for-each code that creates multiple such different element names ?
Thank you for any help with this.