SPARQL query doesn't return results

Viewed 127

I have created an ontology using Protege and am trying to create queries using SPARQL. I created this query to get the name of all parents:

    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX owl: <http://www.w3.org/2002/07/owl#>
    PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX dc:<http://www.semanticweb.org/me/ontologies/2021/11/untitled-ontology-3#>
    SELECT DISTINCT ?nmParents
        WHERE { ?uriParents dc:parentOf  ?uriEnfants.
                ?uriParents dc:name ?nmParents.
               }

But this query doesn't return any results although the ontology is well created and this query returns results:

    SELECT ?n
    WHERE { ?uriP dc:name ?n.}

Any suggestions??

0 Answers
Related