xsl-list
[Top] [All Lists]

[xsl] XPath equivalent of a join

2007-07-14 03:27:59
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>