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

RE: selecting unique entries from a list

Subject: RE: selecting unique entries from a list
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Thu, 05 May 2005 13:40:54 +0000
xslt xml unique entries
This is a grouping question, and if you hear people groaning it's because these seem to arise repeatedly :-) Please see Jeni Tennison's site for descriptions on a couple different ways to do this--at least one of them, the Meunchian Method, is efficient and performant: www.jenitennison.com

The archives for this list is here: http://www.biglist.com/lists/xsl-list/archives/ . It's searchable, and I'm sure you'll find many references to grouping.

The following is a site that culls topics of interest from this ng: http://www.dpawson.co.uk/xsl/xslfaq.html

Regards,

--A

From: "Hallas,M" <M.Hallas@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:  selecting unique entries from a list
Date: Thu, 5 May 2005 11:14:35 +0100

Dear all,

Hope you can help with this query. I am new to XML/XSLT.

I need to take the following XML and generate an initial web page displaying only one instance of
each department name.


<xml>
<List>
	<Entry>
		<Session>2004/5</Session>
		<Department>Accounting and Finance</Department>
	</Entry>
	<Entry>

		<Session>2004/5</Session>
		<Department>Accounting and Finance</Department>
	</Entry>
	<Entry>
		<Session>2004/5</Session>
		<Department>Maths</Department>
	</Entry>
	<Entry>
		<Session>2004/5</Session>
		<Department>Maths</Department>
	</Entry>
	<Entry>
		<Session>2004/5</Session>
		<Department>Economic History</Department>
	</Entry>
</List>
</xml>

so in the html only unique departments would be displayed once:


Accounting and Finance Maths Economic History

What's the best way to do this in xslt?

I understand that I can filter on specific names within the xslt and do conditional
tests but I do not want to have to change the xslt each time if the departments in the xml change.


Hope it makes sense.

Regards,

Mike


_________________________________________________________________
Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


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.