Inital split of N-Triples/Turtle
authorGavin Carothers <gavin@carothers.name>
Wed, 23 May 2012 10:18:26 -0700
changeset 408 6f2392da7fd7
parent 407 bb711b18e3fc
child 409 c69d0ef4414f
Inital split of N-Triples/Turtle
rdf-turtle/index.html
rdf-turtle/n-triples.html
--- a/rdf-turtle/index.html	Mon May 21 11:44:43 2012 +0100
+++ b/rdf-turtle/index.html	Wed May 23 10:18:26 2012 -0700
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
-	<title>Turtle and N-Triples Synaxes for RDF</title>
+	<title>Turtle</title>
 	<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
 	<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js' class='remove'></script>
 	<script src='../ReSpec.js/js/respec.js' class='remove'></script>
@@ -31,7 +31,7 @@
 
 	  // if your specification has a subtitle that goes below the main
 	  // formal title, define it here
-	  subtitle   :  "Turtle a syntax for humans, N-Triple a syntax for machines",
+	  subtitle   :  "Terse RDF Triple Language",
 
 	  // if you wish the publication date to be other than today, set this
 	  // publishDate:  "2011-08-09",
@@ -143,7 +143,6 @@
       	<strong>The following are the non-editorial changes since last publication:</strong>
       	<ul>
       		<li>Local part of prefix names can now include ":"
-  			<li>Specification of N-Triples
 			<li>Turtle in HTML
 			<li>Renaming of grammar tokens and rules around IRIs
 			<li>Reserved character escape sequences
@@ -159,12 +158,11 @@
 			<h2>Introduction</h2>
 
 			<p>
-			  This document defines two syntaxes for <a href="../rdf-concepts/index.html">RDF</a> ([[!RDF-CONCEPTS]]), Turtle, the Terse RDF Triple Language, and N-Triples.
-			  N-Triples is a sub-language of Turtle intended for machines.
+			  This document defines Turtle, the Terse RDF Triple Language, a concrete syntax for <a href="../rdf-concepts/index.html">RDF</a> ([[!RDF-CONCEPTS]]).
 			</p>
 
 			<p>
-			  A Turtle or N-Triple document is a textual representations of a RDF graph. The following Turtle document describes the relationship between Green Goblin and Spiderman. The N-Triples document after it describles the same relationship.
+			  A Turtle document is a textual representations of a RDF graph. The following Turtle document describes the relationship between Green Goblin and Spiderman. 
 			</p>
 			<pre class="example"><script type="text/turtle">@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -180,21 +178,12 @@
     rel:enemyOf <http://example.org/#green-goblin> ;
     a foaf:Person ;
     foaf:name "Spiderman", "Spïdermann"@de .</script></pre>
-    <pre class="example n-triples"><script type="application/n-triples"><http://example.org/#green-goblin> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#spiderman> .
-<http://example.org/#green-goblin> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.org/#green-goblin> <http://xmlns.com/foaf/0.1/name> "Green Goblin" .
-<http://example.org/#spiderman> <http://www.perceive.net/schemas/relationship/enemyOf> <http://example.org/#green-goblin> .
-<http://example.org/#spiderman> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<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>
 
     		<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>.
 			  The two grammars share production and terminal names where possible.
-			  Likewise, the N-Triples grammar re-uses some productions and terminals from Turtle.
 			</p>
-			  Comments in either language may be given after a <code>#</code> that is not part of another lexical token and continue to the end of the line.
+			  Comments may be given after a <code>#</code> that is not part of another lexical token and continue to the end of the line.
 
 			<p>
 			  The <a href="#sec-grammar">Turtle Grammar</a> and <a href="#sec-parsing">Parsing</a> sections define the construction of an RDF graph from a Turtle document.
@@ -1004,203 +993,6 @@
           no effect on the parsing of the data blocks.</p>
         </section>
       </section>
