[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: XPath equivalent of a join
Subject: Re: XPath equivalent of a join|
From: "Aaron Luke" <bluenike@xxxxxxxxx>
Date: Sat, 14 Jul 2007 01:47:55 -1000
Thanks for your solution... the only problem is that this solution
seems to run very slowly.
If I replicate 1500 copies of the class with id="2" and 1500 with the
teacher with id="9",
then the query takes almost 30 seconds using Saxon8 on a 2Ghz Core 2
Duo even though
the query only matches 1 record. Any ideas on speeding that up?
I included a fixed version of the xml doc below, too.
On 7/14/07, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
Your input XML is not as per the XML spec (there should be double
quotes around attribute values).
If the above error is corrected in the XML, I found the following
solution to work:
<xsl:output method="xml" indent="yes" />
<xsl:copy-of select="class[teacher = ../teacher[gender =
On 7/14/07, Aaron Luke <bluenike@xxxxxxxxx> wrote:
> Hi all-
> Given the following document:
> <class id="1">
> <class id="2">
> <teacher id=5>
> <teacher id=9>
> 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
> Can't seem to figure this one out- any help would be appreciated.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format