In another XSLT processor, for example Xalan - I get the true number of
unique @roletype

In IDM I get 0.

<xsl:stylesheet exclude-result-prefixes="pifu exsl"
extension-element-prefixes="nxsl" version="1.0"

<xslutput indent="yes" method="xml"/>
<!-- Region: Keys -->
<xsl:key match="@roletype" name="kRoleByID" use="."/>
<!-- Region: Global Variables: Unique Nodes-->
<xsl:variable name="uniqueRoles"

select="/enterprise/membership/member/role/@roletype[generate-id(.) =
generate-id(key('kRoleByID', .)[1])]"/>

<xsl:template match="/">
Unique Roles: <xsl:value-of select="count($uniqueRoles)"/>

The ECMAScript unique function gives the correct result.

Anyone seen this before and know what I am doing wrong?