N-triples section edits
authorGavin Carothers <gavin@carothers.name>
Tue, 01 May 2012 14:17:57 -0700
changeset 284 b5ff9b19335e
parent 283 35f764642310
child 285 f0d8d6c91896
N-triples section edits
rdf-turtle/index.html
--- a/rdf-turtle/index.html	Tue May 01 13:11:31 2012 -0700
+++ b/rdf-turtle/index.html	Tue May 01 14:17:57 2012 -0700
@@ -193,14 +193,14 @@
 	<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>
+		<section id="simple-triples">
 			<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>
+		<section id="predicate-lists">
 			<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.
@@ -213,7 +213,7 @@
 <http://example.org/#spiderman> <http://xmlns.com/foaf/0.1/name> "Spiderman" .
 			</script></pre>
 		</section>
-		<section>
+		<section id="object-lists">
 			<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.
@@ -1059,7 +1059,7 @@
       <section id="sec-triples">
         <h2>N-Triples</h2>
         <p>This section defines an easy to parse line-based subset of Turtle named N-Triples.</p>
-        <p>The syntax is a improved version of N-Triples as originally defined in the RDF Test Cases [[!RDF-TESTCASES]] document. Its original intent was for writing test cases, but it has proven to be popular as a dump format for RDF data.</p>
+        <p>The syntax is a revised version of N-Triples as originally defined in the RDF Test Cases [[!RDF-TESTCASES]] document. Its original intent was for writing test cases, but it has proven to be popular as a exchange format for RDF data.</p>
 
         		  <p>
 			  An N-Triples document contains no parsing directives.
@@ -1075,32 +1075,10 @@
 </script></pre>
 
 			<p>
-			  N-Triples triples are also Turtle triples, but Turtle includes other <a href="#terms">representations of RDF Terms</a> and <a href="#groups">abbreviations of RDF Triples</a>.
+			  N-Triples triples are also Turtle <a href="#simple-triples">simple triples</a>, but Turtle includes other <a href="#terms">representations of RDF Terms</a> and <a href="#predicate-lists">abbreviations of RDF Triples</a>. When parsed by a Turtle parser, data in the N-Triples format will produce exactly the same triples as a parser for the restricted N-triples language.
 			</p>
-			<p>			  The RDF graph represented by an N-Triples document contains exactly each triple matching <a href="#prod-ntriples-triple">N-Triples <code>triple</code> production</a>.
-
-        <section id="n-triples-mediatype">
-			<h2>Media Type and Content Encoding</h2>
-          
-			<p>The media type of N-Triples is <code>application/ntriples</code>.
-			The content encoding of N-Triples is always UTF-8. N-Triples may also be provided as <code>text/plain</code>. When used in this way N-Triples MUST use the escaped form of any character outside US-ASCII. As N-Triples is a subset of Turtle it MAY also be provided as <code>text/turtle</code>.
-			See <a href="#sec-mediaReg-n-triples">N-Triples Media Type</a> for the media type 
-			registration form.
-			</p>
+			<p>The RDF graph represented by an N-Triples document contains exactly each triple matching <a href="#prod-ntriples-triple">N-Triples <code>triple</code> production</a>.
 
-        </section>
-        <section id="n-triple-changes" class="informative">
-          <h3>Changes from RDF Test Cases format</h3>
-          <ul>
-            <li>Encoding is UTF-8 rather than US-ASCII
-            <li>Uses IRIs rather than RDF URI References
-            <li>Defines a unique media type <code>application/ntriples</code>
-            <li>Subset of Turtle rather than Notation 3
-            <li>Comments may occur after a triple production
-            <li>Allows <code>\b</code> and <code>\f</code> for backspace and form feed
-            <li>More than one way to represent a single character
-          </ul>
-        </section>
         <section>
         	<h3>Summary of diffrences in N-Triples and Turtle</h3>
 		<section id="iri-summary">
@@ -1232,7 +1210,18 @@
 			  </section>
 			</section>
 
-
+        <section id="n-triple-changes" class="informative">
+          <h3>Changes from RDF Test Cases format</h3>
+          <ul>
+            <li>Encoding is UTF-8 rather than US-ASCII
+            <li>Uses IRIs rather than RDF URI References
+            <li>Defines a unique media type <code>application/n-triples</code>
+            <li>Subset of Turtle rather than Notation 3
+            <li>Comments may occur after a triple production
+            <li>Allows <code>\b</code> and <code>\f</code> for backspace and form feed
+            <li>More than one way to represent a single character
+          </ul>
+        </section>
 
         <section id="n-triples-compatibility"  class="informative">
           <h3>Compatibility with previous RDF Test Cases N-Triples</h3>
@@ -1252,6 +1241,21 @@
           <div data-include="n-prime-bnf.html">
           </div>
         </section>
+        <section id="n-triples-mediatype">
+			<h2>Media Type and Content Encoding</h2>
+          
+			<p>The media type of N-Triples is <code>application/n-triples</code>.
+			The content encoding of N-Triples is always UTF-8. 
+			See <a href="#sec-mediaReg-n-triples">N-Triples Media Type</a> for the media type 
+			registration form.
+			</p>
+
+			<section>
+				<h3>Other Media Types</h3>
+				<p>N-Triples has been historically provided with other media types. N-Triples may also be provided as <code>text/plain</code>. When used in this way N-Triples MUST use the escaped form of any character outside US-ASCII. As N-Triples is a subset of Turtle a N-Triples document MAY also be provided as <code>text/turtle</code>. In both of these cases the document is not an N-Triples document as an N-Triples document is only provided as <code>application/n-triples</code>.</p>
+			</section>
+
+        </section>
       </section>
 
 <!-- END N-TRIPLES SPEC -->
@@ -1424,7 +1428,7 @@
           <dd><a href="http://www.w3.org/2002/06/registering-mediatype">How to Register a Media Type for a W3C Specification</a></dd>
           <dd><a href="http://www.w3.org/2001/tag/2002/0129-mime">Internet Media Type registration, consistency of use</a><br />TAG Finding 3 June 2002 (Revised 4 September 2002)</dd>
         </dl>
-        <p>The Internet Media Type / MIME Type for N-Triples is &quot;application/ntriples&quot;.</p>
+        <p>The Internet Media Type / MIME Type for N-Triples is &quot;application/n-triples&quot;.</p>
         <p>It is recommended that N-Triples files have the extension &quot;.nt&quot; (all lowercase) on all platforms.</p>
 
         <p>It is recommended that N-Triples files stored on Macintosh HFS file systems be given a file type of &quot;TEXT&quot;.</p>
@@ -1434,7 +1438,7 @@
           <dd>application</dd>
 
           <dt>Subtype name:</dt>
-          <dd>ntriples</dd>
+          <dd>n-triples</dd>
           <dt>Required parameters:</dt>
           <dd>None</dd>
           <dt>Optional parameters:</dt>