[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 15:54:11 +0100
Re:  Problem with obtaining distinct values from a  var
Hi Ian,

> How would I go about getting distinct values from the single parameter
> "$services"?

It would be easier if you gave an example of what the $services look like.
I will Assume that it will be a group of elements called foo
<foo>value1</foo>
<foo>value2</foo>
<foo>value1</foo>
<foo>value3</foo>
<foo>value2</foo>

Then you can find them the usual way (relying on implicit conversion to
string):
<xsl:for-each select="$services[.!=preceding-sibling::foo]">
  Do something
</xsl:for-each>

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.