Introduction to Turtle used in MAC Papers

When exploring how an issue may be addressed in BIBFRAME, we use Turtle RDF serialization. It is a text-based serialization for RDF data that is easy to read and easy to create. This document provides basic guidance about how to read and create RDF conforming to Turtle sufficient to the needs of MAC, but it is not a definitive guide. The following Turtle example represents a BIBFRAME Work resource.

@prefix bf: <> .
<> a bf:Work;
bf:authorizedAccessPoint "Villard, Ray. Large telescopes : inside and out"@en; bf:title "Large telescopes : inside and out"@en; bf:classificationLcc <>; bf:creator <>; bf:intendedAudience <>; bf:subject <>, <>; bf:language <> .

The snippet represents a BIBFRAME Work resource; "a" is shorthand for "rdf:type." This Work has an authorized access point in English of "Villard, Ray. Large telescopes : inside and out" and a title, also in English, of "Large telescopes : inside and out". It has a classification and creator, both of which are referenced via URI. It has an intended audience, language, and two subjects.

In Turtle, each line is generally divided into three parts: subject{space}predicate{space}object. Each line usually represents a single triple but each line will not always represent every component of the triple. Subject and predicate inheritance is communicated through indentation and punctuation. In the above example, the first line, and only the first line, contains the subject (URI) of this resource. Subsequent lines are indented, meaning that the following predicate and object further describe the same subject. For example, the third line - bf:title "Large telescopes : inside and out"@en . - is indented and begins with the BIBFRAME property reference (bf:title) followed by a space and then the title as a quoted string. Use of indentation tells us that the subject of this triple has already been declared.

Most lines will terminate in a semicolon (;) because most lines will represent a simple triple. Lines 1-6, for example, represent this pattern. Line 7, however, ends in a comma (,) because it represents an "object list," which is a type of Turtle shorthand. Multiple objects that pertain to the same subject and predicate are seperated by a comma (lines 7 and 8 could have been represented on one line). The final line of a resource description ends with a period (.).

Subject URIs are generally written out fully; predicate URIs make use of namespace prefixes, which are defined at the top of the document, one per line beginning with "@prefix". Objects may be Literals or an entity reference, such as a URI. Strings must be quoted. The language of the string can be denoted by appending an AT sign (@) after the closing quote followed by an appropriate ISO639-1 language code. Lines 2 and 3 above serve as examples.

It will be assumed that the following prefix declarations are present at the top of all MAC Turtle examples and so do not need to be explicitly declared. If, however, a namespace not listed below is used then it is declared part of the Turtle example.

@prefix bf: <> .
@prefix madsrdf: <> . 
@prefix rdf: <> .
@prefix rdfs: <> .