World Library  
Flag as Inappropriate
Email this Article

Turtle (syntax)

Article Id: WHEBN0006723738
Reproduction Date:

Title: Turtle (syntax)  
Author: World Heritage Encyclopedia
Language: English
Subject: Semantic Web, N-Triples, Resource Description Framework, Blank node, Named graph
Collection: Resource Description Framework, Syntax
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Turtle (syntax)

Terse RDF Triple Language
Filename extension .ttl
Internet media type text/turtle
Developed by Dave Beckett
Type of format Semantic Web
Container for RDF data
Extended from N-Triples
Standard Specification

Turtle (Terse RDF Triple Language) is a format for expressing data in the Resource Description Framework (RDF) data model with the syntax similar to SPARQL. RDF, in turn, represents information using "triples", each of which consists of a subject, a predicate, and an object. Each of those items is expressed as a Web URI.

Turtle provides a way to group three URIs to make a triple, and provides ways to abbreviate such information, for example by factoring out common portions of URIs. For example:

 
   
    .

Contents

  • History 1
  • Example 2
  • Named Graphs 3
  • References 4
  • External links 5

History

Turtle was defined by Dave Beckett as a subset of Tim Berners-Lee and Dan Connolly's Notation3 (N3) language, and a superset of the minimal N-Triples format. Unlike full N3, which has an expressive power that goes much beyond RDF, Turtle can only serialize valid RDF graphs. Turtle is an alternative to RDF/XML, the originally unique syntax and standard for writing RDF. As opposed to RDF/XML, Turtle does not rely on XML and is generally recognized as being more readable and easier to edit manually than its XML counterpart.

SPARQL, the query language for RDF, uses a syntax similar to Turtle for expressing query patterns.

In 2011, a working group of the World Wide Web Consortium (W3C) started working on an updated version of RDF, which is intended to be published along with a standardised version of Turtle. This working group published the new Turtle specification as a Last Call Working Draft on 10 July 2012.[1]

A significant proportion of RDF toolkits include Turtle parsing and serializing capability. Some examples are Redland, Sesame, Jena and RDFLib. Support for this format is likely to increase further when it becomes a W3C recommendation since it is part of W3C's process to call for implementations before ratification of the standard.

Example

The following example defines 3 prefixes ("rdf", "dc", and "ex"), and uses them in expressing a statement about the editorship of the RDF/XML document:

(Turtle examples are also valid Notation3).

The example encodes an RDF graph made of four triples, which express these facts:

  • The W3C technical report on RDF syntax and grammar has the title RDF/XML Syntax Specification (Revised).
  • That report's editor is a certain individual, who in turn
    • Has full name Dave Beckett.
    • Has a home page at a certain place.

Here are the triples made explicit in N-Triples notation:

The MIME type of Turtle is text/turtle. The character encoding of Turtle content is always UTF-8.[2]

Named Graphs

TriG RDF syntax extends Turtle with support for named graphs.

References

  1. ^ "Turtle – Terse RDF Triple Language".  
  2. ^ "MIME Media Types: text/turtle".  

External links

  • Turtle Specification
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.