This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Distinct items?


Thanks!  that worked excellently!

> Hello
> You can use this:
>  select='//item[not(year = preceding-sibling::item/year)]'>
> 
> I hope that helps
> 
> Edmund
> 
> -----Original Message-----
> From: eric@perceive.net [mailto:eric@perceive.net]
> 
> 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>
> 
> 
> 	
>  
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]