473,569 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSL LookUp for Identical Value List

Hello!

I need to perform the following operation on an XML document: I have a
first element containing a list of team (<Teams>). A name is assigned
to all teams, as well as a list of their members.
In a second element, I have a list of tables, and the people sitting on
those tables. The people sitting on the tables are always teams, but
the team's names are not stored in the element <Table>. Notice that the
names could not always be in the same order.

How can I perform a transformation using xslt/xpath to retrieve the
team's names assigned to the table?
The results should be like:
Table 1: Team Tiger-Lillys
Table 2: Team Brooklyn
Table 3: Team Queens

Here is an XML Sample.

<Lunch>
<Teams>
<Team name="Tiger-Lillys">
<Members>
<Member name="John"/>
<Member name="Mike"/>
<Member name="Joe"/>
<Member name="Mani"/>
</Members>
</Team>
<Team name="Brooklyn" >
<Members>
<Member name="David"/>
<Member name="Isaac"/>
<Member name="Daniel"/>
</Members>
</Team>
<Team name="Queens">
<Members>
<Member name="Daniela"/>
<Member name="George"/>
<Member name="Kevin"/>
</Members>
</Team>
</Teams>
<Tables>
<Table number=1>
<Members>
<Member name="John"/>
<Member name="Mike"/>
<Member name="Joe"/>
<Member name="Mani"/>
</Members>
</Table>
<Table number=2>
<Members>
<Member name="David"/>
<Member name="Isaac"/>
<Member name="Daniel"/>
</Members>
</Table>
<Table number=3>
<Members>
<Member name="Daniela"/>
<Member name="George"/>
<Member name="Kevin"/>
</Members>
</Table>
</Tables>
</Lunch>

Aug 16 '05 #1
0 1224

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

Similar topics

2
6576
by: John Mudd | last post by:
I must be missing something here. It's clearly faster to lookup an item directly in a dictionary than to scan through a list. So when I have a large lookup table I always load it in the form of a dictionary. But it seems a waste. I end up having to assign an artificial value to the dictionary entry. Below I assign the value "None" to each...
9
7018
by: Koen | last post by:
Hi all, My application uses a lot of lookup tables. I've splitted the frontend (forms, reports, etc) from the backend (data). The database has around 10 different users. The values in the lookup tables are not likely to change. Question 1: Should I include them in the backend (with rest of data) or the frontend?
3
2910
by: my-wings | last post by:
I've been reading about how evil Lookup fields in tables are, but I've got to be missing something really basic. I know this subject has been covered before, because I've just spent an hour or two reading about it on google, but there is something I still don't understand, and I'm hoping someone will be willing to explain it to me in small...
3
10622
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems that are hard to find. The main problem I am having right now is that I have a report that is sorted by one of these lookup fields and it only displays...
1
1891
by: Paul H | last post by:
Say I have a table called tblPeopleInfo, one of the fields in the table is called FavouriteFruit. The FavouriteFruit field is a lookup field and will contain Apples, Oranges, Grapes etc..The list can be added to by users of the database. What is the best way to construct this lookup? Should it lookup a Table/Query or a Value List? If it...
1
1869
by: Dave | last post by:
I have a problem which I know there is an answer to but have so far been unsuccessful in finding it. It is quite simple in theory. I have created a form which uses a table for lookup values and they appear on the form as a list box. I know I can restrict to list or not within the table, but what I want to do is to be able to add to the list if...
1
3352
by: James | last post by:
I am used to VB6 but need to develop something in .Net. I need to create several bound combo-boxes which will use lookup tables to get their values. I created a form using the dataform wizard. As part of the setup, I specified a new dataset, which included the data & lookup tables. I also specified the relationships when required. I...
11
2633
by: Paul H | last post by:
Suppose I have a table called tblPeople and I want a field to illustrate whether each person prefers cats or dogs. I could do it one of three ways. 1. A plain text field Create a text field in tblPeople called PreferredPet. 2. A lookup field that stores text values. Create a text field in tblPeople called PreferredPetID and use it to...
3
2409
by: Radu | last post by:
Hi. I have the following problem - I need to build a user-control in asp.net (an ascx) to somehow allow the users to search by first name or last name among a big (~10.000 records) email addresses database (SQL server table). I am thinking of allowing them to type something in EITHER the last name, EITHER the first name textbox, and on each...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.