--- a/rdf-turtle/index.html Mon Apr 30 19:43:41 2012 -0700
+++ b/rdf-turtle/index.html Tue May 01 12:10:05 2012 -0700
@@ -175,7 +175,7 @@
<http://example.org/#spiderman>
rel:enemyOf <http://example.org/#green-goblin> ;
a foaf:Person ;
- foaf:name "Spiderman" .</script></pre>
+ foaf:name "Spiderman", "Spïdermann"@de .</script></pre>
<p>
The Turtle grammar for <a href="#grammar-production-triples"><code>triples</code></a> is a subset of the <a href="http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115/">SPARQL Query Language for RDF</a> [[RDF-SPARQL-QUERY]] grammar for <a href="http://www.w3.org/TR/sparql11-query/#rTriplesBlock"><code>TriplesBlock</code></a>.
@@ -190,6 +190,45 @@
</section>
+ <section id="triples">
+ <h2>Triples in Turtle</h2>
+ <p>A Turtle document allows writing down an RDF graph in a compact textual form. An RDF graph is made up of triples consisting of a subject, predicate and object.</p>
+ <section>
+ <h3>Simple Triples</h3>
+ <p>The simplest triple statement is a sequence of (subject, predicate, object) terms, separated by whitespace and terminated by '<code>.</code>' after each triple.</p>
+ <pre class="example"><script type="text/turtle"><http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> .
+ </script>
+ </pre>
+ </section>
+ <section>
+ <h3>Predicate Lists</h3>
+ <p>Often the same subject will be refrenced by a number of predicates. The <a href="#grammar-production-predicateObjectList">predicateObjectList production</a> matches a series of predicates and objects, separated by <code>;</code>, following a subject.
+ This expresses a series of RDF Triples with that subject and a each predicate and object allocated to one triple.
+ Thus, the <code>;</code> symbol is used to repeat the subject of triples that vary only in predicate and object RDF terms.</p>
+ <p>These two examples are equalivate ways of writing the triples about Spiderman.</p>
+ <pre class="example"><script type="text/turtle"><http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> ;
+ <http://xmlns.com/foaf/0.1/name> "Spiderman" .
+ </script></pre>
+ <pre class="example"><script type="text/turtle"><http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> .
+<http://example.org/#spiderman> <http://xmlns.com/foaf/0.1/name> "Spiderman" .
+ </script></pre>
+ </section>
+ <section>
+ <h3>Object Lists</h3>
+ <p>
+ As with predicates often objects are repeated with the same subject and predicate. The <a href="#grammar-production-objectList">objectList production</a> matches a series of objects, separated by <code>,</code>, following a subject and predicate.
+ This expresses a series of RDF Triples with that subject and predicate and a each object allocated to one triple.
+ Thus, the <code>,</code> symbol is used to repeat the subject and predicate of triples that only differ in the object RDF term.</p>
+ <p>These two examples are equalivate ways of writing Spiderman's name in two languages.<p>
+ <pre class="example"><script type="text/turtle"><http://example.org/#spiderman> <http://xmlns.com/foaf/0.1/name> "Spiderman", "Spïdermann"@de .
+ </script></pre>
+ <pre class="example"><script type="text/turtle"><http://example.org/#spiderman> <http://xmlns.com/foaf/0.1/name> "Spiderman" .
+<http://example.org/#spiderman> <http://xmlns.com/foaf/0.1/name> "Spïdermann"@de .
+ </script></pre>
+
+ </section>
+
+ </section>
<section id="terms">
<h2>RDF Terms in Turtle and N-Triples</h2>
@@ -440,40 +479,12 @@
<p>
The Turtle grammar allows <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a>s to be nested.
In this case, each inner <code>[</code> establishes a new subject blank node which reverts to the outer node at the <code>]</code>, and serves as the current subject for <a href="#grammar-production-predicateObjectList">predicate object lists</a>.
- This is described below in <a href="#groups">Predicate Object Lists in Turtle</a>.
</p>
- </section>
- </section>
- </section>
- <section id="groups">
- <h3>Predicate Object Lists in Turtle</h3>
-
- <p>
- The <a href="#grammar-production-objectList">objectList production</a> matches a series of objects, separated by <code>,</code>, following a subject and predicate.
- This expresses a series of RDF Triples with that subject and predicate and a each object allocated to one triple.
- Thus, the <code>,</code> symbol is used to repeat the subject and predicate of triples that only differ in the object RDF term.</p>
- <pre class="example"><script type="text/plain">
-<subject> <predicate> <object1> ,
- <object2> .
-# creates two triples; the last triple is <subject> <predicate> <object2> .
- </script></pre>
-
- <p>
- The <a href="#grammar-production-predicateObjectList">predicateObjectList production</a> matches a series of predicates and objects, separated by <code>;</code>, following a subject.
- This expresses a series of RDF Triples with that subject and a each predicate and object allocated to one triple.
- Thus, the <code>;</code> symbol is used to repeat the subject of triples that vary only in predicate and object RDF terms.</p>
- <pre class="example"><script type="text/plain">
-<subject> <predicate1> <obj1> ;
- <predicate2> <obj2> .
-# creates two triples, the last triple is :subject :predicate2 :obj2 .
- </script></pre>
-
- <div class="note">
<p>
- The use of <a href="predicateObjectList">predicateObjectList</a> within a <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> is a common idiom for representing a series of properties of a node.
- </p>
- <div style="float:left;">
- <p class="idlAttrName" style="padding-left:2em;">Abbreviated Turtle:</p>
+ The use of <a href="predicateObjectList">predicateObjectList</a> within a <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> is a common idiom for representing a series of properties of a node.
+ </p>
+ <div style="float:left;">
+ <p class="idlAttrName" style="padding-left:2em;">Abbreviated:</p>
<pre class="example"><script type="text/turtle">@prefix foaf: <http://xmlns.com/foaf/0.1/> .
[ foaf:name "Alice" ] foaf:knows [
@@ -484,7 +495,7 @@
</script></pre>
</div>
<div style="float:left;">
- <p class="idlAttrName" style="padding-left:2em;">Corresponding N-Triples:</p>
+ <p class="idlAttrName" style="padding-left:2em;">Corresponding simple triples:</p>
<pre class="example"><script type="text/turtle">
_:a <http://xmlns.com/foaf/0.1/name> "Alice" .
_:a <http://xmlns.com/foaf/0.1/knows> _:b .
@@ -497,6 +508,8 @@
<div style="clear:both;"/>
</section>
+ </section>
+ </section>
<section id="collections">
<h3>Collections in Turtle</h3>