title: Count Distinct Value
body: <p>I have to do a report summary table that will be displaying the same data. Tried using the xdoxslt:distinct_values to group the same value but it does not work nor it displays any error. </p>
  
  <p>What I have right now:</p>
  
  <p>001 - 1</p>
  
  <p>002 - 1</p>
  
  <p>001 - 1</p>
  
  <p>What I need to achieve:</p>
  
  <p>001 - 2</p>
  
  <p>002 - 1</p>
  
  <p>To eliminate the distinct values for the 001 I used the code as per below</p>
  
  <pre><code>&lt;?CwaProductCode[not(.=preceding::CwaProductCode)]?&gt;
  </code></pre>
  
  <p>Tried using the code as per below to count the distinct values but it does not work</p>
  
  <pre><code>&lt;?count(xdoxslt:distinct_values(CwaProductCode))?&gt;
  </code></pre>
  
  <p>Any suggestions?</p>