to the main page... about these slides...

Joining elements by value

Joins are expressed by using multiple queries that share variables:
  WHERE <bib.article>
          <author> 
            <firstname.PCDATA> $f </>  // firstname $f
            <lastname.PCDATA>  $l </>  // lastname $l
          </>
        </> CONTENT_AS $a IN "bib.xml",

        <book year=$y>
          <author>
            <firstname.PCDATA>$f</> // join on same firstname $f
            <lastname.PCDATA>$l</>  // join on same lastname $l
          </>
        </> IN "bib.xml", 

        $y > 1995
  CONSTRUCT <article> $a </>

This retrieves all articles that have at least one author who has also written a book since 1995.