Hi! I am trying to make a for loop that iterates over a list of elements and does something only if that element is different from all the previous ones. My code looks like this but I get an error telling me that what I'm using is not an expression:

Code:
<xsl:template match="entity">
  <xsl:for-each select="subentity!=preceding::subentity">
    <!-- the template goes here -->
  </xsl:for-each>
</xsl:template>