title: Xslt- preceding-sibling within for-each
body: <p>So I have this xml code and two of the nodes have the same ID-value. How can I not display the same node if it has the same value as a preceding-sibling?</p>
  
  <p>That is if A = 12, B = 10, C = !2. 
  The Xslt file shouldn't display C as it has the same value as A. </p>
  
  <p>here the XML</p>
  
  <pre><code>&lt;Services&gt;
      &lt;ServiceBooking&gt; 
          &lt;ID&gt;A&lt;/ID&gt;               
          &lt;ServiceID&gt;12&lt;/ServiceID&gt;        
      &lt;/ServiceBooking&gt;
      &lt;ServiceBooking&gt;
          &lt;ID&gt;B&lt;/ID&gt;            
          &lt;ServiceID&gt;10&lt;/ServiceID&gt;        
      &lt;/ServiceBooking&gt;
      &lt;ServiceBooking&gt;
          &lt;ID&gt;C&lt;/ID&gt;        
          &lt;ServiceID&gt;12&lt;/ServiceID&gt;        
      &lt;/ServiceBooking&gt;
  &lt;/services&gt;
  </code></pre>
  
  <p>and the Xslt</p>
  
  <pre><code>&lt;xsl:for-each select="Services/ServiceBooking[not(preceding-sibling::ServiceID)]"&gt;
      &lt;tr&gt;
          &lt;td class="name"&gt;&lt;xsl:value-of select="ID" /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;xsl:value-of select="ServiceID"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>Can anyone of you guys help me with this?</p>
  
  <p>mvh</p>