Article technique sur le langage de requête SPARQL.
La page W3C : http://www.w3.org/TR/rdf-sparql-query/
Un totorial bien foutu : http://www.ibm.com/developerworks/x...
Résumé du tuto
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?url
FROM <bloggers.rdf>
WHERE {
?contributor foaf:name "Jon Foobar" .
?contributor foaf:weblog ?url .
}On peut sous entendre le sujet commun de plusieurs conditions :
_:a foaf:name "Jon Foobar" ;
foaf:mbox <mailto:jon@foobar.xx>Bloc optionnel :
?person foaf:name ?name .
OPTIONAL {
?person foaf:depiction ?depiction .
} .Alternatives :
?person foaf:name ?name .
{
{ ?person foaf:mbox ?mbox } UNION { ?person foaf:mbox_sha1sum ?mbox }
}Filtres :
WHERE {
?item rss:title ?item_title .
?item dc:date ?pub_date .
FILTER xsd:dateTime(?pub_date) >= "2005-04-01T00:00:00Z"^^xsd:dateTime &&
xsd:dateTime(?pub_date) < "2005-05-01T00:00:00Z"^^xsd:dateTime
}
2 Messages de forum