[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problem with obtaining distinct values from a var

Subject: Re: 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
preceding sibling distinct values
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.