title: Getting node captions using XSLT
body: <p>I have this XML document:</p>
  
  <pre><code>&lt;/Items&gt;
  &lt;Item&gt;
    &lt;Id&gt;1&lt;/Id&gt;
    &lt;Weekday&gt;4&lt;/Weekday&gt;
    &lt;WeekdayName&gt;Wednesday&lt;/WeekdayName&gt;
    &lt;Hour0&gt;12&lt;/Hour0&gt;
    &lt;Hour1&gt;5&lt;/Hour1&gt;
    &lt;Hour2&gt;9&lt;/Hour2&gt;
  &lt;/Item&gt;
  &lt;Item&gt;
    &lt;Id&gt;1&lt;/Id&gt;
    &lt;Weekday&gt;5&lt;/Weekday&gt;
    &lt;WeekdayName&gt;Thursday&lt;/WeekdayName&gt;
    &lt;Hour0&gt;10&lt;/Hour0&gt;
    &lt;Hour1&gt;8&lt;/Hour1&gt;
    &lt;Hour2&gt;15&lt;/Hour2&gt;
  &lt;/Item&gt;
  &lt;/Items&gt;
  </code></pre>
  
  <p>and I need to convert it into the following XML document using XSLT:</p>
  
  <pre><code>&lt;report&gt;
    &lt;categories&gt;
      &lt;category label="Hour1"/&gt;
      &lt;category label="Hour2"/&gt;
      &lt;category label="Hour3"/&gt;
    &lt;/categories&gt;
    &lt;dataset day="Wednesday"&gt;
     &lt;set value="12"/&gt;
     &lt;set value="5"/&gt;
     &lt;set value="9"/&gt;
    &lt;/dataset&gt;
    &lt;dataset day="Thursday"&gt;
     &lt;set value="10"/&gt;
     &lt;set value="8"/&gt;
     &lt;set value="15"/&gt;
    &lt;/dataset&gt;
  &lt;/report&gt;
  </code></pre>
  
  <p>I am able to get node values but not able to get node captions. How can I perform this conversion? I'm new to XSLT.</p>