-        <!-- BEGIN N-TRIPLES SPEC -->
-
-      <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 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.
-		</p>
-		<p>N-Triples triples are a sequence of RDF terms representing the subject, predicate and object of an RDF Triple. These may be seperated by white space (spaces <code>#x20</code> or tabs <code>#x9</code>). This sequence is terminated by a '<code>.</code>' and a new line (optional at the end of a document).
-		</p>
-
-			<pre class="example"><script type="application/n-triples"><http://one.example/subject1> <http://one.example/predicate1> <http://one.example/object1> . # comments here
-# or on a line by themselves
-_:subject1 <http://an.example/predicate1> "object1" .
-_:subject2 <http://an.example/predicate2> "object2" .
-</script></pre>
-
-			<p>
-			  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 class="informative">
-        	<h3>Summary of diffrences in N-Triples and Turtle</h3>
-        	<section>
-        		<h4>Triples</h4>
-        		<p>N-Triples only allows for <a href="#simple-triples">simple triple</a> statements which MUST NOT contain new lines. A single triple is always a single line of the document.</p>
-        	</section>
-		<section id="iri-summary">
-		  <h3>IRI Representations</h3>
-
-	    <table id="term2escape" class="separated" style="border-collapse:collapse;margin: 2em;">
-	      <thead>
-		<tr>
-		  <th></th>
-		  <th>Turtle</th>
-		  <th>N-Triples</th>
-		  <th>example</th>
-		</tr>
-	      </thead>
-	      <tbody>
-		<tr>
-		  <td class="r">absolute IRI</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td><code>&lt;http://a.example/some/path/&gt;</code></td>
-		</tr>
-		<tr>
-		  <td class="r">relative IRI</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>&lt;/some/path/&gt;</code></td>
-		</tr>
-		<tr>
-		  <td class="r">prefixed name</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>rdfs:label</code></td>
-		</tr>
-		<tr>
-		  <td class="r"><code>a</code> for the predicate <code>rdf:type</code></td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>a</code></td>
-		</tr>
-	      </tbody>
-	    </table>
-			  </section>
-
-		<section id="literal-summary">
-				  <h3>Literal Representations</h3>
-
-	    <table id="term2escape" class="separated" style="border-collapse:collapse;margin: 2em;">
-	      <thead>
-		<tr>
-		  <th></th>
-		  <th>Turtle</th>
-		  <th>N-Triples</th>
-		  <th>example</th>
-		</tr>
-	      </thead>
-	      <tbody>
-		<tr>
-		  <td class="r">single-quoted single-line lexical representation</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>'some literal'</code></td>
-		</tr>
-		<tr>
-		  <td class="r">double-quoted single-line lexical representation</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td><code>"some literal"</code></td>
-		</tr>
-		<tr>
-		  <td class="r">single-quoted multi-line lexical representation</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>'''some<br/>literal'''</code></td>
-		</tr>
-		<tr>
-		  <td class="r">double-quoted multi-line lexical representation</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>"""some<br/>literal"""</code></td>
-		</tr>
-		<tr>
-		  <td class="r">abbreviated numeric</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>13</code></td>
-		</tr>
-		<tr>
-		  <td class="r">abbreviated boolean</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>true</code></td>
-		</tr>
-	      </tbody>
-	    </table>
-			  </section>
-			  				<section id="bnode-summary">
-				  <h3>Summary of Blank Node Representations in N-Triples and Turtle</h3>
-
-	    <table id="term2escape" class="separated" style="border-collapse:collapse;margin: 2em;">
-	      <thead>
-		<tr>
-		  <th></th>
-		  <th>Turtle</th>
-		  <th>N-Triples</th>
-		  <th>example</th>
-		</tr>
-	      </thead>
-	      <tbody>
-		<tr>
-		  <td class="r">labeled blank node</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td><code>&lt;http://a.example/who#Alice&gt; foaf:knows _:bob .</code></td>
-		</tr>
-		<tr>
-		  <td class="r">anonymous node</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>&lt;http://a.example/who#Alice&gt; foaf:knows [] .</code></td>
-		</tr>
-		<tr>
-		  <td class="r">blank node property list</td>
-		  <td style="background-color: green; border:1px solid black;">yes</td>
-		  <td>no</td>
-		  <td><code>&lt;http://a.example/who#Alice&gt; foaf:knows [ foaf:name "Bob" ] .</code></td>
-		</tr>
-	      </tbody>
-	    </table>
-			  </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-triple-grammar">
-          <h3>Grammar</h3>
-          <p>A N-Triples document is a Unicode[[!UNICODE]] character string encoded in UTF-8.
-          Unicode codepoints only in the range U+0 to U+10FFFF inclusive are allowed.</p>
-          <p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
-            [[!EBNF-NOTATION]].</p>
-          <p><a href="#sec-escapes">Escape sequence rules</a> are the same as Turtle. However, as only the <code>STRING_LITERAL2</code> production is allowed new lines in literals MUST be escaped.</p>
-          <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 class="informative">
-				<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 -->
 
       <section id="sec-compared">
         <h2>Turtle compared</h2>
@@ -1356,89 +1148,10 @@
           <dd>None</dd>
           <dt>Author/Change controller:</dt>
 
-          <dd>The N-Triples specification is the product of the RDF WG. The W3C reserves change control over this specifications.</dd>
+          <dd>The Turtle specification is the product of the RDF WG. The W3C reserves change control over this specifications.</dd>
         </dl>
       </section>
       
-      <section id="sec-mediaReg-n-triples" class="appendix">
-        <h2>N-Triples Internet Media Type, File Extension and Macintosh File Type </h2>
-        <dl>
-          <dt>Contact:</dt>
-          <dd>????</dd>
-          <dt>See also:</dt>
-
-          <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/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>
-        <p>This information that follows will be submitted to the IESG for review, approval, and registration with IANA.</p>
-        <dl>
-          <dt>Type name:</dt>
-          <dd>application</dd>
-
-          <dt>Subtype name:</dt>
-          <dd>n-triples</dd>
-          <dt>Required parameters:</dt>
-          <dd>None</dd>
-          <dt>Optional parameters:</dt>
-          <dd>None</dd>
-
-          <dt>Encoding considerations:</dt>
-          <dd>The syntax of N-Triples is expressed over code points in Unicode [[!UNICODE]]. The encoding is always UTF-8 [[!UTF-8]].</dd>
-          <dd>Unicode code points may also be expressed using an \uXXXX (U+0 to U+FFFF) or \UXXXXXXXX syntax (for U+10000 onwards) where X is a hexadecimal digit [0-9A-F]</dd>
-          <dt>Security considerations:</dt>
-          <dd>N-Triples is a general-purpose assertion language; applications may evaluate given data to infer more assertions or to dereference IRIs, invoking the security considerations of the scheme for that IRI. Note in particular, the privacy issues in [[!RFC3023]] section 10 for HTTP IRIs. Data obtained from an inaccurate or malicious data source may lead to inaccurate or misleading conclusions, as well as the dereferencing of unintended IRIs. Care must be taken to align the trust in consulted resources with the sensitivity of the intended use of the data; inferences of potential medical treatments would likely require different trust than inferences for trip planning.</dd>
-
-          <dd>N-Triples is used to express arbitrary application data; security considerations will vary by domain of use. Security tools and protocols applicable to text (e.g. PGP encryption, MD5 sum validation, password-protected compression) may also be used on N-Triples documents. Security/privacy protocols must be imposed which reflect the sensitivity of the embedded information.</dd>
-          <dd>N-Triples can express data which is presented to the user, for example, RDF Schema labels. Application rendering strings retrieved from untrusted N-Triples documents must ensure that malignant strings may not be used to mislead the reader. The security considerations in the media type registration for XML ([[!RFC3023]] section 10) provide additional guidance around the expression of arbitrary data and markup.</dd>
-          <dd>N-Triples uses IRIs as term identifiers. Applications interpreting data expressed in N-Triples should address the security issues of
-      <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRIs)</a> [[!RFC3987]] Section 8, as well as
-      <a class="norm" href="http://www.ietf.org/rfc/rfc3986.txt">Uniform Resource Identifier (URI): Generic Syntax</a> [[!RFC3986]] Section 7.</dd>
-
-          <dd>Multiple IRIs may have the same appearance. Characters in different scripts may 
-    look similar (a Cyrillic &quot;&#1086;&quot; may appear similar to a Latin &quot;o&quot;). A character followed 
-    by combining characters may have the same visual representation as another character 
-    (LATIN SMALL LETTER E followed by COMBINING ACUTE ACCENT has the same visual representation 
-    as LATIN SMALL LETTER E WITH ACUTE).
-    <!-- (<code>foo:resum&#40751;code> and <code>f&#1086;&#1086;:resume&#769;</code>)-->
-    Any person or application that is writing or interpreting data in Turtle must take care to use the IRI that matches the intended semantics, and avoid IRIs that make look similar.
-    Further information about matching of similar characters can be found 
-    in <a class="inform" href="http://www.unicode.org/reports/tr36/">Unicode Security 
-    Considerations</a> [[UNISEC]] and
-    <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource 
-    Identifiers (IRIs)</a> [[RFC3987]] Section 8.
-		  </dd>
-
-          <dt>Interoperability considerations:</dt>
-          <dd>There are no known interoperability issues.</dd>
-          <dt>Published specification:</dt>
-          <dd>This specification.</dd>
-          <dt>Applications which use this media type:</dt>
-
-          <dd>No widely deployed applications are known to use this media type. It may be used by some web services and clients consuming their data.</dd>
-          <dt>Additional information:</dt>
-          <dt>Magic number(s):</dt>
-          <dd>None.</dd>
-          <dt>File extension(s):</dt>
-          <dd>".nt"</dd>
-
-          <dt>Macintosh file type code(s):</dt>
-          <dd>&quot;TEXT&quot;</dd>
-          <dt>Person &amp; email address to contact for further information:</dt>
-
-          <dd>Eric Prud'hommeaux &lt;eric@w3.org&gt;</dd>
-          <dt>Intended usage:</dt>
-          <dd>COMMON</dd>
-          <dt>Restrictions on usage:</dt>
-          <dd>None</dd>
-          <dt>Author/Change controller:</dt>
-
-          <dd>The N-Triples specification is the product of the RDF WG. The W3C reserves change control over this specifications.</dd>
-        </dl>
-      </section>
 
       
       <section id="sec-acks" class="appendix">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rdf-turtle/n-triples.html	Wed May 23 10:18:26 2012 -0700
@@ -0,0 +1,376 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>N-Triples</title>
+    <meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
+  <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js' class='remove'></script>
+  <script src='../ReSpec.js/js/respec.js' class='remove'></script>
+    <script class='remove'>
+      var respecConfig = {
+          // specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
+          specStatus:           "ED",
+          
+          // the specification's short name, as in http://www.w3.org/TR/short-name/
+          shortName:            "n-triples",
+
+          // if your specification has a subtitle that goes below the main
+          // formal title, define it here
+          subtitle   :  "A limited Turtle syntax for triples",
+
+          // if you wish the publication date to be other than today, set this
+          // publishDate:  "2009-08-06",
+
+          // if the specification's copyright date is a range of years, specify
+          // the start date here:
+          copyrightStart: "2001",
+
+          // if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
+          // and its maturity status
+          // previousPublishDate:  "1977-03-15",
+          // previousMaturity:  "WD",
+
+          // if there a publicly available Editor's Draft, this is the link
+          edDraftURI:           "http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/n-triples.html",
+
+          // if this is a LCWD, uncomment and set the end of its review period
+          // lcEnd: "2009-08-05",
+
+          // if you want to have extra CSS, append them to this list
+          // it is recommended that the respec.css stylesheet be kept
+          extraCSS:             ["http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"],
+
+          // editors, add as many as you like
+          // only "name" is required
+          editors:  [
+              { name: "Gavin Carothers", url: "http://gavin.carothers.name/",
+    company: "Lex Machina, Inc", companyURL: "https://lexmachina.com/" },
+              { name: "Eric Prud'hommeaux", url: "http://www.w3.org/People/Eric/",
+    company: "W3C", companyURL: "http://www.w3.org/" },
+
+          ],
+
+          // authors, add as many as you like. 
+          // This is optional, uncomment if you have authors as well as editors.
+          // only "name" is required. Same format as editors.
+
+          authors:  [
+              { name: "David Beckett", url: "http://www.dajobe.org/" },
+              { name: "Gavin Carothers", url: "http://gavin.carothers.name/",
+    company: "Lex Machina, Inc", companyURL: "https://lexmachina.com/" },
+
+          ],
+          
+          // name of the WG
+          wg:           "RDF Working Group",
+          
+          // URI of the public WG page
+          wgURI:        "http://www.w3.org/2011/rdf-wg/",
+          
+          // name (with the @w3c.org) of the public mailing to which comments are due
+          wgPublicList: "public-rdf-comments",
+          
+          // URI of the patent status for this WG, for Rec-track documents
+          // !!!! IMPORTANT !!!!
+          // This is important for Rec-track documents, do not copy a patent URI from a random
+          // document unless you know what you're doing. If in doubt ask your friendly neighbourhood
+          // Team Contact.
+          wgPatentURI:  "http://www.w3.org/2004/01/pp-impl/46168/status",
+          doRDFa: true,
+      };
+    </script>
+      <style type="text/css">
+    /* Style Turtle script blocks to be visable */
+    pre.example script {
+        display:block;
+    }
+    .separated thead tr th { border:1px solid black; padding: .2em; }
+    .separated tbody tr td { border:1px solid black; text-align: center; }
+    .separated tbody tr td.r { text-align: right; padding: .5em; }
+    .grammar td { font-family: monospace;}
+    .grammar-literal { color: gray;}
+    </style> 
+  </head>
+  <body>
+    <section id='abstract'>
+    N-Triples is a line-based, plain text format for encoding an RDF graph.
+</section>
+        <!-- BEGIN N-TRIPLES SPEC -->
+
+      <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 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.
+    </p>
+    <p>N-Triples triples are a sequence of RDF terms representing the subject, predicate and object of an RDF Triple. These may be seperated by white space (spaces <code>#x20</code> or tabs <code>#x9</code>). This sequence is terminated by a '<code>.</code>' and a new line (optional at the end of a document).
+    </p>
+
+      <pre class="example"><script type="application/n-triples"><http://one.example/subject1> <http://one.example/predicate1> <http://one.example/object1> . # comments here
+# or on a line by themselves
+_:subject1 <http://an.example/predicate1> "object1" .
+_:subject2 <http://an.example/predicate2> "object2" .
+</script></pre>
+
+      <p>
+        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 class="informative">
+          <h3>Summary of diffrences in N-Triples and Turtle</h3>
+          <section>
+            <h4>Triples</h4>
+            <p>N-Triples only allows for <a href="#simple-triples">simple triple</a> statements which MUST NOT contain new lines. A single triple is always a single line of the document.</p>
+          </section>
+    <section id="iri-summary">
+      <h3>IRI Representations</h3>
+
+      <table id="term2escape" class="separated" style="border-collapse:collapse;margin: 2em;">
+        <thead>
+    <tr>
+      <th></th>
+      <th>Turtle</th>
+      <th>N-Triples</th>
+      <th>example</th>
+    </tr>
+        </thead>
+        <tbody>
+    <tr>
+      <td class="r">absolute IRI</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td><code>&lt;http://a.example/some/path/&gt;</code></td>
+    </tr>
+    <tr>
+      <td class="r">relative IRI</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>&lt;/some/path/&gt;</code></td>
+    </tr>
+    <tr>
+      <td class="r">prefixed name</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>rdfs:label</code></td>
+    </tr>
+    <tr>
+      <td class="r"><code>a</code> for the predicate <code>rdf:type</code></td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>a</code></td>
+    </tr>
+        </tbody>
+      </table>
+        </section>
+
+    <section id="literal-summary">
+          <h3>Literal Representations</h3>
+
+      <table id="term2escape" class="separated" style="border-collapse:collapse;margin: 2em;">
+        <thead>
+    <tr>
+      <th></th>
+      <th>Turtle</th>
+      <th>N-Triples</th>
+      <th>example</th>
+    </tr>
+        </thead>
+        <tbody>
+    <tr>
+      <td class="r">single-quoted single-line lexical representation</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>'some literal'</code></td>
+    </tr>
+    <tr>
+      <td class="r">double-quoted single-line lexical representation</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td><code>"some literal"</code></td>
+    </tr>
+    <tr>
+      <td class="r">single-quoted multi-line lexical representation</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>'''some<br/>literal'''</code></td>
+    </tr>
+    <tr>
+      <td class="r">double-quoted multi-line lexical representation</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>"""some<br/>literal"""</code></td>
+    </tr>
+    <tr>
+      <td class="r">abbreviated numeric</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>13</code></td>
+    </tr>
+    <tr>
+      <td class="r">abbreviated boolean</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>true</code></td>
+    </tr>
+        </tbody>
+      </table>
+        </section>
+                <section id="bnode-summary">
+          <h3>Summary of Blank Node Representations in N-Triples and Turtle</h3>
+
+      <table id="term2escape" class="separated" style="border-collapse:collapse;margin: 2em;">
+        <thead>
+    <tr>
+      <th></th>
+      <th>Turtle</th>
+      <th>N-Triples</th>
+      <th>example</th>
+    </tr>
+        </thead>
+        <tbody>
+    <tr>
+      <td class="r">labeled blank node</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td><code>&lt;http://a.example/who#Alice&gt; foaf:knows _:bob .</code></td>
+    </tr>
+    <tr>
+      <td class="r">anonymous node</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>&lt;http://a.example/who#Alice&gt; foaf:knows [] .</code></td>
+    </tr>
+    <tr>
+      <td class="r">blank node property list</td>
+      <td style="background-color: green; border:1px solid black;">yes</td>
+      <td>no</td>
+      <td><code>&lt;http://a.example/who#Alice&gt; foaf:knows [ foaf:name "Bob" ] .</code></td>
+    </tr>
+        </tbody>
+      </table>
+        </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-triple-grammar">
+          <h3>Grammar</h3>
+          <p>A N-Triples document is a Unicode[[!UNICODE]] character string encoded in UTF-8.
+          Unicode codepoints only in the range U+0 to U+10FFFF inclusive are allowed.</p>
+          <p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
+            [[!EBNF-NOTATION]].</p>
+          <p><a href="#sec-escapes">Escape sequence rules</a> are the same as Turtle. However, as only the <code>STRING_LITERAL2</code> production is allowed new lines in literals MUST be escaped.</p>
+          <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 class="informative">
+        <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 -->
+
+      <section id="sec-mediaReg-n-triples" class="appendix">
+        <h2>N-Triples Internet Media Type, File Extension and Macintosh File Type </h2>
+        <dl>
+          <dt>Contact:</dt>
+          <dd>????</dd>
+          <dt>See also:</dt>
+
+          <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/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>
+        <p>This information that follows will be submitted to the IESG for review, approval, and registration with IANA.</p>
+        <dl>
+          <dt>Type name:</dt>
+          <dd>application</dd>
+
+          <dt>Subtype name:</dt>
+          <dd>n-triples</dd>
+          <dt>Required parameters:</dt>
+          <dd>None</dd>
+          <dt>Optional parameters:</dt>
+          <dd>None</dd>
+
+          <dt>Encoding considerations:</dt>
+          <dd>The syntax of N-Triples is expressed over code points in Unicode [[!UNICODE]]. The encoding is always UTF-8 [[!UTF-8]].</dd>
+          <dd>Unicode code points may also be expressed using an \uXXXX (U+0 to U+FFFF) or \UXXXXXXXX syntax (for U+10000 onwards) where X is a hexadecimal digit [0-9A-F]</dd>
+          <dt>Security considerations:</dt>
+          <dd>N-Triples is a general-purpose assertion language; applications may evaluate given data to infer more assertions or to dereference IRIs, invoking the security considerations of the scheme for that IRI. Note in particular, the privacy issues in [[!RFC3023]] section 10 for HTTP IRIs. Data obtained from an inaccurate or malicious data source may lead to inaccurate or misleading conclusions, as well as the dereferencing of unintended IRIs. Care must be taken to align the trust in consulted resources with the sensitivity of the intended use of the data; inferences of potential medical treatments would likely require different trust than inferences for trip planning.</dd>
+
+          <dd>N-Triples is used to express arbitrary application data; security considerations will vary by domain of use. Security tools and protocols applicable to text (e.g. PGP encryption, MD5 sum validation, password-protected compression) may also be used on N-Triples documents. Security/privacy protocols must be imposed which reflect the sensitivity of the embedded information.</dd>
+          <dd>N-Triples can express data which is presented to the user, for example, RDF Schema labels. Application rendering strings retrieved from untrusted N-Triples documents must ensure that malignant strings may not be used to mislead the reader. The security considerations in the media type registration for XML ([[!RFC3023]] section 10) provide additional guidance around the expression of arbitrary data and markup.</dd>
+          <dd>N-Triples uses IRIs as term identifiers. Applications interpreting data expressed in N-Triples should address the security issues of
+      <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRIs)</a> [[!RFC3987]] Section 8, as well as
+      <a class="norm" href="http://www.ietf.org/rfc/rfc3986.txt">Uniform Resource Identifier (URI): Generic Syntax</a> [[!RFC3986]] Section 7.</dd>
+
+          <dd>Multiple IRIs may have the same appearance. Characters in different scripts may 
+    look similar (a Cyrillic &quot;&#1086;&quot; may appear similar to a Latin &quot;o&quot;). A character followed 
+    by combining characters may have the same visual representation as another character 
+    (LATIN SMALL LETTER E followed by COMBINING ACUTE ACCENT has the same visual representation 
+    as LATIN SMALL LETTER E WITH ACUTE).
+    <!-- (<code>foo:resum&#40751;code> and <code>f&#1086;&#1086;:resume&#769;</code>)-->
+    Any person or application that is writing or interpreting data in Turtle must take care to use the IRI that matches the intended semantics, and avoid IRIs that make look similar.
+    Further information about matching of similar characters can be found 
+    in <a class="inform" href="http://www.unicode.org/reports/tr36/">Unicode Security 
+    Considerations</a> [[UNISEC]] and
+    <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource 
+    Identifiers (IRIs)</a> [[RFC3987]] Section 8.
+      </dd>
+
+          <dt>Interoperability considerations:</dt>
+          <dd>There are no known interoperability issues.</dd>
+          <dt>Published specification:</dt>
+          <dd>This specification.</dd>
+          <dt>Applications which use this media type:</dt>
+
+          <dd>No widely deployed applications are known to use this media type. It may be used by some web services and clients consuming their data.</dd>
+          <dt>Additional information:</dt>
+          <dt>Magic number(s):</dt>
+          <dd>None.</dd>
+          <dt>File extension(s):</dt>
+          <dd>".nt"</dd>
+
+          <dt>Macintosh file type code(s):</dt>
+          <dd>&quot;TEXT&quot;</dd>
+          <dt>Person &amp; email address to contact for further information:</dt>
+
+          <dd>Eric Prud'hommeaux &lt;eric@w3.org&gt;</dd>
+          <dt>Intended usage:</dt>
+          <dd>COMMON</dd>
+          <dt>Restrictions on usage:</dt>
+          <dd>None</dd>
+          <dt>Author/Change controller:</dt>
+
+          <dd>The N-Triples specification is the product of the RDF WG. The W3C reserves change control over this specifications.</dd>
+        </dl>
+      </section>
+
+  </body>
+</html>