Corese 3.0 / KGRAM SPARQL Rules

olivier.corby at inria.fr - Edelweiss - INRIA Sophia Antipolis-Méditerranée - 2009-2011.

RDF Rules can be written as SPARQL construct-where rules (former Corese rule syntax is also supported):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF [
<!ENTITY rdf   "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY rdfs  "http://www.w3.org/2000/01/rdf-schema#">
<!ENTITY rul   "http://ns.inria.fr/edelweiss/2011/rule#">
]>

<rdf:RDF xmlns:rdfs="&rdfs;" xmlns:rdf="&rdf;"   xmlns = '&rul;' >
 
<rule>
<body>
construct  {
?x rdf:type ?d
} 
where { 
?p rdfs:domain ?d
?x ?p ?y
}
</body>
</rule>

</rdf:RDF>