Lots of editoral work, include conformence, etc
authorGavin Carothers <gavin@carothers.name>
Sat, 09 Mar 2013 08:22:10 -0800
changeset 635 05d71999edcd
parent 634 0a564bf5fc34
child 636 8e4d58601c57
Lots of editoral work, include conformence, etc
rdf-turtle/index.html
trig/index.html
--- a/rdf-turtle/index.html	Sat Mar 09 07:40:14 2013 -0800
+++ b/rdf-turtle/index.html	Sat Mar 09 08:22:10 2013 -0800
@@ -617,13 +617,13 @@
         				<li>Turtle documents
     					<li>Turtle parsers
 					</ul>
-			<p>A conforming <strong>Turtle 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 Turtle document serializes an RDF graph.</p>
+			<p>A conforming <strong>Turtle 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-trigDoc"><code>trigDoc</code> production</a>. A TriG document serializes an RDF Dataset.</p>
 
-			<p>A conforming <strong>Turtle parser</strong> is a system capable of reading Turtle 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>A conforming <strong>TriG parser</strong> is a system capable of reading TriG documents on behalf of an application. It makes the serialized RDF dataset, 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 Turtle language is: <code>http://www.w3.org/ns/formats/Turtle</code></p>          
+			<p>The IRI that identifies the TriG language is: <code>http://www.w3.org/ns/formats/TriG</code></p>          
 
-			<p class="note">This specification does not define how Turtle parsers handle non-conforming input documents.</p>
+			<p class="note">This specification does not define how TriG parsers handle non-conforming input documents.</p>
 	        <section id="sec-mime">
 	          <h2>Media Type and Content Encoding</h2>
 	          
--- a/trig/index.html	Sat Mar 09 07:40:14 2013 -0800
+++ b/trig/index.html	Sat Mar 09 08:22:10 2013 -0800
@@ -119,10 +119,6 @@
 
 		<section id="sec-trig-intro" class="informative">
 			<h2>An Introduction to TriG</h2>
-			<p>The
-			<a href="#sec-syntax">TriG Syntax</a> and <a href="#sec-grammar">TriG 
-			Grammar</a> sections formally define the language.
-			</p>
 
 			<p>A TriG document allows writing down an RDF Dataset in a compact
 			textual form.  It consists of a sequence of directives, graph statements 
@@ -137,10 +133,12 @@
 			by each graph statement, and may reoccur as part of any triple statement. 
 			Optionally one graph statement may not not be labeled with an IRI. Such a 
 			graph statement corresponds to the Default Graph of an RDF Dataset.</p>
+			<p>
+			  The construction of an RDF Dataset from a TriG document is defined in <a href="#sec-grammar" class="sectionRef">TriG Grammar</a> and <a href="#sec-parsing" class="sectionRef">Parsing</a>.
+			</p>
 
 			<section id="sec-graph-statements">
 				<h3>Graph Statements</h3>
-				<p class="issue">Examples should not refer to TriX vocabularies.<p>
 				
 				<p>A graph statement pairs an IRI with a RDF Graph. The triple statements that make up the graph are enclosed in <code>{}</code>.</p>
 
@@ -201,32 +199,235 @@
 				</section>
 			</section>
 		</section>
+        <section id="conformance">
+        	<p>This specification defines conformance criteria for:</p>
+        			<ul>
+        				<li>TriG documents
+    					<li>TriG parsers
+					</ul>
+			<p>A conforming <strong>TriG 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 Turtle document serializes an RDF dataset.</p>
 
-		<section id="sec-syntax">
-			<h2>Syntax</h2>
-			<p class="issue">There should likely be some content here.</p>
-		</section>
+			<p>A conforming <strong>TriG parser</strong> is a system capable of reading TriG documents on behalf of an application. It makes the serialized RDF dataset, 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 TriG language is: <code>http://www.w3.org/ns/formats/TriG</code></p>          
+
+			<p class="note">This specification does not define how TriG parsers handle non-conforming input documents.</p>
+	        <section id="sec-mime">
+	          <h2>Media Type and Content Encoding</h2>
+	          
+	          <p>The media type of TriG is <code>application/trig</code>.
+	          The content encoding of TriG content is always UTF-8. 
+	          </p>
+	        </section>
+        </section>
+
 		<section id="sec-grammar">
 			<h2>TriG Grammar</h2>
