I am new to XSLT. I want to convert one XML format to another format. Input format:
<record>
<field>Firstname</field>
<field>Lastname</field>
</record>
<record>
<field>abc</field>
<field>def</field>
</record>
<record>
<field>geh</field>
<field>fgh</field>
</record>
I need output from XSLT as shown below. Note that first record in the input will have the field names. Number of fields in the inputs can very so XSLT should take care of that as well.
<record>
<Firstname>abc</field>
<Lastname>def</field>
</record>
<record>
<Firstname>geh</field>
<Lastname>fgh</field>
</record>
Any help will be much appreciated.
Thanks,