Turtle

R. Alexander Miłowski

milowski@ischool.berkeley.edu

School of Information, UC Berkeley

Turtle - W3C Recommendation - February 2014

The specification became a recommendation in 2014:

Syntax

Simple Triples

A triple is a tuple of subject, predicate, and object value ended by a period:

<Scottish-wildcat-MS3000TIFF-small.jpeg> 
   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/ImageObject> .
<Scottish-wildcat-MS3000TIFF-small.jpeg> <http://purl.org/dc/terms/title> "A Scottish Wildcat" .
         

Note: whitespace, indentation, etc. does not matter.

Shortening Triples with CURIES

   @prefix schema: <http://schema.org/> .
   @prefix dc: <http://purl.org/dc/elements/1.1/> .
   
   <Scottish-wildcat-MS3000TIFF-small.jpeg> rdf:type schema:ImageObject .
   <Scottish-wildcat-MS3000TIFF-small.jpeg> dc:title "A Scottish Wildcat" .
         

rdf:type has a synonym of a:

   @prefix schema: <http://schema.org/> .
   @prefix dc: <http://purl.org/dc/elements/1.1/> .
   
   <Scottish-wildcat-MS3000TIFF-small.jpeg> a schema:ImageObject .
   <Scottish-wildcat-MS3000TIFF-small.jpeg> dc:title "A Scottish Wildcat" .
         

Predicate Lists

@prefix schema: <http://schema.org/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .

<Scottish-wildcat-MS3000TIFF-small.jpeg> 
   a schema:ImageObject;
   dc:title "A Scottish Wildcat" .
         

Object Lists

@prefix schema: <http://schema.org/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .

<Scottish-wildcat-MS3000TIFF-small.jpeg> 
   a schema:ImageObject;
   dc:title "A Scottish Wildcat";
   dc:contributor "John Q. Photographer", "Jane M. Biologist" .
         

Subjects as Object Values

@prefix schema: <http://schema.org/> .
_:1 a schema:Person
   schema:name "Alex Milowski" ;
   schema:affiliation _:2 .
_:2 a schema:Organization
   schema:name "School of Information" .