Resource Description Framework: Difference between revisions
imported>Tom Morris No edit summary |
imported>Tom Morris No edit summary |
||
Line 18: | Line 18: | ||
|- | |- | ||
| RDF/XML | | RDF/XML | ||
| application/rdf+xml | | <code>application/rdf+xml</code> | ||
| XML | | XML | ||
| W3C Recommendation | | W3C Recommendation | ||
|- | |- | ||
| N-Triples | | N-Triples | ||
| | | <code>text/plain</code> | ||
| Plain text with Unicode. | | Plain text with Unicode. | ||
| W3C RDF Core WG Internal Working Draft | | W3C RDF Core WG Internal Working Draft | ||
|- | |- | ||
| Turtle | | Turtle | ||
| | | <code>application/x-turtle</code> | ||
| Plain text with Unicode. Superset of N-Triples. | | Plain text with Unicode. Superset of N-Triples. | ||
| W3C Team Submission | | W3C Team Submission | ||
|- | |- | ||
| Notation 3 | | Notation 3 | ||
| | | <code>text/rdf+n3</code> (proposed) | ||
| Plain text with Unicode. Superset of Turtle. | | Plain text with Unicode. Superset of Turtle. | ||
| W3C Team Submission | | W3C Team Submission | ||
|- | |- | ||
| TriG | | TriG | ||
| application/x-trig | | <code>application/x-trig</code> | ||
| Plain text with Unicode. Superset of Turtle that adds named graphs support. | | Plain text with Unicode. Superset of Turtle that adds named graphs support. | ||
| | | | ||
Line 48: | Line 48: | ||
|- | |- | ||
| RDF/JSON | | RDF/JSON | ||
| application/json | | <code>application/json</code> | ||
| JSON | | JSON | ||
| A number of unofficial specifications | | A number of unofficial specifications | ||
|- | |- | ||
| RDFa | | RDFa | ||
| application/xhtml+xml | | Same as host language. e.g. <code>text/html</code>, <code>application/xhtml+xml</code> | ||
| HTML and XHTML | | HTML and XHTML | ||
| W3C Recommendation for XHTML, HTML5 specification is incomplete. | | W3C Recommendation for XHTML, HTML5 specification is incomplete. | ||
|- | |-} | ||
Revision as of 06:15, 12 July 2010
The Resource Description Framework (RDF) is a standard created by the W3C in 1999 originally for exchanging rich metadata about material on the Web, but which has subsequently been used in a number of different ways to store data. It is seen as one of the fundamental components of the vision of the Semantic Web. The internal data model of RDF is that of a directed acyclic graph - that is to say that of nodes with directed, labeled pointers going between the nodes. In RDF, this is done through triple statements - a 3-tuple data format consisting of a subject, an object and a predicate. This allows the building up of graphs - collections of one or more triples. It is possible to then merge multiple graphs together into a compound graph for storage and querying.
In addition, there are other standards built on top of RDF. One of these is the Web Ontology Language (OWL) which, along with the simpler RDF Schema (RDFS) allows authors to specify a set of rules which apply to triples. For instance, one might have a rule that a Car object must have four wheels (the wheels property would, if it were set, be set to four) and a primary driver (which could be a Person object). Other standards built on top of RDF include SPARQL, a query language similar to SQL for getting information out of collections of RDF data, and GRDDL which allows people to describe rules for parsing data out of Web pages and XML documents. Data formats built on top of RDF include Friend Of A Friend (FOAF) and Semantically Interlinked Online Communities (SIOC), both for use in representing online communities and social networks.
Syntaxes
RDF is a data model, not a syntax. The same data can be represented in a variety of different ways. The primary way is through an XML syntax - although other syntaxes are commonly in use, including the Notation3 and Turtle syntax which use Unicode plain text with a variety of symbols to distinguish between different parts of the structure. There is also a wide variety of tools which exist to parse and use RDF data in a variety of common programming languages.
The RDF/XML syntax is formally defined and standardised by the W3C, and is widely implemented.
Syntax name | MIME type | Underlying technology | Standardisation status |
---|---|---|---|
RDF/XML | application/rdf+xml
|
XML | W3C Recommendation |
N-Triples | text/plain
|
Plain text with Unicode. | W3C RDF Core WG Internal Working Draft |
Turtle | application/x-turtle
|
Plain text with Unicode. Superset of N-Triples. | W3C Team Submission |
Notation 3 | text/rdf+n3 (proposed)
|
Plain text with Unicode. Superset of Turtle. | W3C Team Submission |
TriG | application/x-trig
|
Plain text with Unicode. Superset of Turtle that adds named graphs support. | |
TriX (Triples in XML) | XML | Supported by Nokia and HP | |
RDF/JSON | application/json
|
JSON | A number of unofficial specifications |
RDFa | Same as host language. e.g. text/html , application/xhtml+xml
|
HTML and XHTML | W3C Recommendation for XHTML, HTML5 specification is incomplete. |