--- a/rdf-turtle/n-triples.html Sat Mar 09 08:33:21 2013 -0800
+++ b/rdf-turtle/n-triples.html Sat Mar 09 08:58:11 2013 -0800
@@ -44,9 +44,6 @@
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.
@@ -97,8 +94,8 @@
<!-- 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>
+ <h2>Introduction</h2>
+ <p>This document 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>
@@ -115,8 +112,63 @@
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>
- <section class="informative">
+ <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="conformance">
+ <p>This specification defines conformance criteria for:</p>
+ <ul>
+ <li>N-Triple documents
+ <li>N-Triple parsers
+ <li>N-Triple seralizers
+ </ul>
+ <p>A conforming <strong>N-Triple document</strong> is a Unicode string that conforms to the grammar and additional constraints defined in <a href="#sec-grammar" class="sectionRef"></a>, starting with the <a href="#grammar-production-turtleDoc"><code>turtleDoc</code> production</a>. A N-Triple document serializes an RDF graph.</p>
+
+ <p>A conforming <strong>N-Triple parser</strong> is a system capable of reading N-Triple documents on behalf of an application. It makes the serialized RDF graph, as defined in <a href="#sec-parsing" class="sectionRef"></a>, available to the application, usually through some form of API.</p>
+
+ <p>The IRI that identifies the N-Triple language is: <code>http://www.w3.org/ns/formats/N-Triple</code></p>
+
+ <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>
+
+ <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="sec-diff-turtle" class="appendix informative">
<h3>Summary of diffrences in N-Triples and Turtle</h3>
<section>
<h4>Triples</h4>
@@ -251,44 +303,6 @@
</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 -->