473,385 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using Xsl to group by unique values

I'm not sure if this is the right forum to ask this, seeing this problem
is pretty much straight XSL, but here goes.

I'm writting a simple employee database, and I want to be able to:
A) get a node-set returning only unique values based off of a query.
(the names of all the managers)
b) loop through each of the nodes, sorted by the list of the managers.

My Xml looks something like this:

<root>
<employee id="001">
<manager id="01"/>
</employee>
<employee id="002">
<manager id="01"/>
</employee>
<employee id="003"/>
<manager id="02"/>
</employee>
<employee id="004">
<manager id="03"/>
</employee>
<employee id="005">
<manager id="03"/>
</employee>

And ideally I should be able to produce output like this:

01
------
001
002

02
------
003

03
------
004
005

I figure this should simply be a matter of doing an apply-templates of
something along the line of {node-set of unique values of manager/@id}
and then I'd like to be able to select each value of
'employee[manager/@id = {the current value of @id}]'. Unfortunatly I
can't figure out how to do this. Can anyone help me on this. I'm totally
stuck.

Nov 12 '05 #1
0 1052

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Randell D. | last post by:
Folks, I have a SELECT that returns with multiple records - It works when I have a LIMIT clause but when I try to include a GROUP BY clause, the select returns nothing (ie no records, no...
4
by: August1 | last post by:
A handful of articles have been posted requesting information on how to use these functions in addition to the time() function as the seed to generate unique groups (sets) of numbers - each group...
2
by: KoliPoki | last post by:
Greetings. I'm having a little trouble with a query. The idea is simple I need to display a list of recently unique visited URLs and the last time I visited. I have 2 table one stores the...
4
by: uspensky | last post by:
I have a table (cars) with 3 fields: VIN, Class, sell_price 101, sports, 10000 102, sports, 11000 103, luxury, 9000 104, sports, 11000 105, sports, 11000 106, luxury, 5000 107, sports, 11000
8
by: Paul Hunter | last post by:
I am new to databases and thus to Access. I have a situation where I am trying to figure out how to key some tables I am working with. Consider that I have a database of my own records which are...
6
by: syvman | last post by:
Hi all... I have a quick question, if anyone knows the answer. I've built a query which looks at a set of records in a table (tblFilename) and I've set it up so that it displays the following...
11
by: funky | last post by:
hello, I've got a big problem ad i'm not able to resolve it. We have a server running oracle 10g version 10.1.0. We usually use access as front end and connect database tables for data extraction....
0
by: princego1 | last post by:
I 've got a table ,and I want to check for a unique column ,so that there is no dups in my mysql. So how is it done using jdbc ? This is my part code / Create PreparedStatement object String...
8
by: jamesm6162 | last post by:
Hi I'm trying to create a view containing 3 fields, all from the same table. Here's what I have: SELECT MAX(dateField), field2, field3 FROM table1 GROUP BY field2, field3
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.