Parsing defined for N-Triples and N-Quads
authorGavin Carothers <gavin@carothers.name>
Tue, 02 Jul 2013 14:29:53 -0700
changeset 883 b8994acd28ac
parent 882 ddf50965e2f5
child 884 575c6d893230
Parsing defined for N-Triples and N-Quads
nquads/index.html
rdf-turtle/n-triples.html
--- a/nquads/index.html	Tue Jul 02 13:36:26 2013 -0700
+++ b/nquads/index.html	Tue Jul 02 14:29:53 2013 -0700
@@ -200,7 +200,33 @@
         </section>
         <section id="sec-parsing">
           <h3>Parsing</h3>
-          <p class="issue">It may be simple, but should still be defined.</p>
+          <p>Parsing N-Quads requires a state of one item:</p>
+          <ul>
+            <li id="bnodeLabels">Map[<a class="type string">string</a> -&gt; <a href="../rdf-concepts/index.html#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">
+          <h3>RDF Term Constructors</h3>
+              <p>This table maps productions and lexical tokens to <code>RDF terms</code> or components of <code>RDF terms</code> listed in <a href="#sec-parsing" class="sectionRef"></a>:</p>
+              <table class="simple">
+                <thead>
+                  <tr><th>production</th><th>type</th><th>procedure</th></tr>
+                </thead>
+                <tbody>
+                  <tr id="handle-IRIREF"    ><td style="text-align:left;"><a class="type IRI"         href="#grammar-production-IRIREF"               >IRIREF               </a></td><td><a href="../rdf-concepts/index.html#dfn-iri">      IRI         </a></td><td>The characters between "&lt;" and "&gt;" are taken, with the <a href="#numeric">numeric escape sequences</a> unescaped, to form the unicode string of the IRI.</tr>
+                  <tr id="handle-STRING_LITERAL_QUOTE"         ><td style="text-align:left;"><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_QUOTE"      >STRING_LITERAL_QUOTE      </a></td><td><a href="../rdf-concepts/index.html#dfn-lexical-form">                         lexical form</a></td><td>The characters between the outermost '"'s   are taken, with <a href="#numeric">numeric</a> and <a href="#string">string</a> escape sequences unescaped, to form the unicode string of a lexical form.</td></tr>
+                  <tr id="handle-LANGTAG"                 ><td style="text-align:left;"><a class="type langTag"     href="#grammar-production-LANGTAG"              >LANGTAG              </a></td><td><a href="../rdf-concepts/index.html#dfn-language-tag">language tag</a></td><td>The characters following the <code>@</code> form the unicode string of the language tag.</td></tr>
+                  <tr id="handle-literal"              ><td style="text-align:left;"><a class="type literal"     href="#grammar-production-literal"           >literal           </a></td><td><a href="../rdf-concepts/index.html#dfn-literal">            literal     </a></td><td>The literal has a lexical form of the first rule argument, <code>   STRING_LITERAL_QUOTE</code>, and either a language tag of <code>LANGTAG</code> or a datatype IRI of <code>iri</code>, depending on which rule matched the input. if neither a language tag nor a datatype IRI is provided, the literal has a datatype of <code>xsd:string</code>.</td></tr>
+                  <tr id="handle-BLANK_NODE_LABEL"        ><td style="text-align:left;"><a class="type bNode"       href="#grammar-production-BLANK_NODE_LABEL"     >BLANK_NODE_LABEL     </a></td><td><a href="../rdf-concepts/index.html#dfn-blank-node">         blank node  </a></td><td>The string matching the second argument, <code>PN_LOCAL</code>, is a key in <a href="#bnodeLabels">bnodeLabels</a>. If there is no corresponding blank node in the map, one is allocated.</td></tr>
+                </tbody>
+              </table>
+          </section>
+          <section>
+            <h3>RDF Dataset Construction</h3>
+            <p>A N-Quad document defines an RDF dataset composed of RDF graphs composed of a set of RDF triples. The  <code><a href="#grammar-production-statement">statement</a></code> production produces a triple defined by the terms constructed for <code><a href="#grammar-production-subject">subject</a></code>, <code><a href="#grammar-production-predicate">predicate</a></code> and <code><a href="#grammar-production-object">object</a></code>. This RDF triple is added to the graph labeled by the production <code><a href="#grammar-production-graphLabel">graphLabel</a></code>, if no <code>graphLabel</code> is present the triple is added to the RDF datasets default graph.</p>
+          </section>
+
+
         </section>
 
       <section id="sec-mediaReg" class="appendix">
--- a/rdf-turtle/n-triples.html	Tue Jul 02 13:36:26 2013 -0700
+++ b/rdf-turtle/n-triples.html	Tue Jul 02 14:29:53 2013 -0700
@@ -262,6 +262,37 @@
           </div>
         </section>
 
+        <section id="sec-parsing">
+          <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="../rdf-concepts/index.html#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">
+          <h3>RDF Term Constructors</h3>
+              <p>This table maps productions and lexical tokens to <code>RDF terms</code> or components of <code>RDF terms</code> listed in <a href="#sec-parsing" class="sectionRef"></a>:</p>
+              <table class="simple">
+                <thead>
+                  <tr><th>production</th><th>type</th><th>procedure</th></tr>
+                </thead>
+                <tbody>
+                  <tr id="handle-IRIREF"    ><td style="text-align:left;"><a class="type IRI"         href="#grammar-production-IRIREF"               >IRIREF               </a></td><td><a href="../rdf-concepts/index.html#dfn-iri">      IRI         </a></td><td>The characters between "&lt;" and "&gt;" are taken, with the <a href="#numeric">numeric escape sequences</a> unescaped, to form the unicode string of the IRI.</tr>
+                  <tr id="handle-STRING_LITERAL_QUOTE"         ><td style="text-align:left;"><a class="type lexicalForm" href="#grammar-production-STRING_LITERAL_QUOTE"      >STRING_LITERAL_QUOTE      </a></td><td><a href="../rdf-concepts/index.html#dfn-lexical-form">                         lexical form</a></td><td>The characters between the outermost '"'s   are taken, with <a href="#numeric">numeric</a> and <a href="#string">string</a> escape sequences unescaped, to form the unicode string of a lexical form.</td></tr>
+                  <tr id="handle-LANGTAG"                 ><td style="text-align:left;"><a class="type langTag"     href="#grammar-production-LANGTAG"              >LANGTAG              </a></td><td><a href="../rdf-concepts/index.html#dfn-language-tag">language tag</a></td><td>The characters following the <code>@</code> form the unicode string of the language tag.</td></tr>
+                  <tr id="handle-literal"              ><td style="text-align:left;"><a class="type literal"     href="#grammar-production-literal"           >literal           </a></td><td><a href="../rdf-concepts/index.html#dfn-literal">            literal     </a></td><td>The literal has a lexical form of the first rule argument, <code>   STRING_LITERAL_QUOTE</code>, and either a language tag of <code>LANGTAG</code> or a datatype IRI of <code>iri</code>, depending on which rule matched the input. if neither a language tag nor a datatype IRI is provided, the literal has a datatype of <code>xsd:string</code>.</td></tr>
+                  <tr id="handle-BLANK_NODE_LABEL"        ><td style="text-align:left;"><a class="type bNode"       href="#grammar-production-BLANK_NODE_LABEL"     >BLANK_NODE_LABEL     </a></td><td><a href="../rdf-concepts/index.html#dfn-blank-node">         blank node  </a></td><td>The string matching the second argument, <code>PN_LOCAL</code>, is a key in <a href="#bnodeLabels">bnodeLabels</a>. If there is no corresponding blank node in the map, one is allocated.</td></tr>
+                </tbody>
+              </table>
+          </section>
+          <section>
+            <h3>RDF Triple Construction</h3>
+            <p>A N-Triple document defines an RDF graphs composed of a set of RDF triples. The <code><a href="#grammar-production-triple">triple</a></code> production produces a triple defined by the terms constructed for <code><a href="#grammar-production-subject">subject</a></code>, <code><a href="#grammar-production-predicate">predicate</a></code> and <code><a href="#grammar-production-object">object</a></code>. 
+          </section>
+
+
+        </section>
+
       <section id="sec-mediaReg-n-triples" class="appendix">
         <h2>N-Triples Internet Media Type, File Extension and Macintosh File Type </h2>
         <dl>