[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath related query
Vineet Chaoji wrote: Hi, > So the query that I am trying to represent is: Is there a Book > "Book1" that has a chapter 'c1' that cites some article 'a' and > does this article 'a' have a chapter 'c2' which has a section > 's' which has a figure 'f' which is called "Example semi-joins". > This is a binary yes/no type of query. Given that $dblp is bound to the element DBLP, the following expression should return what you are looking for, and is I think self-explanatory: exists( $dblp /Book[@rdf:about eq 'Book1'] /chapter /Chapter[@rdf:about eq 'c1'] /section /Section /cites[@rdf:resource eq 'a'] /../../../../../.. /Article[@rdf:about eq 'a'] /chapter /Chapter[@rdf:about eq 'c2'] /section /Section[@rdf:about eq 's'] /figure[. eq '"Example Semi-join"'] ) Regards, -- Florent Georges http://fgeorges.org/
|
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
|