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

XPath equivalent of a join

Subject: XPath equivalent of a join
From: "Aaron Luke" <bluenike@xxxxxxxxx>
Date: Sat, 14 Jul 2007 00:27:33 -1000
 XPath equivalent of a join
Hi all-

Given the following document:

<root>
 <class id="1">
   <teacher>5</teacher>
 </class>
 <class id="2">
   <teacher>9</teacher>
 </class>

 <teacher id=5>
   <gender>female</gender>
 </teacher>
 <teacher id=9>
   <gender>male</gender>
 </teacher>
</root>

Is there an XPath statement that selects all of the classes taught by
female teachers (in this case, just the first class)?
The field class.teacher is an id reference to teacher.id.

In sql, I would be looking for:

select class.* from class c, teacher t where c.teacher=t.id and
t.gender='female';

Can't seem to figure this one out- any help would be appreciated.

Aaron

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-2011 All Rights Reserved.