-			<p>Defer to Turtle</p>
+          <p>A TriG document is a
+          Unicode[[!UNICODE]]
+          character string encoded in UTF-8.
+          Unicode characters only in the range U+0000 to U+10FFFF inclusive are
+          allowed.
+          </p>
+          <section id="sec-grammar-ws">
+            <h3>White Space</h3>
+			<p>White space (production <a href="#grammar-production-WS">WS</a>) is used to separate two terminals which would otherwise be (mis-)recognized as one terminal. Rule names below in capitals indicate where white space is significant; these form a possible choice of terminals for constructing a TriG parser.</p>
+
+			<p>White space is significant in the production <a href="#grammar-production-String">String</a>.</p>
+          </section>
+          <section id="sec-grammar-comments">
+            <h3>Comments</h3>
+
+            <p>Comments in TriG take the form of '#', outside an
+            <a href="#grammar-production-IRIREF">IRIREF</a> or <a href="#grammar-production-String">String</a>,
+            and continue to the end of line (marked by characters U+000D or U+000A)
+            or end of file if there is no end of line after the comment
+            marker.  Comments are treated as white space.
+
+            </p>
+          </section>
+          <section id="sec-iri-references">
+          	<h3>IRI References</h3>
+  					<p>
+					  Relative IRIs are resolved with base IRIs as per <a href="http://www.ietf.org/rfc/rfc3986.txt" class="norm">Uniform Resource Identifier (URI): Generic Syntax</a> [<a href="#rfc3986">RFC3986</a>] using only the basic algorithm in section 5.2.
+					  Neither Syntax-Based Normalization nor Scheme-Based Normalization (described in sections 6.2.2 and 6.2.3 of RFC3986) are performed.
+					  Characters additionally allowed in IRI references are treated in the same way that unreserved characters are treated in URI references, per section 6.5 of <a href="http://www.ietf.org/rfc/rfc3987.txt" class="norm">Internationalized Resource Identifiers (IRIs)</a> [<a href="#rfc3987">RFC3987</a>].
+					</p>
+					<p>
+					  The <code>@base</code> directive defines the Base IRI used to resolve relative IRIs per RFC3986 section 5.1.1, "Base URI Embedded in Content".
+					  Section 5.1.2, "Base URI from the Encapsulating Entity" defines how the In-Scope Base IRI may come from an encapsulating document, such as a SOAP envelope with an xml:base directive or a mime multipart document with a Content-Location header.
+					  The "Retrieval URI" identified in 5.1.3, Base "URI from the Retrieval URI", is the URL from which a particular Turtle document was retrieved.
+					  If none of the above specifies the Base URI, the default Base URI (section 5.1.4, "Default Base URI") is used.
+					  Each <code>@base</code> directive sets a new In-Scope Base URI, relative to the previous one.
+					</p>
+			</section>
+
+          <section id="sec-escapes">
+            <h3>Escape Sequences</h3>
+
+	    <p>
+	      There are three forms of escapes used in TriG documents:
+	    </p>
+
+	    <ul>
+	      <li>
+		<p>
+		  <em id="numeric">numeric escape sequences</em> represent Unicode code points:
+		</p>
+
+		<table>
+		  <thead>
+		    <tr>
+		      <th>Escape sequence</th>
+
+		      <th>Unicode code point</th>
+
+		    </tr>
+		  </thead>
+		  <tbody>
+
+		    <tr>
+		      <td>'\u' <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a></td>
+		      <td>A Unicode character in the range U+0000 to U+FFFF inclusive
+		      corresponding to the value encoded by the four hexadecimal digits interpreted from most significant to least significant digit.</td>
+		    </tr>
+
+		    
+		    <tr>
+		      <td>'\U' <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a> <a href="#rHEX">hex</a></td>
+
+		      <td>A Unicode character in the range U+0000 to U+10FFFF inclusive
+		      corresponding to the value encoded by the eight hexadecimal digits interpreted from most significant to least significant digit.</td>
+		    </tr>
+
+		  </tbody>
+		</table>
+
+		<p>where <a href="#rHEX">HEX</a> is a hexadecimal character</p>
+		<blockquote>
+		  <p><span style="font-family: monospace; font-size: 85%;"><a id="rHEX">HEX</a> 
+		  ::= [0-9] | [A-F] | [a-f]</span></p>
+
+		</blockquote>
+	      </li>
+
+	      <li>
+		<p>
+		  <em id="string">string escape sequences</em> represent the characters traditionally escaped in string literals:
+		</p>
+
+		<table>
+		  <thead>
+		    <tr>
+		      <th>Escape sequence</th>
+
+		      <th>Unicode code point</th>
+
+		    </tr>
+		  </thead>
+		  <tbody>
+
+		    <tr>
+		      <td>'\t'</td>
+		      <td>U+0009</td>
+		    </tr>
+		    
+		    <tr>
+		      <td>'\b'</td>
+		      <td>U+0008</td>
+		    </tr>
+		    
+		    <tr>
+
+		      <td>'\n'</td>
+		      <td>U+000A</td>
+		    </tr>
+		    
+		    <tr>
+		      <td>'\r'</td>
+		      <td>U+000D</td>
+		    </tr>
+		    
+		    <tr>
+		      <td>'\f'</td>
+		      <td>U+000C</td>
+		    </tr>
+		    
+		    <tr>
+		      <td>'\"'</td>
+		      <td>U+0022</td>
+		    </tr>
+		    
+		    <tr>
+		      <td>'\''</td>
+		      <td>U+0027</td>
+		    </tr>
+		    
+		    <tr>
+		      <td>'\\'</td>
+
+		      <td>U+005C</td>
+		    </tr>
+
+		  </tbody>
+		</table>
+	      </li>
+
+	      <li>
+		<p>
+		  <em id="reserved">reserved character escape sequences</em> consist of a '\' followed by one of <code>~.-!$&amp;'()*+,;=/?#@%_</code> and represent the character to the right of the '\'.
+		</p>
+	      </li>
+
+	    </ul>
+
+	    <table id="term2escape" class="separated">
+		  <caption>Context where each kind of escape sequence can be used</caption>
+	      <thead>
+		<tr>
+		  <th></th>
+		  <th><a href="#numeric">numeric<br/>escapes</a></th>
+		  <th><a href="#string">string<br/>escapes</a></th>
+		  <th><a href="#reserved">reserved character<br/>escapes</a></th>
+		</tr>
+	      </thead>
+	      <tbody>
+		<tr>
+		  <td class="r"><span style="font-weight:bold;">IRI</span>s, used as <a href="#grammar-production-IRIref">RDF terms</a> or as in <a href="#grammar-production-prefixID">@prefix</a> or <a href="#grammar-production-base">@base</a> declarations</td>
+		  <td style="background-color: green; border:1px solid black;">yes</td>
+		  <td>no</td>
+		  <td>no</td>
+		</tr>
+		<tr>
+		  <td class="r"><a href="#grammar-production-PN_LOCAL"><span style="font-weight:bold;">local name</span>s</a></td>
+		  <td>no</td>
+		  <td>no</td>
+		  <td style="background-color: green; border:1px solid black;">yes</td>
+		</tr>
+		<tr>
+		  <td class="r"><span style="font-weight:bold;">String</span>s</td>
+		  <td style="background-color: green; border:1px solid black;">yes</td>
+		  <td style="background-color: green; border:1px solid black;">yes</td>
+		  <td>no</td>
+		</tr>
+	      </tbody>
+	    </table>
+	    <p class="note">%-encoded sequences are in the <a href="#grammar-production-IRIREF">character range for IRIs</a> and are <a href="#grammar-production-PERCENT">explicitly allowed</a> in local names. These appear as a '%' followed by two hex characters and represent that same sequence of three characters. These sequences are <em>not</em> decoded during processing. A term written as <code>&lt;http://a.example/%66oo-bar&gt;</code> in TriG designates the IRI <code>http://a.example/%66oo-bar</code> and not IRI <code>http://a.example/foo-bar</code>. A term written as <code>ex:%66oo-bar</code> with a prefix <code>@prefix ex: &lt;http://a.example/&gt;</code> also designates the IRI <code>http://a.example/%66oo-bar</code>.</p>
+
+          </section>
 			<section id="grammar-ebnf">
 				<h3>Grammar</h3>
