Hi there,
I have a following-type records:

<rdf:Description
rdf:about="http://www.w3.org/TR/xquery";><dc:identifier>www/org/w3/TR/xquery</dc:identifier><dc:date>2002-01-03</dc:date><rdf:type
rdf:resource="http://sw.deri.org/~aharth/2004/07/dblp/dblp.owl#Www"/>
<editor><foaf:Person rdf:nodeID="DonaldDChamberlin"><foaf:name>Donald D.
Chamberlin</foaf:name></foaf:Person></editor>
<editor><foaf:Person rdf:nodeID="DanielaFlorescu"><foaf:name>Daniela
Florescu</foaf:name></foaf:Person></editor>
<editor><foaf:Person rdf:nodeID="JonathanRobie"><foaf:name>Jonathan
Robie</foaf:name></foaf:Person></editor>
<editor><foaf:Person
rdf:nodeID="J&#xE9;r&#xF4;meSim&#xE9;on"><foaf:name>J&#xE9;r&#xF4;me
Sim&#xE9;on</foaf:name></foaf:Person></editor>
<editor><foaf:Person rdf:nodeID="MugurStefanescu"><foaf:name>Mugur
Stefanescu</foaf:name></foaf:Person></editor>
<dc:title rdf:parseType="Literal">XQuery: A Query Language for
XML</dc:title>
<year>2001</year>

They are books or publications, where each one can have multiple authors
(co-authors).

First I search books based on foaf:person - one author. To get his
publications. My working query is:

PREFIX foaf:<http://xmlns.com/foaf/0.1/>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>    #type
PREFIX dc:<http://purl.org/dc/elements/1.1/>     # identifier, date,
creator, title
SELECT ?name ?title
 {
    ?s dc:title ?title.
    ?o foaf:name ?name.
    ?o foaf:name "Donald D. Chamberlin"
 }
LIMIT 5

It returns
------------------------------------------------------------------------------------------------------
| name                   |
title
======================================================================================================
| "Donald D. Chamberlin" | "PRPL: A Database Workload Specification
Language, v1.3."^^rdf:XMLLiteral
| "Donald D. Chamberlin" | "Efficient View Maintenance at Data
Warehouses."^^rdf:XMLLiteral
| "Donald D. Chamberlin" | "Self-organizing
Map"^^rdf:XMLLiteral
| "Donald D. Chamberlin" | "Beowulf Project at
CESDIS"^^rdf:XMLLiteral
| "Donald D. Chamberlin" | "The MPEG Home
Page"^^rdf:XMLLiteral
------------------------------------------------------------------------------------------------------

But also I want co-authors of each found match! NOW how to get co-authors? I
have spent many hours trying to get co-authors in single query, with no
success.
Please be so kind to help.

Many thanks
Jan

Reply via email to