title: how to get preceding-sibling to work in xslt
body: <p>Given this XML:</p>
  
  <pre><code>&lt;Table&gt;
    &lt;ID&gt;3589&lt;/ID&gt;
    &lt;Type&gt;Change Request&lt;/Type&gt;
    &lt;Version&gt;1&lt;/Version&gt;
    &lt;Summary&gt;...&lt;/Summary&gt;
  &lt;/Table&gt;
  &lt;Table&gt;
    &lt;ID&gt;3596&lt;/ID&gt;
    &lt;Version&gt;1&lt;/Version&gt;
    &lt;Type&gt;Change Request&lt;/Type&gt;
    &lt;Summary&gt;...&lt;/Summary&gt;
  &lt;/Table&gt;
  &lt;Table&gt;
    &lt;ID&gt;4818&lt;/ID&gt;
    &lt;Type&gt;Bug&lt;/Type&gt;
    &lt;Version&gt;1&lt;/Version&gt;
    &lt;Summary&gt;...&lt;/Summary&gt;
  &lt;/Table&gt;
  &lt;Table&gt;
    &lt;ID&gt;4819&lt;/ID&gt;
    &lt;Type&gt;Bug&lt;/Type&gt;
    &lt;Version&gt;1&lt;/Version&gt;
    &lt;Summary&gt;...&lt;/Summary&gt;
  &lt;/Table&gt;
  &lt;Table&gt;
    &lt;ID&gt;4820&lt;/ID&gt;
    &lt;Type&gt;Bug&lt;/Type&gt;
    &lt;Version&gt;2&lt;/Version&gt;
    &lt;Summary&gt;...&lt;/Summary&gt;
  &lt;/Table&gt;
  </code></pre>
  
  <p>I use this XSLT:</p>
  
  <pre><code>...
  &lt;xsl:for-each select="//Table[Version=$vn]"&gt;
    &lt;xsl:sort select="Type" /&gt;
     &lt;xsl:variable name="currentType" select="Type" /&gt;
     &lt;xsl:if test="not($currentType=preceding-sibling::Table/Type)"&gt;
        &lt;h2&gt;&lt;xsl:value-of select="Type" /&gt;&lt;/h2&gt;
     &lt;/xsl:if&gt;
     &lt;p&gt;&lt;b&gt;&lt;xsl:value-of select="ID" /&gt;&lt;/b&gt;:&lt;xsl:value-of select="Summary" /&gt;&lt;/p&gt;
  &lt;/xsl:for-each&gt;
  ...
  </code></pre>
  
  <p>What test do I need to use to only show Type when it changes? I only want te first occurence to show. Right now preceding-sibling::Table/Type always refers to the first 'row'</p>
  
  <p>The transformation is done in C#.</p>