Move examples
authorGavin Carothers <gavin@carothers.name>
Wed, 20 Jun 2012 14:26:08 -0700
changeset 472 4703864f7e2b
parent 471 0de6e6f53545
child 473 62ef723f9220
Move examples
rdf-turtle/index.html
--- a/rdf-turtle/index.html	Wed Jun 20 14:25:20 2012 -0700
+++ b/rdf-turtle/index.html	Wed Jun 20 14:26:08 2012 -0700
@@ -500,6 +500,70 @@
 
 			</section>
 	</section>
+	        <section id="sec-examples" class="informative">
+        <h2>Examples</h2>
+
+          <p>This example is a Turtle translation of 
+          <a href="http://www.w3.org/TR/rdf-syntax-grammar/#example7">example 7</a>
+          in the
+          <a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML Syntax specification</a>
+          (<a href="examples/example1.ttl">example1.ttl</a>):
+          </p>
+
+          <div data-include="examples/example1.ttl" data-oninclude="updateExample"></div>
+
+
+          <p>An example of an RDF collection of two literals.</p>
+          <pre class="example"><script type="text/turtle">
[email protected] : <http://example.org/stuff/1.0/> .
+:a :b ( "apple" "banana" ) .
+          </script></pre>
+          <p>which is short for (<a href="examples/example2.ttl">example2.ttl</a>):</p>
+
+          <div data-include="examples/example2.ttl" data-oninclude="updateExample"></div>
+
+          <p>An example of two identical triples containing literal objects
+          containing newlines, written in plain and long literal forms.
+          Assumes that line feeds in this document are #xA.
+          (<a href="examples/example3.ttl">example3.ttl</a>):</p>
+
+          <div data-include="examples/example3.ttl" data-oninclude="updateExample"></div>
+
+          <p>As indicated by the grammar, a <a href="#grammar-production-collection">collection</a> can be either a <a href="#grammar-production-subject">subject</a> or an <a href="#grammar-production-object">object</a>. This subject or object will be the novel blank node for the first object, if the collection has one or more objects, or <code>rdf:nil</code> if the collection is empty.</p>
+
+          <p>For example,</p>
+
+          <pre class="example untested"><script type="text/turtle">@prefix : <http://example.org/stuff/1.0/> .
+(1 2.0 3E1) :p "w" .</script></pre>
+
+          <p>is syntactic sugar for (noting that the blank nodes <code>b0</code>, <code>b1</code> and <code>b2</code> do not occur anywhere else in the RDF graph):</p>
+
+<pre class="example untested"><script type="text/turtle">@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+    _:b0  rdf:first  1 ;
+          rdf:rest   _:b1 .
+    _:b1  rdf:first  2.0 ;
+          rdf:rest   _:b2 .
+    _:b2  rdf:first  3E1 ;
+          rdf:rest   rdf:nil .
+    _:b0  :p         "w" . </script></pre>
+
+          <p>RDF collections can be nested and can involve other syntactic forms:</p>
+
+          <pre class="example untested"><script type="text/turtle">@prefix : <http://example.org/stuff/1.0/> .
+(1 [:p :q] ( 2 ) ) .</script></pre>
+
+          <p>is syntactic sugar for:</p><pre class="example untested"><script type="text/turtle">@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+    _:b0  rdf:first  1 ;
+          rdf:rest   _:b1 .
+    _:b1  rdf:first  _:b2 .
+    _:b2  :p         :q .
+    _:b1  rdf:rest   _:b3 .
+    _:b3  rdf:first  _:b4 .
+    _:b4  rdf:first  2 ;
+          rdf:rest   rdf:nil .
+    _:b3  rdf:rest   rdf:nil .</script></pre>
+        </section>        
+
       <section  id="sec-diff-sparql" class="informative">
       <h3>Turtle compared to SPARQL</h3>
 
@@ -876,69 +940,6 @@
               </ul>
           </section>
         </section>
-        <section id="sec-examples" class="informative">
-        <h2>Examples</h2>
-
-          <p>This example is a Turtle translation of 
-          <a href="http://www.w3.org/TR/rdf-syntax-grammar/#example7">example 7</a>
-          in the
-          <a href="http://www.w3.org/TR/rdf-syntax-grammar/">RDF/XML Syntax specification</a>
-          (<a href="examples/example1.ttl">example1.ttl</a>):
-          </p>
-
-          <div data-include="examples/example1.ttl" data-oninclude="updateExample"></div>
-
-
-          <p>An example of an RDF collection of two literals.</p>
-          <pre class="example"><script type="text/turtle">
[email protected] : <http://example.org/stuff/1.0/> .
-:a :b ( "apple" "banana" ) .
-          </script></pre>
-          <p>which is short for (<a href="examples/example2.ttl">example2.ttl</a>):</p>
-
-          <div data-include="examples/example2.ttl" data-oninclude="updateExample"></div>
-
-          <p>An example of two identical triples containing literal objects
-          containing newlines, written in plain and long literal forms.
-          Assumes that line feeds in this document are #xA.
-          (<a href="examples/example3.ttl">example3.ttl</a>):</p>
-
-          <div data-include="examples/example3.ttl" data-oninclude="updateExample"></div>
-
-          <p>As indicated by the grammar, a <a href="#grammar-production-collection">collection</a> can be either a <a href="#grammar-production-subject">subject</a> or an <a href="#grammar-production-object">object</a>. This subject or object will be the novel blank node for the first object, if the collection has one or more objects, or <code>rdf:nil</code> if the collection is empty.</p>
-
-          <p>For example,</p>
-
-          <pre class="example untested"><script type="text/turtle">@prefix : <http://example.org/stuff/1.0/> .
-(1 2.0 3E1) :p "w" .</script></pre>
-
-          <p>is syntactic sugar for (noting that the blank nodes <code>b0</code>, <code>b1</code> and <code>b2</code> do not occur anywhere else in the RDF graph):</p>
-
-<pre class="example untested"><script type="text/turtle">@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-    _:b0  rdf:first  1 ;
-          rdf:rest   _:b1 .
-    _:b1  rdf:first  2.0 ;
-          rdf:rest   _:b2 .
-    _:b2  rdf:first  3E1 ;
-          rdf:rest   rdf:nil .
-    _:b0  :p         "w" . </script></pre>
-
-          <p>RDF collections can be nested and can involve other syntactic forms:</p>
-
-          <pre class="example untested"><script type="text/turtle">@prefix : <http://example.org/stuff/1.0/> .
-(1 [:p :q] ( 2 ) ) .</script></pre>
-
-          <p>is syntactic sugar for:</p><pre class="example untested"><script type="text/turtle">@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-    _:b0  rdf:first  1 ;
-          rdf:rest   _:b1 .
-    _:b1  rdf:first  _:b2 .
-    _:b2  :p         :q .
-    _:b1  rdf:rest   _:b3 .
-    _:b3  rdf:first  _:b4 .
-    _:b4  rdf:first  2 ;
-          rdf:rest   rdf:nil .
-    _:b3  rdf:rest   rdf:nil .</script></pre>
-        </section>        
       <section id="in-html" class="appendix informative">
         <h2>Embedding Turtle in HTML documents</h2>
         <p>HTML ([[!HTML5]]) <code>script</code> <a href="http://dev.w3.org/html5/spec/Overview.html#scripting-1">tags</a>