Definició d'RDF

Publicat el 31/03/2009

RDF (Resource Description Framework) és un model de dades per representar informació sobre recursos basat en assercions en forma de tripla: (subject, predicate, object) .

Tot i que el W3C recomana l'ús d'RDF/XML com a representació del model, es poden usar altres formes, ja siguin grafs, N3, RDFa, etc.

Per exemple, per relacionar la citació del títol d'un llibre amb el seu corresponent ISBN es pot fer usant el vocabulari definit per Dublin Core concretament amb la propietat source. Expressat com a graf:

Com a RDF/XML:


<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:dct="http://purl.org/dc/terms/">
  <rdf:Description rdf:about="urn:ISBN:0-596-00263-7">
    <dct:source>Practical RDF</dct:source>
  </rdf:Description>
</rdf:RDF>

Com a N3:


@prefix dct: <http://purl.org/dc/terms/> .
<urn:ISBN:0-596-00263-7> dct:source "Practical RDF" .

I com a XHTML+RDFa


<html xmlns="http://www.w3.org/1999/xhtml" 
  xmlns:dct="http://purl.org/dc/terms/">
(…)
<em about="urn:ISBN:0-596-00263-7" property="dct:source">
  Practical RDF
</em>
(…)
</html>

Tots aquest exemples són representacions equivalents del mateix model RDF. Tots ells acaben generant la mateixa tripla: (urn:ISBN:0-596-00263-7, http://purl.org/dc/terms/source, Practical RDF).

Recursos relacionats

Comentaris

Afegir un comentari