Re: [xsl] Problem with obtaining distinct values from a variable containg a nodeset

Subject: Re: [xsl] Problem with obtaining distinct values from a variable containg a nodeset
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Tue, 29 Nov 2005 18:39:52 +0100
> I am currently using "not", as I believe using "!=" as suggested earlier
> would always return true ?
You are probably right. I am not quite sure about the string
convertion here. If they are strings, not(a=b) is equal to a!=b, but
this is not generally the case.

> <xsl:for-each
> select="$services[not(preceding-sibling::MDBServiceDesc=.)]">
>  Do something
> </xsl:for-each>
>
> I get the required list output, but still containing the duplicates.

What about:
<xsl:for-each
select="$services[not(preceding-sibling::MDBServiceDesc/text()=text())]">
 ?
You should perhaps do a normalize-space as well.

Regards,
Ragulf Pickaxe :-)

Current Thread