title: Change existing element name using the attribute value using XSLT
body: <p>I got an XML file that's using very generic XML tag names but a rich attribute structure such as:
  <code>&lt;Field Name="CRSDESC1" FieldName="{@CRS_DESC}"&gt;&lt;FormattedValue&gt;Survey of Human Anatomy and Physiology&lt;/FormattedValue&gt;&lt;/Field&gt;</code></p>
  
  <p>I want to change the existing element name as shown above by using the "Name" attribute, to this: 
      <code>&lt;CRSDESC1&gt;Survey of Human Anatomy and Physiology&lt;/CRSDESC1&gt;</code></p>
  
  <p>Once we create the new element, we no longer need the element <code>&lt;FormattedValue&gt;</code> nor the duplicate <code>&lt;Value&gt;</code></p>
  
  <p>Here is a sample section of the XML:</p>
  
  <p><code>&lt;CrystalReport&gt; &lt;ReportHeader&gt;&lt;Details Level="1"&gt;
  &lt;Section SectionNumber="0"&gt;
  &lt;Field Name="CRSDESC1" FieldName="{@CRS_DESC}"&gt;&lt;FormattedValue&gt;Heating and Air Contracting&lt;/FormattedValue&gt;&lt;Value&gt;Heating and Air Contracting&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSTITLE1" FieldName="{@CRS_TITLE}"&gt;&lt;FormattedValue&gt;Heating and Air Conditioning Contracting&lt;/FormattedValue&gt;&lt;Value&gt;Heating and Air Conditioning Contracting&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSDEPTS1" FieldName="{Command.CRS_DEPTS}"&gt;&lt;FormattedValue&gt;AIRC&lt;/FormattedValue&gt;&lt;Value&gt;AIRC&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="DEPTSDESC1" FieldName="{Command.DEPTS_DESC}"&gt;&lt;FormattedValue&gt;Heating, A/C &amp;amp; Refrigeration&lt;/FormattedValue&gt;&lt;Value&gt;Heating, A/C &amp;amp; Refrigeration&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSNO1" FieldName="{Command.CRS_NO}"&gt;&lt;FormattedValue&gt;2260&lt;/FormattedValue&gt;&lt;Value&gt;2260&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSSTANDARDARTICULATIONNO1" FieldName="{Command.CRS_STANDARD_ARTICULATION_NO}"&gt;&lt;FormattedValue&gt;&lt;/FormattedValue&gt;&lt;Value&gt;&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSMINCRED1" FieldName="{Command.CRS_MIN_CRED}"&gt;&lt;FormattedValue&gt;3.00&lt;/FormattedValue&gt;&lt;Value&gt;3.00&lt;/Value&gt;&lt;/Field&gt;
     &lt;/Section&gt;
     &lt;/Details&gt;
     &lt;Details Level="1"&gt;
  &lt;Section SectionNumber="0"&gt;
  &lt;Field Name="CRSDESC1" FieldName="{@CRS_DESC}"&gt;&lt;FormattedValue&gt;Survey of Human Anatomy and Physiology&lt;/FormattedValue&gt;&lt;Value&gt;Survey of Human Anatomy and Physiology&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSTITLE1" FieldName="{@CRS_TITLE}"&gt;&lt;FormattedValue&gt;Survey of Human Anatomy and Physiology&lt;/FormattedValue&gt;&lt;Value&gt;Survey of Human Anatomy and Physiology&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSDEPTS1" FieldName="{Command.CRS_DEPTS}"&gt;&lt;FormattedValue&gt;ANAT&lt;/FormattedValue&gt;&lt;Value&gt;ANAT&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="DEPTSDESC1" FieldName="{Command.DEPTS_DESC}"&gt;&lt;FormattedValue&gt;Anatomy &amp;amp; Physiology&lt;/FormattedValue&gt;&lt;Value&gt;Anatomy &amp;amp; Physiology&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSNO1" FieldName="{Command.CRS_NO}"&gt;&lt;FormattedValue&gt;1500&lt;/FormattedValue&gt;&lt;Value&gt;1500&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSSTANDARDARTICULATIONNO1" FieldName="{Command.CRS_STANDARD_ARTICULATION_NO}"&gt;&lt;FormattedValue&gt;L1 904L&lt;/FormattedValue&gt;&lt;Value&gt;L1 904L&lt;/Value&gt;&lt;/Field&gt;
  &lt;Field Name="CRSMINCRED1" FieldName="{Command.CRS_MIN_CRED}"&gt;&lt;FormattedValue&gt;4.00&lt;/FormattedValue&gt;&lt;Value&gt;4.00&lt;/Value&gt;&lt;/Field&gt;
  &lt;/Section&gt;
  &lt;/Details&gt; &lt;ReportHeader&gt;&lt;CrystalReport&gt;</code></p>