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

Distinct items?

Subject: Distinct items?
From: eric@xxxxxxxxxxxx (Eric Vitiello)
Date: Tue, 27 Mar 2001 11:22:25 -0500
xsl distinct items
Hi,

I would like to retrieve a list of items such as:

1998 1999 2000

from the following XML:

<projects>
	<item>
		<year>1998</year>
	</item>
	<item>
		<year>1998</year>
	</item>
	<item>
		<year>1999</year>
	</item>
	<item>
		<year>2000</year>
	</item>
	<item>
		<year>2000</year>
	</item>
</projects>


I have tried:

<xsl:for-each select="projects/item">
<xsl:variable name="x" expr="year"/>
	<xsl:if test='not(from-following-siblings(*[year=$x]))'>
		<xsl:value-of select="year"/>
	</xsl:if>
</xsl:for-each>

which was modified from an example written to this list in 1999 (http://www.biglist.com/lists/xsl-list/archives/199907/msg00225.html), but that doesn't work in the MSXML3 parser.  I receive the error:

'following-siblings' is not a valid XSLT or XPath function. not(-->from-following-siblings(*[year=$x])<--)

any ideas on how I can make this work for this parser?

Thanks!
--Eric


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.