title: XSLT: Group XML elements by type and output as HTML tables
body: <p>I have XML containing elements describing the name,value,sfid,feildsection of objects.         Objects are grouped by type feildsection as providersection and devidetype .
  my xml given blow</p>
  
  <pre><code> &lt;RequestFields&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Financial Change Type&lt;/Name&gt;
    &lt;Value&gt;F/R Change (IRU to CRU)&lt;/Value&gt;
    &lt;sfid&gt;Type&lt;/sfid&gt;
    &lt;feildsection&gt;devicetype&lt;/feildsection&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Service Number&lt;/Name&gt;
    &lt;Value&gt;111-111-1111&lt;/Value&gt;
    &lt;sfid&gt;00N30000000lTGp&lt;/sfid&gt;
    &lt;feildsection&gt;serviceNo&lt;/feildsection&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Confirm Service Number&lt;/Name&gt;
    &lt;Value&gt;111-111-1111&lt;/Value&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Device User&lt;/Name&gt;
    &lt;Value&gt;Manager&lt;/Value&gt;
    &lt;sfid&gt;00N30000000m6c7&lt;/sfid&gt;
    &lt;feildsection&gt;ServiceNo&lt;/feildsection&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Provider&lt;/Name&gt;
    &lt;Value&gt;ATT&lt;/Value&gt;
    &lt;sfid&gt;Provider__c&lt;/sfid&gt;
    &lt;feildsection&gt;Deviceotype&lt;/feildsection&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;ExistingDeviceType&lt;/Name&gt;
    &lt;Value&gt;BlackBerry&lt;/Value&gt;
    &lt;sfid&gt;Current_Equipment_Type__c&lt;/sfid&gt;
    &lt;feildsection&gt;devicetype&lt;/feildsection&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Current Account Number&lt;/Name&gt;
    &lt;Value&gt;I don't know this information&lt;/Value&gt;
    &lt;sfid&gt;00N30000001BRgi&lt;/sfid&gt;
  
  &lt;/RequestField&gt;
  &lt;RequestField hide="1"&gt;
    &lt;Name&gt;Current Password&lt;/Name&gt;
    &lt;Value&gt;I don't know this information&lt;/Value&gt;
    &lt;sfid&gt;Active_Profile_Password__c&lt;/sfid&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Current Billing Name&lt;/Name&gt;
    &lt;Value&gt;I don't know this information&lt;/Value&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Current Billing Address&lt;/Name&gt;
    &lt;Value&gt;I don'tknowthisinformation&lt;/Value&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Manufacturer&lt;/Name&gt;
    &lt;Value&gt;&lt;/Value&gt;
    &lt;sfid&gt;00N30000001BRm8&lt;/sfid&gt;
    &lt;feildsection&gt;devicetype&lt;/feildsection&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;Model&lt;/Name&gt;
    &lt;Value&gt;&lt;/Value&gt;
    &lt;sfid&gt;Activate_New_Equipment_Model__c&lt;/sfid&gt;
  &lt;/RequestField&gt;
  &lt;RequestField&gt;
    &lt;Name&gt;DeviceType&lt;/Name&gt;
    &lt;Value&gt;BlackBerry&lt;/Value&gt;
    &lt;sfid&gt;Equipment_Type__c&lt;/sfid&gt;
  &lt;/RequestField&gt;
  </code></pre>
  
  <p></p>
  
  <p>I would like to group xml nodes grouping by feildsection type.i want to my output 
  which nodes are have fieldsection value same that will come in one section group ,if node doesn't have feildsection then that feilds are displayed in last.pls help to find solution</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;
  &lt;td colspan=2&gt;Devicetype&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Financial Change Type&lt;/td&gt;
  &lt;td&gt;F/R Change (IRU to CRU)&lt;td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Provider&lt;/td&gt;
  &lt;td&gt;ATT&lt;td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;ExistingDeviceType&lt;/td&gt;
  &lt;td&gt;BlackBerry&lt;td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Current Account Number&lt;/td&gt;
  &lt;td&gt;I don't know this information&lt;td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Manufacturer&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td colspan=2&gt;serviceNo&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Service Number&lt;/td&gt;
  &lt;td&gt;111-111-1111&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Device User&lt;/td&gt;
  &lt;td&gt;Manager&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Confirm Service Number&lt;/td&gt;
  &lt;td&gt;111-111-1111&lt;/td&gt;
  &lt;td&gt;Current Account Number&lt;/td&gt;
  &lt;td&gt;I don't know this information&lt;/td&gt;
  &lt;td&gt;Current Password&lt;/td&gt;
  &lt;td&gt;I don't know this information&lt;/td&gt;
  &lt;td&gt;Current Billing Name&lt;/td&gt;
  &lt;td&gt;I don't know this information&lt;/td&gt;
  &lt;td&gt;Current Billing Address&lt;/td&gt;
  &lt;td&gt;I don'tknowthisinformation&lt;/td&gt;
  &lt;td&gt;Model&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;`
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>