-	            <p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0 (Third Edition) [[!EBNF-NOTATION]]. </p>
+            <p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
+            [[!EBNF-NOTATION]]. Production labels consisting of a number and a final 'g' are unique to TriG. All Production labels consisting of only a number reference the production with that number in the Turtle grammar [[Turtle]]. Production labels consisting of a number and a final 's', e.g. [<a href="http://www.w3.org/TR/sparql11-query/#rRDFLiteral"><span class="prodNo">60s</span></a>], reference the production with that number in the <a href="http://www.w3.org/TR/sparql11-query/#sparqlGrammar">SPARQL Query Language for RDF grammar</a> [[RDF-SPARQL-QUERY]].
+            </p>
             	<div data-include="trig-bnf.html">
             </p>
 
 			</section>
 		</section>
-        <section id="sec-mime" class="informative">
-          <h2>Media Type and Content Encoding</h2>
-          
-          <p>The media type of TriG is <code>application/trig</code>.
-          The content encoding of TriG content is always UTF-8. 
-          See <a href="#sec-mediaReg">Internet Media 
-          Type, File Extension and Macintosh File Type</a> for the media type 
-          registration form.
-          </p>
-        </section>
+		<section id="sec-parsing">
+			<h2>Parsing</h2>
+		</section>
 
       <section id="sec-mediaReg" class="appendix">
         <h2>Internet Media Type, File Extension and Macintosh File Type</h2>
@@ -239,9 +440,9 @@
           <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 TriG is &quot;application/trig&quot;.</p>
-        <p>It is recommended that Turtle files have the extension &quot;.trig&quot; (all lowercase) on all platforms.</p>
+        <p>It is recommended that TriG files have the extension &quot;.trig&quot; (all lowercase) on all platforms.</p>
 
-        <p>It is recommended that Turtle files stored on Macintosh HFS file systems be given a file type of &quot;TEXT&quot;.</p>
+        <p>It is recommended that TriG files stored on Macintosh HFS file systems be given a file type of &quot;TEXT&quot;.</p>
         <p>This information that follows has been <a href="http://www.w3.org/mid/20071218114549.GQ8244@w3.org">submitted to the IESG</a> for review, approval, and registration with IANA.</p>
         <dl>
           <dt>Type name:</dt>