2017-06-26 6 views
-1

Diese Abfrage funktioniert nur, wenn ich den "Betreff" löschen. Gibt es eine Möglichkeit, dbpedia mit einer Kategorie abzufragen?Abfrage SPARQL funktioniert nicht mit "dct: Betreff"

+1

Ist [dieser Ausgang] (https://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=SELECT+%3Fname+%3Fbirth++%3Fperson+% 3Fragen% 0D% 0A% 0D% 0AWHERE +% 7B% 0D% 0A% 3Ferson + dbo% 3AbirthPlace + dbr% 3ALondon +.% 0D% 0A% 3Fperson + dbo% 3AbirthDate +% 3Firth +.% 0D% 0A% 3Fperson + foaf% 3AName +% 3Fname +. ++% 0D% 0A% 0D% 0A% 3Fperson + dct% 3Asubjekt + dbc% 3AEnglisch_Rocksinger.% 0D% 0A% 3Fperson + dct% 3Asubjekt +% 3Fsubjekt. +++% 7D% 0D% 0ORMER + BY +% 3FName% 0D% 0A & Format = Text% 2Fhtml & CXML_redir_for_subjs = 121 & CXML_redir_for_hrefs = & timeout = 30000 & debug = on) was willst du? –

Antwort

0

Obwohl Ihre Frage nicht klar ist, denke ich, Ihr Problem besteht darin, die Abfrage zu formatieren und die Präfixe zu definieren. Dies sollte funktionieren:

PREFIX dbo: <http://dbpedia.org/ontology/> 
PREFIX foaf: <http://xmlns.com/foaf/0.1/> 
PREFIX dct: <http://purl.org/dc/terms/> 
PREFIX dbr: <http://dbpedia.org/resource/> 
PREFIX dbc: <http://dbpedia.org/resource/Category:> 

SELECT ?name ?birth ?person ?subject WHERE { 

    ?person dbo:birthPlace dbr:London. 
    ?person dbo:birthDate ?birth.  
    ?person foaf:name ?name. 
    ?person dct:subject dbc:English_rock_singers. 
    ?person dct:subject ?subject. 
} 
ORDER BY ?name