title: XSLT: counting specific nodes based on multiple criteria
body: <p>I have some XML which I would like to transform into a report showing counts on the number of nodes matching a specific criteria within a date period.</p>
  
  <p>Example xml below. I am trying to show a count of nodes based on Status within a date range.</p>
  
  <p>I can match based on date range but I am having trouble showing the status count within that range. Any pointers appreciated.</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;List&gt;
       &lt;Item&gt;
         &lt;Value name="Status"&gt;Open&lt;/Value&gt;    
         &lt;Value name="Date"&gt;2012-09-01&lt;/Value&gt;
         &lt;Value name="Name"&gt;Item 1&lt;/Value&gt;
       &lt;/Item&gt;
       &lt;Item&gt;
         &lt;Value name="Status"&gt;Open&lt;/Value&gt; 
         &lt;Value name="Date"&gt;2012-10-15&lt;/Value&gt;
         &lt;Value name="Name"&gt;Item 2&lt;/Value&gt;
       &lt;/Item&gt;
       &lt;Item&gt;
         &lt;Value name="Status"&gt;Open&lt;/Value&gt; 
         &lt;Value name="Date"&gt;2012-10-15&lt;/Value&gt;
         &lt;Value name="Name"&gt;Item 3&lt;/Value&gt;
       &lt;/Item&gt;
       &lt;Item&gt;
         &lt;Value name="Status"&gt;Pending&lt;/Value&gt; 
         &lt;Value name="Date"&gt;2012-10-20&lt;/Value&gt;
         &lt;Value name="Name"&gt;Item 4&lt;/Value&gt;
       &lt;/Item&gt;
       &lt;Item&gt;
         &lt;Value name="Status"&gt;Closed&lt;/Value&gt;
         &lt;Value name="Date"&gt;2012-10-30&lt;/Value&gt;
         &lt;Value name="Name"&gt;Item 5&lt;/Value&gt;
       &lt;/Item&gt;
      &lt;/List&gt;
  </code></pre>
  
  <p>Example output would be:- </p>
  
  <pre><code>   Status         2012-10-01 - 2012-10-31
     Open           2
     Closed         1
     Pending        1
  </code></pre>