I have following XML, elements are dynamically generated and can change from time to time, therefore I can't hard code field name,
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<datacollection id="amazon_order.1">
<table name="order_detail">
<row name="default_options">
<field name="zipCode">800227028</field>
<field name="customerLastName">COMER</field>
<field name="state">CO</field>
<field name="city">COMMERCE CITY</field>
<field name="serialNumber">818243CX601252Y</field>
</row>
</table>
</datacollection>
And want to transform it into following format using XSLT,
<datacollection id="amazon_order.1">
<table name="order_detail">
<row name="default_options">
<zipCode>800227028</zipCode>
<customerLastName>COMER</customerLastName>
<state>CO</state>
<city>COMMERCE CITY</city>
<serialNumber>818243CX601252Y</serialNumber>
</row>
</table>
</datacollection>
<field>
element to an element named by the original element'sname
attribute, leaving everything else unchanged? – John Bollinger