Proposed for review - separate section for canoncial N-Triples
authorAndy Seaborne <andy.seaborne@apache.org>
Thu, 05 Dec 2013 21:47:50 +0000
changeset 1479 6497eb3e66e7
parent 1478 e4c3b837701c
child 1480 a958aabb06ec
Proposed for review - separate section for canoncial N-Triples
rdf-turtle/n-triples.html
--- a/rdf-turtle/n-triples.html	Thu Dec 05 21:40:23 2013 +0000
+++ b/rdf-turtle/n-triples.html	Thu Dec 05 21:47:50 2013 +0000
@@ -128,8 +128,8 @@
         N-Triples triples are also Turtle <a href="#simple-triples">simple triples</a>, but Turtle includes other representations of RDF terms and <a href="http://www.w3.org/TR/turtle/#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 N-triples language.
       </p>
       <p>The RDF graph represented by an N-Triples document contains
-        exactly each triple matching the N-Triples <a
-        href="#grammar-production-triple"><code>triple</code></a>
+        exactly each triple matching the N-Triples 
+        <a href="#grammar-production-triple"><code>triple</code></a>
         production</a>.
       </section>
 
@@ -197,21 +197,40 @@
 
     </section>
 
-        <section id="n-triples-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
-            <li>Blank node labels may start with a digit
-          </ul>
-        </section>
+      <section id="n-triples-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
+          <li>Blank node labels may start with a digit
+        </ul>
+      </section>
+
+      <section id="canonical-ntriples">
+        <h3>A Canonical form of N-Triples</h3>
+             <p>A canonical form of N-Triples has the following additional
+               constraints on layout:</p>
+      <ul>
+        <li>Whitespace following <code>subject</code>, <code>predicate</code>, and <code>object</code> MUST be a single space, (<code>U+0020</code>) all other locations that allow whitespace MUST be empty.</li>
+        <li>There MUST be no comments.</li>
+        <li><code>HEX</code> MUST use only uppercase letters (<code>[A-F]</code>).</li>
+        <li>Characters MUST NOT be represented by <code>UCHAR</code>.</li>
+        <li>Within <a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a>,
+          only characters not allowed directly in 
+          <a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a> (<code>U+0022</code>, <code>U+005C</code>, <code>U+000A</code>, <code>U+000D</code>) use
+          <code>ECHAR</code>.
+          For all other characters, <code>ECHAR</code> MUST NOT be used.</li>
+      </ul>
+      </section>
 
       <section id="conformance">
+        <h3>Conformance</h3>
+        
           <p>This specification defines conformance criteria for:</p>
               <ul>
                 <li>N-Triples documents
@@ -220,15 +239,9 @@
               </ul>
       <p>A conforming <dfn>N-Triples document</dfn> is a Unicode string that conforms to the grammar and additional constraints defined in <a href="#n-triples-grammar" class="sectionRef"></a>, starting with the <a href="#grammar-production-ntriplesDoc"><code>ntriplesDoc</code> production</a>. An N-Triples document serializes an RDF graph.</p>
 
-      <p>A <dfn>canonical N-Triples document</dfn> is a <strong>N-Triples document</strong> with additional constraints:<p>
-
-      <ul>
-        <li>Whitespace following <code>subject</code>, <code>predicate</code>, and <code>object</code> MUST be a single space, (<code>U+0020</code>) all other locations that allow whitespace MUST be empty.
-        <li>All comments MUST be removed.
-        <li><code>HEX</code> MUST use only uppercase letters (<code>[A-F]</code>).
-        <li>Characters not allowed directly in STRING_LITERAL_QUOTE (<code>U+0022</code>, <code>U+005C</code>, <code>U+000A</code>, <code>U+000D</code>) MUST use <code>ECHAR</code> not <code>UCHAR</code>.
-        <li>Characters MUST be represented directly and not by <code>UCHAR</code>.
-      </ul>
+      <p>A conforming <dfn>Canonical N-Triples document</dfn> is an 
+        <strong>N-Triples document</strong> that follows the 
+        <a href="#canonical-ntriples">additional constraints</a> of Canonical N-Triples.</p>
 
       <p>A conforming <dfn>N-Triples parser</dfn> is a system capable of reading N-Triples 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>
 
@@ -269,7 +282,7 @@
           <h3>Parsing</h3>
           <p>Parsing N-Triples requires a state of one item:</p>
           <ul>
-            <li id="bnodeLabels">Map[<a class="type string">string</a> -&gt; <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node">blank node</a>] <code class="dfn">bnodeLabels</code> — A mapping from string to blank node.</li>
+            <li id="bnodeLabels">Map[string -&gt; <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node">blank node</a>] <code class="dfn">bnodeLabels</code> — A mapping from string to blank node.</li>
           </ul>
 
           <section  id="sec-parsing-terms">
@@ -310,7 +323,7 @@
         <p>No substitutive changes.</p>
         <h3>Changes since original publication as Note</h3>
         <ul>
-          <li>Conformance section now defines <a href="#dfn-canonical-n-triples-document">canonical N-Triples document</a>.
+          <li>Section defines <a href="#dfn-canonical-n-triples-document">canonical N-Triples document</a>.
           <li>White space rules defined outside of grammar, as in Turtle.
           <li>Comment processing defined.
           <li>Parsing is defined.