Production of quads in parsing process
authorAndy Seaborne <andy.seaborne@apache.org>
Sun, 01 Sep 2013 14:42:35 +0100
changeset 1049 f53c3a33a448
parent 1048 c98393e3e374
child 1050 2e1337bac0a0
Production of quads in parsing process
trig/index.html
--- a/trig/index.html	Sun Sep 01 14:09:43 2013 +0100
+++ b/trig/index.html	Sun Sep 01 14:42:35 2013 +0100
@@ -676,12 +676,60 @@
           </section>
           <section id="sec-parsing-triples">
           <h3>RDF Triples Constructors</h3>
+          <p><small>@@ formatting of references to grammar rules</small></p>
+          <p><small>@@ first draft wording - needs refining</small></p>
               <p>
-		A TriG document defines an RDF Dataset composed of a set of <a href="../rdf-concepts/index.html#dfn-rdf-graph">RDF graph</a>s composed of set of <a href="../rdf-concepts/index.html#dfn-rdf-triple">RDF triple</a>s.
+		        A TriG document defines an <a href="http://www.w3.org/TR/rdf11-concepts/#section-dataset"
+                >RDF Dataset</a> composed of one default graph and zero or
+                more named graphs. Each graph is composed of a set of 
+                <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple">RDF triple</a>s.
+                </p>
+              
+              <h4 id="output-graph" 
+                  style="padding-bottom:0; margin-bottom:0;"
+                  >Output Graph:</h4>
+              <p style="padding-top:0; margin-top:0;">The state <code class="curGraph">curGraph</code> is
+                initially unset.</p>
+              <p>
+                The grammar production starting <code>"<code class="grammar-literal">GRAPH</code>"</code> in
+                rule <code><a href="#grammar-production-block">block</a></code>
+                or the production <code>(iri | BlankNode) wrappedGraph</code>
+                in rule 
+                <code><a href="#grammar-production-triplesOrGraph">triplesOrGraph</a></code>
+                set <code class="curGraph">curGraph</code> to the IRI or
+                blank node just matched.
+              </p>
 
-		The <code><a href="#grammar-production-subject">graph</a></code> production sets the <code class="curGraph">curGraph</code> to the term produced by <code><a href="#grammar-production-graphName">graphName</a></code>, if there is no <code>graphName</code>, the <code class="curGraph">curGraph</code> is set to the default graph. 
+              <p>
+                The grammar production <code>wrappedGraph</code> in rule  <code><a href="#grammar-production-block">block</a></code>
+                sets <code class="curGraph">curGraph</code> to be
+                undefined.
+              </p>
 
+              <p>
+                The grammar production 
+                <code>(iri | BlankNode) predicateObjectList '.'</code>
+                in rule  <code><a href="#grammar-production-triplesOrGraph">triplesOrGraph</a></code>
+                sets <code class="curGraph">curGraph</code> to be
+                undefined.
+              </p>
+                  
+              <pre>
+                The grammar production in rule  
+                <code><a href="#grammar-production-triples2">triples2</a></code>
+                sets <code class="curGraph">curGraph</code> to be
+                undefined.
+              </pre>
 
+              <p>
+              Each RDF triple produced is added to 
+              <code class="curGraph">curGraph</code>
+              or the default graph if 
+              <code class="curGraph">curGraph</code> is not set at that
+              point in the parsing process.
+              </p>
+
+          <p>
 		The <code><a href="#grammar-production-subject">subject</a></code> production sets the <code class="curSubject">curSubject</code>.
 		The <code><a href="#grammar-production-verb">verb</a></code> production sets the <code class="curPredicate">curPredicate</code>.
 		Each <a tabindex="30" class="grammarRef" href="#grammar-production-object">object</a> <code>N</code> in the document produces an RDF triple: <span class="ntriple"><code class="curSubject">curSubject</code> <code class="curPredicate">curPredicate</code> <code>N</code> .</span> Each RDF triple produced is added to <code class="curGraph">curGraph</code>.