Francais | English | Espanõl

Turtle (syntax)

From Wikipedia, the free encyclopedia

Jump to: navigation, search

[edit] Turtle - Terse RDF Triple Language

Turtle is a serialisation format for RDF (Resource Description Framework) graphs. It was designed by Dave Beckett and Tony Sholtis as an extension of the minimal N-Triples format, bringing in features from Tim Berners-Lee's Notation 3 (N3) language. Unlike N3, Turtle doesn't go beyond RDF's graph model. The SPARQL Protocol and RDF Query Language uses a very similar format to Turtle for its graph patterns.

Turtle has no official status with any standards organization, but has become popular amongst Semantic Web developers as a human-friendly alternative to RDF/XML. A significant proportion of RDF toolkits include Turtle parsing/serialising capability, for example Redland, Jena and RDFLib.

[edit] Example

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix ex: <http://example.org/stuff/1.0/> .

<http://www.w3.org/TR/rdf-syntax-grammar>
  dc:title "RDF/XML Syntax Specification (Revised)" ;
  ex:editor [
    ex:fullname "Dave Beckett";
    ex:homePage <http://purl.org/net/dajobe/>
  ] .

(This example would also be valid Notation 3)

The mime type of Turtle is application/x-turtle (if registered, application/turtle will be sought). Charset parameters on the mime type are forbidden, the content encoding of Turtle content is always UTF-8.

Turtles all the way down

Turtle Specification

Personal tools