FPWD 9 apr
authorGuus Schreiber <guus.schreiber@vu.nl>
Fri, 05 Apr 2013 19:10:44 +0200
changeset 756 73bbc5e83f32
parent 755 45f85650c522
child 757 b154a9ff1d61
FPWD 9 apr
drafts/trig/Overview.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/drafts/trig/Overview.html	Fri Apr 05 19:10:44 2013 +0200
@@ -0,0 +1,1093 @@
+<!DOCTYPE html>
+<html lang="en" dir="ltr" prefix="dcterms: http://purl.org/dc/terms/ bibo: http://purl.org/ontology/bibo/ foaf: http://xmlns.com/foaf/0.1/ xsd: http://www.w3.org/2001/XMLSchema#" typeof="bibo:Document">
+<head>
+	<title>TriG</title>
+	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+	
+  
+  
+  
+	<style>/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+cite .bibref {
+    font-style: normal;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- --- */
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+/* --- TOC --- */
+.toc a, .tof a {
+    text-decoration:    none;
+}
+
+a .secno, a .figno {
+    color:  #000;
+}
+
+ul.tof, ol.tof {
+    list-style: none outside none;
+}
+
+.caption {
+    margin-top: 0.5em;
+    font-style:   italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+</style><style>/* --- EXAMPLES --- */
+div.example-title {
+    min-width: 7.5em;
+    color: #b9ab2d;
+}
+div.example-title span {
+    text-transform: uppercase;   
+}
+aside.example, div.example, div.illegal-example {
+    padding: 0.5em;
+    margin: 1em 0;
+    position: relative;
+    clear: both;
+}
+div.illegal-example { color: red }
+div.illegal-example p { color: black }
+aside.example, div.example {
+    padding: .5em;
+    border-left-width: .5em;
+    border-left-style: solid;
+    border-color: #e0cb52;
+    background: #fcfaee;    
+}
+
+aside.example div.example {
+    border-left-width: .1em;
+    border-color: #999;
+    background: #fff;
+}
+aside.example div.example div.example-title {
+    color: #999;
+}
+</style><style>/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+    padding-right:  1em;
+    min-width: 7.5em;
+    color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #52e052; }
+div.issue-title span, div.note-title span {
+    text-transform: uppercase;
+}
+div.note, div.issue {
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+    padding: .5em;
+    border-left-width: .5em;
+    border-left-style: solid;
+}
+div.issue, div.note {
+    padding: 0.5em;
+    margin: 1em 0;
+    position: relative;
+    clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+    border-color: #e05252;
+    background: #fbe9e9;
+}
+.note {
+    border-color: #52e052;
+    background: #e9fbe9;
+}
+
+
+</style><link href="http://www.w3.org/StyleSheets/TR/W3C-WD" rel="stylesheet"><!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head>
+	<body><div class="head">
+  <p>
+    
+      <a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a>
+    
+  </p>
+  <h1 class="title" id="title">TriG</h1>
+  
+    <h2 id="subtitle"><abbr title="Resource Description Framework">RDF</abbr> Dataset Language</h2>
+  
+  <h2 id="w3c-first-public-working-draft-09-april-2013"><abbr title="World Wide Web Consortium">W3C</abbr> First Public Working Draft 09 April 2013</h2>
+  <dl>
+    
+      <dt>This version:</dt>
+      <dd><a href="http://www.w3.org/TR/2013/WD-trig-20130409/">http://www.w3.org/TR/2013/WD-trig-20130409/</a></dd>
+      <dt>Latest published version:</dt>
+      <dd><a href="http://www.w3.org/TR/trig/">http://www.w3.org/TR/trig/</a></dd>
+    
+    
+      <dt>Latest editor's draft:</dt>
+      <dd><a href="https://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html">https://dvcs.w3.org/hg/rdf/raw-file/default/trig/index.html</a></dd>
+    
+    
+    
+    
+    
+    
+    <dt>Editor:</dt>
+    <dd rel="bibo:editor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Gavin Carothers" href="http://gavin.carothers.name/">Gavin Carothers</a>, <a rel="foaf:workplaceHomepage" href="https://lexmachina.com/">Lex Machina</a></span>
+</dd>
+
+    
+      <dt>Authors:</dt>
+      <dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Chris Bizer" href="http://www.bizer.de">Chris Bizer</a>, <a rel="foaf:workplaceHomepage" href="http://www.fu-berlin.de/">Freie Universität Berlin</a></span>
+</dd>
+<dd rel="dcterms:contributor"><span typeof="foaf:Person"><a rel="foaf:homepage" property="foaf:name" content="Richard Cyganiak" href="http://richard.cyganiak.de">Richard Cyganiak</a>, <a rel="foaf:workplaceHomepage" href="http://www.fu-berlin.de/">Freie Universität Berlin</a></span>
+</dd>
+
+    
+  </dl>
+  
+  
+  
+  
+    
+      <p class="copyright">
+        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 
+        2010-2013
+        
+        <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> 
+        (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
+        <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
+        <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved.
+        <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
+        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
+        <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
+      </p>
+    
+  
+  <hr>
+</div>
+		<section rel="bibo:chapter" resource="#abstract" typeof="bibo:Chapter" datatype="" property="dcterms:abstract" class="introductory" id="abstract"><h2>Abstract</h2>
+			<p>The Resource Description Framework
+			(<abbr title="Resource Description Framework">RDF</abbr>) is a 
+			general-purpose language for representing information in the Web.</p>
+
+			<p>This document defines a textual syntax for <abbr title="Resource Description Framework">RDF</abbr> called TriG
+			that allows an <abbr title="Resource Description Framework">RDF</abbr> dataset to be completely written in a compact and
+			natural text form, with abbreviations for common usage patterns and
+			datatypes. TriG is an extension of the 
+			<a href="http://www.w3.org/TR/turtle">Turtle</a> format.
+			</p>
+		</section><section rel="bibo:chapter" resource="#sotd" typeof="bibo:Chapter" id="sotd" class="introductory"><h2>Status of This Document</h2>
+  
+    
+      
+        <p>
+          <em>This section describes the status of this document at the time of its publication. Other
+          documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
+          of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
+          index</a> at http://www.w3.org/TR/.</em>
+        </p>
+        
+<p>TriG is intended the meet the charter requirement of the 
+<a href="http://www.w3.org/2011/rdf-wg/"><abbr title="Resource Description Framework">RDF</abbr> Working Group</a> to
+define an <abbr title="Resource Description Framework">RDF</abbr> syntax for multiple graphs. TriG is an extension of the 
+<a href="http://www.w3.org/TR/turtle">Turtle</a> syntax for <abbr title="Resource Description Framework">RDF</abbr>. The current document is based on
+the original proposal by Chris Bizer and Richard Cyganiak.</p> 
+                
+        <p>
+          This document was published by the <a href="http://www.w3.org/2011/rdf-wg/"><abbr title="Resource Description Framework">RDF</abbr> Working Group</a> as a First Public Working Draft.
+          
+            This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
+          
+          
+          If you wish to make comments regarding this document, please send them to 
+          <a href="mailto:public-rdf-comments@w3.org">public-rdf-comments@w3.org</a> 
+          (<a href="mailto:public-rdf-comments-request@w3.org?subject=subscribe">subscribe</a>,
+          <a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">archives</a>).
+          
+          
+          
+          
+        All comments are welcome.
+        
+        
+          </p><p>
+            Publication as a First Public Working Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
+            This is a draft document and may be updated, replaced or obsoleted by other documents at 
+            any time. It is inappropriate to cite this document as other than work in progress.
+          </p>
+        
+        
+        <p>
+          
+            This document was produced by a group operating under the 
+            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+          
+          
+          
+            
+              <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/46168/status" rel="disclosure">public list of any patent disclosures</a> 
+            
+            made in connection with the deliverables of the group; that page also includes instructions for 
+            disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
+            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
+            information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
+            6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+          
+          
+        </p>
+        
+      
+    
+  
+</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a class="tocxref" href="#sec-intro"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a class="tocxref" href="#sec-trig-intro"><span class="secno">2. </span>An Introduction to TriG</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#sec-graph-statements"><span class="secno">2.1 </span>Graph Statements</a></li><li class="tocline"><a class="tocxref" href="#other-terms"><span class="secno">2.2 </span>Other Terms</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#terms-blanks-nodes"><span class="secno">2.2.1 </span>Special Considerations for Blank Nodes</a></li></ul></li></ul></li><li class="tocline"><a class="tocxref" href="#conformance"><span class="secno">3. </span>Conformance</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#sec-mime"><span class="secno">3.1 </span>Media Type and Content Encoding</a></li></ul></li><li class="tocline"><a class="tocxref" href="#sec-grammar"><span class="secno">4. </span>TriG Grammar</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#sec-grammar-ws"><span class="secno">4.1 </span>White Space</a></li><li class="tocline"><a class="tocxref" href="#sec-grammar-comments"><span class="secno">4.2 </span>Comments</a></li><li class="tocline"><a class="tocxref" href="#sec-iri-references"><span class="secno">4.3 </span>IRI References</a></li><li class="tocline"><a class="tocxref" href="#sec-escapes"><span class="secno">4.4 </span>Escape Sequences</a></li><li class="tocline"><a class="tocxref" href="#grammar-ebnf"><span class="secno">4.5 </span>Grammar</a></li></ul></li><li class="tocline"><a class="tocxref" href="#sec-parsing"><span class="secno">5. </span>Parsing</a></li><li class="tocline"><a class="tocxref" href="#sec-differences"><span class="secno">A. </span>Differences from previous TriG</a></li><li class="tocline"><a class="tocxref" href="#sec-mediaReg"><span class="secno">B. </span>Internet Media Type, File Extension and Macintosh File Type</a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></section>
+
+	        
+
+		<section rel="bibo:chapter" resource="#sec-intro" typeof="bibo:Chapter" id="sec-intro">
+			<!--OddPage--><h2><span class="secno">1. </span>Introduction</h2>
+			<p>This document defines TriG a concrete syntax for <abbr title="Resource Description Framework">RDF</abbr> as defined in the
+			<a href="../rdf-concepts/index.html"><abbr title="Resource Description Framework">RDF</abbr> Concepts and Abstract Syntax</a> 
+			([<cite><a href="#bib-RDF11-CONCEPTS" class="bibref">RDF11-CONCEPTS</a></cite>]) <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation. TriG is an extension of 
+			<a href="http://www.w3.org/TR/turtle">Turtle</a> ([<cite><a href="#bib-TURTLE-TR" class="bibref">TURTLE-TR</a></cite>]), extended 
+			to support representing a complete <abbr title="Resource Description Framework">RDF</abbr> Dataset.
+		</p></section>
+
+		<section rel="bibo:chapter" resource="#sec-trig-intro" typeof="bibo:Chapter" id="sec-trig-intro" class="informative">
+			<!--OddPage--><h2><span class="secno">2. </span>An Introduction to TriG</h2><p><em>This section is non-normative.</em></p>
+
+			<p>A TriG document allows writing down an <abbr title="Resource Description Framework">RDF</abbr> Dataset in a compact
+			textual form.  It consists of a sequence of directives, graph statements 
+			which contain triple-generating statements and optional blank lines.  
+			Comments may be given after a <code>#</code> that is not part of another 
+			lexical token and continue to the end of the line.</p>
+			<p>
+
+			</p><p>Graph statements are a pair of an IRI and a group of triple statements
+			surrounded by <code>{}</code>. The IRI of the graph statement may be
+			used in another graph statement which implies merging the tripes generated
+			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 <abbr title="Resource Description Framework">RDF</abbr> Dataset.</p>
+			<p>
+			  The construction of an <abbr title="Resource Description Framework">RDF</abbr> Dataset from a TriG document is defined in <a href="#sec-grammar" class="sectionRef">section 4. TriG Grammar</a> and <a href="#sec-parsing" class="sectionRef">section 5. Parsing</a>.
+			</p>
+
+			<section rel="bibo:chapter" resource="#sec-graph-statements" typeof="bibo:Chapter" id="sec-graph-statements">
+				<h3><span class="secno">2.1 </span>Graph Statements</h3><p><em>This section is non-normative.</em></p>
+				
+				<p>A graph statement pairs an IRI with a <abbr title="Resource Description Framework">RDF</abbr> Graph. The triple statements that make up the graph are enclosed in <code>{}</code>.</p>
+
+				<p>In a TriG document a graph IRI <em title="MAY" class="rfc2119">MAY</em> be used to label more then one graph. The IRI of a graph statement may be omitted. In this case the graph is considered the default graph of the <abbr title="Resource Description Framework">RDF</abbr> Dataset.</p>
+
+				<p>A <abbr title="Resource Description Framework">RDF</abbr> Dataset may contain only a single graph.</p>
+				<div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example"><span># This document encodes one graph.
+@prefix ex: &lt;http://www.example.org/vocabulary#&gt; .
+@prefix : &lt;http://www.example.org/exampleDocument#&gt; .
+
+:G1 { :Monica a ex:Person ;
+              ex:name "Monica Murphy" ;      
+              ex:homepage &lt;http://www.monicamurphy.org&gt; ;
+              ex:email &lt;mailto:monica@monicamurphy.org&gt; ;
+              ex:hasSkill ex:Management ,
+                          ex:Programming . } 
+</span></pre></div>
+				<p>A <abbr title="Resource Description Framework">RDF</abbr> Dataset may contain a default graph, and named graphs.</p>
+				<div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example"><span># This document contains a default graph and two named graphs.
+
+@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
+@prefix dc: &lt;http://purl.org/dc/terms/&gt; .
+@prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt; .
+
+# default graph
+    { 
+      &lt;http://example.org/bob&gt; dc:publisher "Bob" . 
+      &lt;http://example.org/alice&gt; dc:publisher "Alice" .
+    }
+
+&lt;http://example.org/bob&gt; 
+    { 
+       _:a foaf:name "Bob" . 
+       _:a foaf:mbox &lt;mailto:bob@oldcorp.example.org&gt; .
+    }
+ 
+&lt;http://example.org/alice&gt;
+    { 
+       _:a foaf:name "Alice" . 
+       _:a foaf:mbox &lt;mailto:alice@work.example.org&gt; .
+    }				</span></pre></div>
+				<div class="issue"><div class="issue-title"><span>Issue 1</span></div><p class="">
+				A providence example
+				</p></div>
+				<div class="issue"><div class="issue-title"><span>Issue 2</span></div><p class="">A verisions example</p></div>
+				<div class="issue"><div class="issue-title"><span>Issue 3</span></div><p class="">A web snapshot example</p></div>
+			</section>
+			<section id="other-terms">
+				<h3><span class="secno">2.2 </span>Other Terms</h3>
+				<p>All other terms and directives come from Turtle.</p>
+				<section rel="bibo:chapter" resource="#terms-blanks-nodes" typeof="bibo:Chapter" id="terms-blanks-nodes">
+					<h4><span class="secno">2.2.1 </span>Special Considerations for Blank Nodes</h4><p><em>This section is non-normative.</em></p>
+					<p>BlankNodes sharing the same label in differently labeled graph statements <em title="MUST" class="rfc2119">MUST</em> be considered to be the same BlankNode.</p>
+				</section>
+			</section>
+		</section>
+        <section rel="bibo:chapter" resource="#conformance" typeof="bibo:Chapter" id="conformance"><!--OddPage--><h2><span class="secno">3. </span>Conformance</h2>
+<p>
+  As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,
+  and notes in this specification are non-normative. Everything else in this specification is
+  normative.
+</p>
+<p>
+  The key words <em title="MUST" class="rfc2119">MUST</em>, <em title="MUST NOT" class="rfc2119">MUST NOT</em>, <em title="REQUIRED" class="rfc2119">REQUIRED</em>, <em title="SHOULD" class="rfc2119">SHOULD</em>, <em title="SHOULD NOT" class="rfc2119">SHOULD NOT</em>, <em title="RECOMMENDED" class="rfc2119">RECOMMENDED</em>, <em title="MAY" class="rfc2119">MAY</em>,
+  and <em title="OPTIONAL" class="rfc2119">OPTIONAL</em> in this specification are to be interpreted as described in [<cite><a href="#bib-RFC2119" class="bibref">RFC2119</a></cite>].
+</p>
+
+        	<p>This specification defines conformance criteria for:</p>
+        			<ul>
+        				<li>TriG documents
+    					</li><li>TriG parsers
+					</li></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 sec-ref">section 4. TriG Grammar</a>, starting with the <a href="#grammar-production-turtleDoc"><code>turtleDoc</code> production</a>. A Turtle document serializes an <abbr title="Resource Description Framework">RDF</abbr> dataset.</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 <abbr title="Resource Description Framework">RDF</abbr> dataset, as defined in <a href="#sec-parsing" class="sectionRef sec-ref">section 5. Parsing</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>          
+
+			<div class="note"><div class="note-title"><span>Note</span></div><p class="">This specification does not define how TriG parsers handle non-conforming input documents.</p></div>
+	        <section rel="bibo:chapter" resource="#sec-mime" typeof="bibo:Chapter" id="sec-mime">
+	          <h3><span class="secno">3.1 </span>Media Type and Content Encoding</h3>
+	          
+	          <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 rel="bibo:chapter" resource="#sec-grammar" typeof="bibo:Chapter" id="sec-grammar">
+			<!--OddPage--><h2><span class="secno">4. </span>TriG Grammar</h2>
+          <p>A TriG document is a
+          Unicode[<cite><a href="#bib-UNICODE" class="bibref">UNICODE</a></cite>]
+          character string encoded in UTF-8.
+          Unicode characters only in the range U+0000 to U+10FFFF inclusive are
+          allowed.
+          </p>
+          <section rel="bibo:chapter" resource="#sec-grammar-ws" typeof="bibo:Chapter" id="sec-grammar-ws">
+            <h3><span class="secno">4.1 </span>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 rel="bibo:chapter" resource="#sec-grammar-comments" typeof="bibo:Chapter" id="sec-grammar-comments">
+            <h3><span class="secno">4.2 </span>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 rel="bibo:chapter" resource="#sec-iri-references" typeof="bibo:Chapter" id="sec-iri-references">
+          	<h3><span class="secno">4.3 </span>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 rel="bibo:chapter" resource="#sec-escapes" typeof="bibo:Chapter" id="sec-escapes">
+            <h3><span class="secno">4.4 </span>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"><abbr title="Resource Description Framework">RDF</abbr> 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>
+	    <div class="note"><div class="note-title"><span>Note</span></div><p class="">%-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></div>
+
+          </section>
+			<section rel="bibo:chapter" resource="#grammar-ebnf" typeof="bibo:Chapter" id="grammar-ebnf">
+				<h3><span class="secno">4.5 </span>Grammar</h3>
+            <p>The <abbr title="Extended Backus–Naur Form">EBNF</abbr> used here is defined in XML 1.0
+            [<cite><a href="#bib-EBNF-NOTATION" class="bibref">EBNF-NOTATION</a></cite>]. 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 [<cite><a href="#bib-TURTLE-TR" class="bibref">TURTLE-TR</a></cite>]. 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 <abbr title="Resource Description Framework">RDF</abbr> grammar</a> [<cite><a href="#bib-RDF-SPARQL-QUERY" class="bibref">RDF-SPARQL-QUERY</a></cite>].
+            </p>
+            	<div><table class="grammar">
+    <tbody class="grammar-productions">
+            <tr id="grammar-production-trigDoc" data-grammar-original="[1g] trigDoc ::= (graph_statement)*" data-grammar-expression="('*', ('id', 'graph_statement'))">
+    <td>[1g]</td>
+    <td><code>trigDoc</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-graph_statement">graph_statement</a><code class="grammar-star">*</code></td>
+</tr>
+            <tr id="grammar-production-graph_statement" data-grammar-original="[2g] graph_statement ::= directive| graph" data-grammar-expression="('|', [('id', 'directive'), ('id', 'graph')])">
+    <td>[2g]</td>
+    <td><code>graph_statement</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-directive">directive</a> <code>| </code> <a href="#grammar-production-graph">graph</a></td>
+</tr>
+            <tr id="grammar-production-graph" data-grammar-original="[3g] graph ::= graphIri? &quot;{&quot; (triples &quot;.&quot;)* &quot;}&quot;" data-grammar-expression="(',', [('?', ('id', 'graphIri')), (&quot;'&quot;, '{'), ('*', (',', [('id', 'triples'), (&quot;'&quot;, '.')])), (&quot;'&quot;, '}')])">
+    <td>[3g]</td>
+    <td><code>graph</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-graphIri">graphIri</a>? '<code class="grammar-literal">{</code>' (<a href="#grammar-production-triples">triples</a> '<code class="grammar-literal">.</code>')<code class="grammar-star">*</code> '<code class="grammar-literal">}</code>'</td>
+</tr>
+            <tr id="grammar-production-graphIri" data-grammar-original="[4g] graphIri ::= iri" data-grammar-expression="('id', 'iri')">
+    <td>[4g]</td>
+    <td><code>graphIri</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-iri">iri</a></td>
+</tr>
+            <tr id="grammar-production-directive" data-grammar-original="[3] directive ::= prefixID| base | sparqlPrefix | sparqlBase" data-grammar-expression="('|', [('id', 'prefixID'), ('id', 'base'), ('id', 'sparqlPrefix'), ('id', 'sparqlBase')])">
+    <td>[3]</td>
+    <td><code>directive</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-prefixID">prefixID</a> <code>| </code> <a href="#grammar-production-base">base</a> <code>| </code> <a href="#grammar-production-sparqlPrefix">sparqlPrefix</a> <code>| </code> <a href="#grammar-production-sparqlBase">sparqlBase</a></td>
+</tr>
+            <tr id="grammar-production-prefixID" data-grammar-original="[4] prefixID ::= '@prefix' PNAME_NS IRIREF &quot;.&quot;" data-grammar-expression="(',', [(&quot;'&quot;, '@prefix'), ('id', 'PNAME_NS'), ('id', 'IRIREF'), (&quot;'&quot;, '.')])">
+    <td>[4]</td>
+    <td><code>prefixID</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">@prefix</code>' <a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-IRIREF">IRIREF</a> '<code class="grammar-literal">.</code>'</td>
+</tr>
+            <tr id="grammar-production-base" data-grammar-original="[5] base ::= '@base' IRIREF &quot;.&quot;" data-grammar-expression="(',', [(&quot;'&quot;, '@base'), ('id', 'IRIREF'), (&quot;'&quot;, '.')])">
+    <td>[5]</td>
+    <td><code>base</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">@base</code>' <a href="#grammar-production-IRIREF">IRIREF</a> '<code class="grammar-literal">.</code>'</td>
+</tr>
+            <tr id="grammar-production-sparqlPrefix" data-grammar-original="[28*] sparqlPrefix ::= [Pp][Rr][Ee][Ff][Ii][Xx] PNAME_NS IRIREF" data-grammar-expression="(',', [('[', 'Pp'), ('[', 'Rr'), ('[', 'Ee'), ('[', 'Ff'), ('[', 'Ii'), ('[', 'Xx'), ('id', 'PNAME_NS'), ('id', 'IRIREF')])">
+    <td>[28*]</td>
+    <td><code>sparqlPrefix</code></td>
+    <td>::=</td>
+    <td>[<code class="grammar-chars">Pp</code>] [<code class="grammar-chars">Rr</code>] [<code class="grammar-chars">Ee</code>] [<code class="grammar-chars">Ff</code>] [<code class="grammar-chars">Ii</code>] [<code class="grammar-chars">Xx</code>] <a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-IRIREF">IRIREF</a></td>
+</tr>
+            <tr id="grammar-production-sparqlBase" data-grammar-original="[29*] sparqlBase ::= [Bb][Aa][Ss][Ee] IRIREF" data-grammar-expression="(',', [('[', 'Bb'), ('[', 'Aa'), ('[', 'Ss'), ('[', 'Ee'), ('id', 'IRIREF')])">
+    <td>[29*]</td>
+    <td><code>sparqlBase</code></td>
+    <td>::=</td>
+    <td>[<code class="grammar-chars">Bb</code>] [<code class="grammar-chars">Aa</code>] [<code class="grammar-chars">Ss</code>] [<code class="grammar-chars">Ee</code>] <a href="#grammar-production-IRIREF">IRIREF</a></td>
+</tr>
+            <tr id="grammar-production-triples" data-grammar-original="[6] triples ::= subject predicateObjectList |blankNodePropertyList predicateObjectList?" data-grammar-expression="('|', [(',', [('id', 'subject'), ('id', 'predicateObjectList')]), (',', [('id', 'blankNodePropertyList'), ('?', ('id', 'predicateObjectList'))])])">
+    <td>[6]</td>
+    <td><code>triples</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-subject">subject</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a> <code>| </code> <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a>?</td>
+</tr>
+            <tr id="grammar-production-predicateObjectList" data-grammar-original="[7] predicateObjectList ::= verb objectList (';' (verb objectList)? )*" data-grammar-expression="(',', [('id', 'verb'), ('id', 'objectList'), ('*', (',', [(&quot;'&quot;, ';'), ('?', (',', [('id', 'verb'), ('id', 'objectList')]))]))])">
+    <td>[7]</td>
+    <td><code>predicateObjectList</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-verb">verb</a> <a href="#grammar-production-objectList">objectList</a> ('<code class="grammar-literal">;</code>' (<a href="#grammar-production-verb">verb</a> <a href="#grammar-production-objectList">objectList</a>)?)<code class="grammar-star">*</code></td>
+</tr>
+            <tr id="grammar-production-objectList" data-grammar-original="[8] objectList ::= object ( &quot;,&quot; object )*" data-grammar-expression="(',', [('id', 'object'), ('*', (',', [(&quot;'&quot;, ','), ('id', 'object')]))])">
+    <td>[8]</td>
+    <td><code>objectList</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-object">object</a> ('<code class="grammar-literal">,</code>' <a href="#grammar-production-object">object</a>)<code class="grammar-star">*</code></td>
+</tr>
+            <tr id="grammar-production-verb" data-grammar-original="[9] verb ::= predicate| &quot;a&quot;" data-grammar-expression="('|', [('id', 'predicate'), (&quot;'&quot;, 'a')])">
+    <td>[9]</td>
+    <td><code>verb</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-predicate">predicate</a> <code>| </code> '<code class="grammar-literal">a</code>'</td>
+</tr>
+            <tr id="grammar-production-subject" data-grammar-original="[10] subject ::= iri| blank" data-grammar-expression="('|', [('id', 'iri'), ('id', 'blank')])">
+    <td>[10]</td>
+    <td><code>subject</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-iri">iri</a> <code>| </code> <a href="#grammar-production-blank">blank</a></td>
+</tr>
+            <tr id="grammar-production-predicate" data-grammar-original="[11] predicate ::= iri" data-grammar-expression="('id', 'iri')">
+    <td>[11]</td>
+    <td><code>predicate</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-iri">iri</a></td>
+</tr>
+            <tr id="grammar-production-object" data-grammar-original="[12] object ::= iri| blank| blankNodePropertyList| literal" data-grammar-expression="('|', [('id', 'iri'), ('id', 'blank'), ('id', 'blankNodePropertyList'), ('id', 'literal')])">
+    <td>[12]</td>
+    <td><code>object</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-iri">iri</a> <code>| </code> <a href="#grammar-production-blank">blank</a> <code>| </code> <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <code>| </code> <a href="#grammar-production-literal">literal</a></td>
+</tr>
+            <tr id="grammar-production-literal" data-grammar-original="[13] literal ::= RDFLiteral| NumericLiteral| BooleanLiteral" data-grammar-expression="('|', [('id', 'RDFLiteral'), ('id', 'NumericLiteral'), ('id', 'BooleanLiteral')])">
+    <td>[13]</td>
+    <td><code>literal</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-RDFLiteral">RDFLiteral</a> <code>| </code> <a href="#grammar-production-NumericLiteral">NumericLiteral</a> <code>| </code> <a href="#grammar-production-BooleanLiteral">BooleanLiteral</a></td>
+</tr>
+            <tr id="grammar-production-blank" data-grammar-original="[14] blank ::= BlankNode| collection" data-grammar-expression="('|', [('id', 'BlankNode'), ('id', 'collection')])">
+    <td>[14]</td>
+    <td><code>blank</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-BlankNode">BlankNode</a> <code>| </code> <a href="#grammar-production-collection">collection</a></td>
+</tr>
+            <tr id="grammar-production-blankNodePropertyList" data-grammar-original="[15] blankNodePropertyList ::= &quot;[&quot; predicateObjectList &quot;]&quot;" data-grammar-expression="(',', [(&quot;'&quot;, '['), ('id', 'predicateObjectList'), (&quot;'&quot;, ']')])">
+    <td>[15]</td>
+    <td><code>blankNodePropertyList</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">[</code>' <a href="#grammar-production-predicateObjectList">predicateObjectList</a> '<code class="grammar-literal">]</code>'</td>
+</tr>
+            <tr id="grammar-production-collection" data-grammar-original="[16] collection ::= &quot;(&quot; object* &quot;)&quot;" data-grammar-expression="(',', [(&quot;'&quot;, '('), ('*', ('id', 'object')), (&quot;'&quot;, ')')])">
+    <td>[16]</td>
+    <td><code>collection</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">(</code>' <a href="#grammar-production-object">object</a><code class="grammar-star">*</code> '<code class="grammar-literal">)</code>'</td>
+</tr>
+            <tr id="grammar-production-NumericLiteral" data-grammar-original="[17] NumericLiteral ::= INTEGER | DECIMAL | DOUBLE" data-grammar-expression="('|', [('id', 'INTEGER'), ('id', 'DECIMAL'), ('id', 'DOUBLE')])">
+    <td>[17]</td>
+    <td><code>NumericLiteral</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-INTEGER">INTEGER</a> <code>| </code> <a href="#grammar-production-DECIMAL">DECIMAL</a> <code>| </code> <a href="#grammar-production-DOUBLE">DOUBLE</a></td>
+</tr>
+            <tr id="grammar-production-RDFLiteral" data-grammar-original="[128s] RDFLiteral ::= String ( LANGTAG | ( &quot;^^&quot; iri ) )?" data-grammar-expression="(',', [('id', 'String'), ('?', ('|', [('id', 'LANGTAG'), (',', [(&quot;'&quot;, '^^'), ('id', 'iri')])]))])">
+    <td>[128s]</td>
+    <td><code>RDFLiteral</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-String">String</a> (<a href="#grammar-production-LANGTAG">LANGTAG</a> <code>| </code> '<code class="grammar-literal">^^</code>' <a href="#grammar-production-iri">iri</a>)?</td>
+</tr>
+            <tr id="grammar-production-BooleanLiteral" data-grammar-original="[133s] BooleanLiteral ::= &quot;true&quot;| &quot;false&quot;" data-grammar-expression="('|', [(&quot;'&quot;, 'true'), (&quot;'&quot;, 'false')])">
+    <td>[133s]</td>
+    <td><code>BooleanLiteral</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">true</code>' <code>| </code> '<code class="grammar-literal">false</code>'</td>
+</tr>
+            <tr id="grammar-production-String" data-grammar-original="[18] String ::= STRING_LITERAL_QUOTE| STRING_LITERAL_SINGLE_QUOTE| STRING_LITERAL_LONG_SINGLE_QUOTE| STRING_LITERAL_LONG_QUOTE" data-grammar-expression="('|', [('id', 'STRING_LITERAL_QUOTE'), ('id', 'STRING_LITERAL_SINGLE_QUOTE'), ('id', 'STRING_LITERAL_LONG_SINGLE_QUOTE'), ('id', 'STRING_LITERAL_LONG_QUOTE')])">
+    <td>[18]</td>
+    <td><code>String</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a> <code>| </code> <a href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE">STRING_LITERAL_SINGLE_QUOTE</a> <code>| </code> <a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">STRING_LITERAL_LONG_SINGLE_QUOTE</a> <code>| </code> <a href="#grammar-production-STRING_LITERAL_LONG_QUOTE">STRING_LITERAL_LONG_QUOTE</a></td>
+</tr>
+            <tr id="grammar-production-iri" data-grammar-original="[135s] iri ::= IRIREF| PrefixedName" data-grammar-expression="('|', [('id', 'IRIREF'), ('id', 'PrefixedName')])">
+    <td>[135s]</td>
+    <td><code>iri</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-IRIREF">IRIREF</a> <code>| </code> <a href="#grammar-production-PrefixedName">PrefixedName</a></td>
+</tr>
+            <tr id="grammar-production-PrefixedName" data-grammar-original="[136s] PrefixedName ::= PNAME_LN| PNAME_NS" data-grammar-expression="('|', [('id', 'PNAME_LN'), ('id', 'PNAME_NS')])">
+    <td>[136s]</td>
+    <td><code>PrefixedName</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-PNAME_LN">PNAME_LN</a> <code>| </code> <a href="#grammar-production-PNAME_NS">PNAME_NS</a></td>
+</tr>
+            <tr id="grammar-production-BlankNode" data-grammar-original="[137s] BlankNode ::= BLANK_NODE_LABEL| ANON" data-grammar-expression="('|', [('id', 'BLANK_NODE_LABEL'), ('id', 'ANON')])">
+    <td>[137s]</td>
+    <td><code>BlankNode</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a> <code>| </code> <a href="#grammar-production-ANON">ANON</a></td>
+</tr>
+<tr><td colspan="5"><h3 id="terminals">Productions for terminals</h3></td></tr>
+            <tr id="grammar-production-IRIREF" data-grammar-original="[19] IRIREF ::=  '<' ([^#x00-#x20<>&quot;{}|^`\] | UCHAR)* '>'" data-grammar-expression="(',', [(&quot;'&quot;, '<'), ('*', ('|', [('[', '^#x00-#x20<>&quot;{}|^`\\'), ('id', 'UCHAR')])), (&quot;'&quot;, '>')])" class="grammar-token">
+    <td>[19]</td>
+    <td><code>IRIREF</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">&lt;</code>' ([<code class="grammar-chars">^#x00-#x20&lt;&gt;"{}|^`\</code>] <code>| </code> <a href="#grammar-production-UCHAR">UCHAR</a>)<code class="grammar-star">*</code> '<code class="grammar-literal">&gt;</code>'</td>
+</tr>
+            <tr id="grammar-production-PNAME_NS" data-grammar-original="[139s] PNAME_NS ::= PN_PREFIX? &quot;:&quot;" data-grammar-expression="(',', [('?', ('id', 'PN_PREFIX')), (&quot;'&quot;, ':')])" class="grammar-token">
+    <td>[139s]</td>
+    <td><code>PNAME_NS</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-PN_PREFIX">PN_PREFIX</a>? '<code class="grammar-literal">:</code>'</td>
+</tr>
+            <tr id="grammar-production-PNAME_LN" data-grammar-original="[140s] PNAME_LN ::= PNAME_NS PN_LOCAL" data-grammar-expression="(',', [('id', 'PNAME_NS'), ('id', 'PN_LOCAL')])" class="grammar-token">
+    <td>[140s]</td>
+    <td><code>PNAME_LN</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-PN_LOCAL">PN_LOCAL</a></td>
+</tr>
+            <tr id="grammar-production-BLANK_NODE_LABEL" data-grammar-original="[141s] BLANK_NODE_LABEL ::= '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?" data-grammar-expression="(',', [(&quot;'&quot;, '_:'), ('|', [('id', 'PN_CHARS_U'), ('[', '0-9')]), ('?', (',', [('*', ('|', [('id', 'PN_CHARS'), (&quot;'&quot;, '.')])), ('id', 'PN_CHARS')]))])" class="grammar-token">
+    <td>[141s]</td>
+    <td><code>BLANK_NODE_LABEL</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">_:</code>' (<a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code>| </code> [<code class="grammar-chars">0-9</code>]) ((<a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>| </code> '<code class="grammar-literal">.</code>')<code class="grammar-star">*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a>)?</td>
+</tr>
+            <tr id="grammar-production-LANGTAG" data-grammar-original="[144s] LANGTAG ::= &quot;@&quot; [a-zA-Z]+ ( &quot;-&quot; [a-zA-Z0-9]+ )*" data-grammar-expression="(',', [(&quot;'&quot;, '@'), ('+', ('[', 'a-zA-Z')), ('*', (',', [(&quot;'&quot;, '-'), ('+', ('[', 'a-zA-Z0-9'))]))])" class="grammar-token">
+    <td>[144s]</td>
+    <td><code>LANGTAG</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">@</code>' [<code class="grammar-chars">a-zA-Z</code>]<code class="grammar-plus">+</code> ('<code class="grammar-literal">-</code>' [<code class="grammar-chars">a-zA-Z0-9</code>]<code class="grammar-plus">+</code>)<code class="grammar-star">*</code></td>
+</tr>
+            <tr id="grammar-production-INTEGER" data-grammar-original="[20] INTEGER ::= [+-]? [0-9]+" data-grammar-expression="(',', [('?', ('[', '+-')), ('+', ('[', '0-9'))])" class="grammar-token">
+    <td>[20]</td>
+    <td><code>INTEGER</code></td>
+    <td>::=</td>
+    <td>[<code class="grammar-chars">+-</code>]? [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code></td>
+</tr>
+            <tr id="grammar-production-DECIMAL" data-grammar-original="[21] DECIMAL ::= [+-]?  ( ([0-9])* '.' ([0-9])+  )" data-grammar-expression="(',', [('?', ('[', '+-')), (',', [('*', ('[', '0-9')), (&quot;'&quot;, '.'), ('+', ('[', '0-9'))])])" class="grammar-token">
+    <td>[21]</td>
+    <td><code>DECIMAL</code></td>
+    <td>::=</td>
+    <td>[<code class="grammar-chars">+-</code>]? ([<code class="grammar-chars">0-9</code>]<code class="grammar-star">*</code> '<code class="grammar-literal">.</code>' [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code>)</td>
+</tr>
+            <tr id="grammar-production-DOUBLE" data-grammar-original="[22] DOUBLE ::= [+-]? ( [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+EXPONENT )" data-grammar-expression="(',', [('?', ('[', '+-')), ('|', [(',', [('+', ('[', '0-9')), (&quot;'&quot;, '.'), ('*', ('[', '0-9')), ('id', 'EXPONENT')]), (',', [(&quot;'&quot;, '.'), ('+', ('[', '0-9')), ('id', 'EXPONENT')]), (',', [('+', ('[', '0-9')), ('id', 'EXPONENT')])])])" class="grammar-token">
+    <td>[22]</td>
+    <td><code>DOUBLE</code></td>
+    <td>::=</td>
+    <td>[<code class="grammar-chars">+-</code>]? ([<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code> '<code class="grammar-literal">.</code>' [<code class="grammar-chars">0-9</code>]<code class="grammar-star">*</code> <a href="#grammar-production-EXPONENT">EXPONENT</a> <code>| </code> '<code class="grammar-literal">.</code>' [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code> <a href="#grammar-production-EXPONENT">EXPONENT</a> <code>| </code> [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code> <a href="#grammar-production-EXPONENT">EXPONENT</a>)</td>
+</tr>
+            <tr id="grammar-production-EXPONENT" data-grammar-original="[154s] EXPONENT ::= [eE] [+-]? [0-9]+" data-grammar-expression="(',', [('[', 'eE'), ('?', ('[', '+-')), ('+', ('[', '0-9'))])" class="grammar-token">
+    <td>[154s]</td>
+    <td><code>EXPONENT</code></td>
+    <td>::=</td>
+    <td>[<code class="grammar-chars">eE</code>] [<code class="grammar-chars">+-</code>]? [<code class="grammar-chars">0-9</code>]<code class="grammar-plus">+</code></td>
+</tr>
+            <tr id="grammar-production-STRING_LITERAL_QUOTE" data-grammar-original="[23] STRING_LITERAL_QUOTE ::= '&quot;' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '&quot;'" data-grammar-expression="(',', [(&quot;'&quot;, '&quot;'), ('*', ('|', [('[', '^#x22#x5C#xA#xD'), ('id', 'ECHAR'), ('id', 'UCHAR')])), (&quot;'&quot;, '&quot;')])" class="grammar-token">
+    <td>[23]</td>
+    <td><code>STRING_LITERAL_QUOTE</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">"</code>' ([<code class="grammar-chars">^#x22#x5C#xA#xD</code>] <code>| </code> <a href="#grammar-production-ECHAR">ECHAR</a> <code>| </code> <a href="#grammar-production-UCHAR">UCHAR</a>)<code class="grammar-star">*</code> '<code class="grammar-literal">"</code>'</td>
+</tr>
+            <tr id="grammar-production-STRING_LITERAL_SINGLE_QUOTE" data-grammar-original="[24] STRING_LITERAL_SINGLE_QUOTE ::= &quot;'&quot; ( [^#x27#x5C#xA#xD] | ECHAR | UCHAR )* &quot;'&quot;" data-grammar-expression="(',', [(&quot;'&quot;, &quot;'&quot;), ('*', ('|', [('[', '^#x27#x5C#xA#xD'), ('id', 'ECHAR'), ('id', 'UCHAR')])), (&quot;'&quot;, &quot;'&quot;)])" class="grammar-token">
+    <td>[24]</td>
+    <td><code>STRING_LITERAL_SINGLE_QUOTE</code></td>
+    <td>::=</td>
+    <td>"<code class="grammar-literal">'</code>" ([<code class="grammar-chars">^#x27#x5C#xA#xD</code>] <code>| </code> <a href="#grammar-production-ECHAR">ECHAR</a> <code>| </code> <a href="#grammar-production-UCHAR">UCHAR</a>)<code class="grammar-star">*</code> "<code class="grammar-literal">'</code>"</td>
+</tr>
+            <tr id="grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE" data-grammar-original="[25] STRING_LITERAL_LONG_SINGLE_QUOTE ::= &quot;'''&quot; ( ( &quot;'&quot; | &quot;''&quot; )? ( [^'\] | ECHAR | UCHAR ) )* &quot;'''&quot;" data-grammar-expression="(',', [(&quot;'&quot;, &quot;'''&quot;), ('*', (',', [('?', ('|', [(&quot;'&quot;, &quot;'&quot;), (&quot;'&quot;, &quot;''&quot;)])), ('|', [('[', &quot;^'\\&quot;), ('id', 'ECHAR'), ('id', 'UCHAR')])])), (&quot;'&quot;, &quot;'''&quot;)])" class="grammar-token">
+    <td>[25]</td>
+    <td><code>STRING_LITERAL_LONG_SINGLE_QUOTE</code></td>
+    <td>::=</td>
+    <td>"<code class="grammar-literal">'''</code>" (("<code class="grammar-literal">'</code>" <code>| </code> "<code class="grammar-literal">''</code>")? [<code class="grammar-chars">^'\</code>] <code>| </code> <a href="#grammar-production-ECHAR">ECHAR</a> <code>| </code> <a href="#grammar-production-UCHAR">UCHAR</a>)<code class="grammar-star">*</code> "<code class="grammar-literal">'''</code>"</td>
+</tr>
+            <tr id="grammar-production-STRING_LITERAL_LONG_QUOTE" data-grammar-original="[26] STRING_LITERAL_LONG_QUOTE ::= '&quot;&quot;&quot;' ( ( '&quot;' | '&quot;&quot;' )? ( [^&quot;\] | ECHAR | UCHAR ) )* '&quot;&quot;&quot;'" data-grammar-expression="(',', [(&quot;'&quot;, '&quot;&quot;&quot;'), ('*', (',', [('?', ('|', [(&quot;'&quot;, '&quot;'), (&quot;'&quot;, '&quot;&quot;')])), ('|', [('[', '^&quot;\\'), ('id', 'ECHAR'), ('id', 'UCHAR')])])), (&quot;'&quot;, '&quot;&quot;&quot;')])" class="grammar-token">
+    <td>[26]</td>
+    <td><code>STRING_LITERAL_LONG_QUOTE</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">"""</code>' (('<code class="grammar-literal">"</code>' <code>| </code> '<code class="grammar-literal">""</code>')? [<code class="grammar-chars">^"\</code>] <code>| </code> <a href="#grammar-production-ECHAR">ECHAR</a> <code>| </code> <a href="#grammar-production-UCHAR">UCHAR</a>)<code class="grammar-star">*</code> '<code class="grammar-literal">"""</code>'</td>
+</tr>
+            <tr id="grammar-production-UCHAR" data-grammar-original="[27] UCHAR ::= ( &quot;\u&quot; HEX HEX HEX HEX )| ( &quot;\U&quot; HEX HEX HEX HEX HEX HEX HEX HEX )" data-grammar-expression="('|', [(',', [(&quot;'&quot;, '\\u'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX')]), (',', [(&quot;'&quot;, '\\U'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX'), ('id', 'HEX')])])" class="grammar-token">
+    <td>[27]</td>
+    <td><code>UCHAR</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">\u</code>' <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <code>| </code> '<code class="grammar-literal">\U</code>' <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a></td>
+</tr>
+            <tr id="grammar-production-ECHAR" data-grammar-original="[159s] ECHAR ::= &quot;\&quot; [tbnrf\&quot;']" data-grammar-expression="(',', [(&quot;'&quot;, '\\'), ('[', 'tbnrf\\&quot;\'')])" class="grammar-token">
+    <td>[159s]</td>
+    <td><code>ECHAR</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">\</code>' [<code class="grammar-chars">tbnrf\"'</code>]</td>
+</tr>
+            <tr id="grammar-production-NIL" data-grammar-original="[160s] NIL ::= &quot;(&quot; WS* &quot;)&quot;" data-grammar-expression="(',', [(&quot;'&quot;, '('), ('*', ('id', 'WS')), (&quot;'&quot;, ')')])" class="grammar-token">
+    <td>[160s]</td>
+    <td><code>NIL</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">(</code>' <a href="#grammar-production-WS">WS</a><code class="grammar-star">*</code> '<code class="grammar-literal">)</code>'</td>
+</tr>
+            <tr id="grammar-production-WS" data-grammar-original="[161s] WS ::= #x20 | #x9 | #xD | #xA" data-grammar-expression="('|', [('#', '#x20'), ('#', '#x9'), ('#', '#xD'), ('#', '#xA')])" class="grammar-token">
+    <td>[161s]</td>
+    <td><code>WS</code></td>
+    <td>::=</td>
+    <td><code class="grammar-char-escape">#x20</code> <code>| </code> <code class="grammar-char-escape">#x9</code> <code>| </code> <code class="grammar-char-escape">#xD</code> <code>| </code> <code class="grammar-char-escape">#xA</code></td>
+</tr>
+            <tr id="grammar-production-ANON" data-grammar-original="[162s] ANON ::= &quot;[&quot; WS* &quot;]&quot;" data-grammar-expression="(',', [(&quot;'&quot;, '['), ('*', ('id', 'WS')), (&quot;'&quot;, ']')])" class="grammar-token">
+    <td>[162s]</td>
+    <td><code>ANON</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">[</code>' <a href="#grammar-production-WS">WS</a><code class="grammar-star">*</code> '<code class="grammar-literal">]</code>'</td>
+</tr>
+            <tr id="grammar-production-PN_CHARS_BASE" data-grammar-original="[163s] PN_CHARS_BASE ::= [A-Z]| [a-z]| [#00C0-#00D6]| [#00D8-#00F6]| [#00F8-#02FF]| [#0370-#037D]| [#037F-#1FFF]| [#200C-#200D]| [#2070-#218F]| [#2C00-#2FEF]| [#3001-#D7FF]| [#F900-#FDCF]| [#FDF0-#FFFD]| [#10000-#EFFFF]" data-grammar-expression="('|', [('[', 'A-Z'), ('[', 'a-z'), ('[', '#00C0-#00D6'), ('[', '#00D8-#00F6'), ('[', '#00F8-#02FF'), ('[', '#0370-#037D'), ('[', '#037F-#1FFF'), ('[', '#200C-#200D'), ('[', '#2070-#218F'), ('[', '#2C00-#2FEF'), ('[', '#3001-#D7FF'), ('[', '#F900-#FDCF'), ('[', '#FDF0-#FFFD'), ('[', '#10000-#EFFFF')])" class="grammar-token">
+    <td>[163s]</td>
+    <td><code>PN_CHARS_BASE</code></td>
+    <td>::=</td>
+    <td>[<code class="grammar-chars">A-Z</code>] <code>| </code> [<code class="grammar-chars">a-z</code>] <code>| </code> [<code class="grammar-chars">#00C0-#00D6</code>] <code>| </code> [<code class="grammar-chars">#00D8-#00F6</code>] <code>| </code> [<code class="grammar-chars">#00F8-#02FF</code>] <code>| </code> [<code class="grammar-chars">#0370-#037D</code>] <code>| </code> [<code class="grammar-chars">#037F-#1FFF</code>] <code>| </code> [<code class="grammar-chars">#200C-#200D</code>] <code>| </code> [<code class="grammar-chars">#2070-#218F</code>] <code>| </code> [<code class="grammar-chars">#2C00-#2FEF</code>] <code>| </code> [<code class="grammar-chars">#3001-#D7FF</code>] <code>| </code> [<code class="grammar-chars">#F900-#FDCF</code>] <code>| </code> [<code class="grammar-chars">#FDF0-#FFFD</code>] <code>| </code> [<code class="grammar-chars">#10000-#EFFFF</code>]</td>
+</tr>
+            <tr id="grammar-production-PN_CHARS_U" data-grammar-original="[164s] PN_CHARS_U  ::=  PN_CHARS_BASE| '_'" data-grammar-expression="('|', [('id', 'PN_CHARS_BASE'), (&quot;'&quot;, '_')])" class="grammar-token">
+    <td>[164s]</td>
+    <td><code>PN_CHARS_U</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> <code>| </code> '<code class="grammar-literal">_</code>'</td>
+</tr>
+            <tr id="grammar-production-PN_CHARS" data-grammar-original="[166s] PN_CHARS ::= PN_CHARS_U| &quot;-&quot;| [0-9]| #00B7| [#0300-#036F]| [#203F-#2040]" data-grammar-expression="('|', [('id', 'PN_CHARS_U'), (&quot;'&quot;, '-'), ('[', '0-9'), ('#', '#00B7'), ('[', '#0300-#036F'), ('[', '#203F-#2040')])" class="grammar-token">
+    <td>[166s]</td>
+    <td><code>PN_CHARS</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code>| </code> '<code class="grammar-literal">-</code>' <code>| </code> [<code class="grammar-chars">0-9</code>] <code>| </code> <code class="grammar-char-escape">#00B7</code> <code>| </code> [<code class="grammar-chars">#0300-#036F</code>] <code>| </code> [<code class="grammar-chars">#203F-#2040</code>]</td>
+</tr>
+            <tr id="grammar-production-PN_PREFIX" data-grammar-original="[167s] PN_PREFIX ::= PN_CHARS_BASE ( ( PN_CHARS | &quot;.&quot; )* PN_CHARS )?" data-grammar-expression="(',', [('id', 'PN_CHARS_BASE'), ('?', (',', [('*', ('|', [('id', 'PN_CHARS'), (&quot;'&quot;, '.')])), ('id', 'PN_CHARS')]))])" class="grammar-token">
+    <td>[167s]</td>
+    <td><code>PN_PREFIX</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> ((<a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>| </code> '<code class="grammar-literal">.</code>')<code class="grammar-star">*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a>)?</td>
+</tr>
+            <tr id="grammar-production-PN_LOCAL" data-grammar-original="[168s] PN_LOCAL ::= ( PN_CHARS_U | ':' | [0-9] | PLX ) ( ( PN_CHARS | '.' | ':' | PLX )*  ( PN_CHARS | ':' | PLX ) ) ?" data-grammar-expression="(',', [('|', [('id', 'PN_CHARS_U'), (&quot;'&quot;, ':'), ('[', '0-9'), ('id', 'PLX')]), ('?', (',', [('*', ('|', [('id', 'PN_CHARS'), (&quot;'&quot;, '.'), (&quot;'&quot;, ':'), ('id', 'PLX')])), ('|', [('id', 'PN_CHARS'), (&quot;'&quot;, ':'), ('id', 'PLX')])]))])" class="grammar-token">
+    <td>[168s]</td>
+    <td><code>PN_LOCAL</code></td>
+    <td>::=</td>
+    <td>(<a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code>| </code> '<code class="grammar-literal">:</code>' <code>| </code> [<code class="grammar-chars">0-9</code>] <code>| </code> <a href="#grammar-production-PLX">PLX</a>) ((<a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>| </code> '<code class="grammar-literal">.</code>' <code>| </code> '<code class="grammar-literal">:</code>' <code>| </code> <a href="#grammar-production-PLX">PLX</a>)<code class="grammar-star">*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>| </code> '<code class="grammar-literal">:</code>' <code>| </code> <a href="#grammar-production-PLX">PLX</a>)?</td>
+</tr>
+            <tr id="grammar-production-PLX" data-grammar-original="[169s] PLX ::= PERCENT | PN_LOCAL_ESC" data-grammar-expression="('|', [('id', 'PERCENT'), ('id', 'PN_LOCAL_ESC')])" class="grammar-token">
+    <td>[169s]</td>
+    <td><code>PLX</code></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-PERCENT">PERCENT</a> <code>| </code> <a href="#grammar-production-PN_LOCAL_ESC">PN_LOCAL_ESC</a></td>
+</tr>
+            <tr id="grammar-production-PERCENT" data-grammar-original="[170s] PERCENT ::= '%' HEX HEX" data-grammar-expression="(',', [(&quot;'&quot;, '%'), ('id', 'HEX'), ('id', 'HEX')])" class="grammar-token">
+    <td>[170s]</td>
+    <td><code>PERCENT</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">%</code>' <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a></td>
+</tr>
+            <tr id="grammar-production-HEX" data-grammar-original="[171s] HEX ::= [0-9] | [A-F] | [a-f]" data-grammar-expression="('|', [('[', '0-9'), ('[', 'A-F'), ('[', 'a-f')])" class="grammar-token">
+    <td>[171s]</td>
+    <td><code>HEX</code></td>
+    <td>::=</td>
+    <td>[<code class="grammar-chars">0-9</code>] <code>| </code> [<code class="grammar-chars">A-F</code>] <code>| </code> [<code class="grammar-chars">a-f</code>]</td>
+</tr>
+            <tr id="grammar-production-PN_LOCAL_ESC" data-grammar-original="[172s] PN_LOCAL_ESC ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&amp;' | &quot;'&quot; | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' )" data-grammar-expression="(',', [(&quot;'&quot;, '\\'), ('|', [(&quot;'&quot;, '_'), (&quot;'&quot;, '~'), (&quot;'&quot;, '.'), (&quot;'&quot;, '-'), (&quot;'&quot;, '!'), (&quot;'&quot;, '$'), (&quot;'&quot;, '&amp;'), (&quot;'&quot;, &quot;'&quot;), (&quot;'&quot;, '('), (&quot;'&quot;, ')'), (&quot;'&quot;, '*'), (&quot;'&quot;, '+'), (&quot;'&quot;, ','), (&quot;'&quot;, ';'), (&quot;'&quot;, '='), (&quot;'&quot;, '/'), (&quot;'&quot;, '?'), (&quot;'&quot;, '#'), (&quot;'&quot;, '@'), (&quot;'&quot;, '%')])])" class="grammar-token">
+    <td>[172s]</td>
+    <td><code>PN_LOCAL_ESC</code></td>
+    <td>::=</td>
+    <td>'<code class="grammar-literal">\</code>' ('<code class="grammar-literal">_</code>' <code>| </code> '<code class="grammar-literal">~</code>' <code>| </code> '<code class="grammar-literal">.</code>' <code>| </code> '<code class="grammar-literal">-</code>' <code>| </code> '<code class="grammar-literal">!</code>' <code>| </code> '<code class="grammar-literal">$</code>' <code>| </code> '<code class="grammar-literal">&amp;</code>' <code>| </code> "<code class="grammar-literal">'</code>" <code>| </code> '<code class="grammar-literal">(</code>' <code>| </code> '<code class="grammar-literal">)</code>' <code>| </code> '<code class="grammar-literal">*</code>' <code>| </code> '<code class="grammar-literal">+</code>' <code>| </code> '<code class="grammar-literal">,</code>' <code>| </code> '<code class="grammar-literal">;</code>' <code>| </code> '<code class="grammar-literal">=</code>' <code>| </code> '<code class="grammar-literal">/</code>' <code>| </code> '<code class="grammar-literal">?</code>' <code>| </code> '<code class="grammar-literal">#</code>' <code>| </code> '<code class="grammar-literal">@</code>' <code>| </code> '<code class="grammar-literal">%</code>')</td>
+</tr>
+</tbody></table>
+</div>
+       
+
+			</section>
+		</section>
+		<section rel="bibo:chapter" resource="#sec-parsing" typeof="bibo:Chapter" id="sec-parsing">
+			<!--OddPage--><h2><span class="secno">5. </span>Parsing</h2>
+			<div class="issue"><div class="issue-title"><span>Issue 4</span></div><p class="">
+				Define a method of parsing that treats each graph statement as a Turtle document. Merge any graph statements that have the same label, or if they don't have a label merge to form the default graph.
+			</p></div>
+		</section>
+      <section rel="bibo:chapter" resource="#sec-differences" typeof="bibo:Chapter" id="sec-differences" class="appendix informative">
+      	<!--OddPage--><h2><span class="secno">A. </span>Differences from previous TriG</h2><p><em>This section is non-normative.</em></p>
+      	<ul>
+      		<li>No support for optional = graph naming operator or optional "." after each graph. N3 compatibility not supported.</li>
+      		<li>Graph labels do not have to be unique within a TriG document. Reused labels are merged.</li>
+      		<li>Multiple unnamed graphs in the same TriG document are merged</li>
+  		</ul>
+      </section>
+      <section rel="bibo:chapter" resource="#sec-mediaReg" typeof="bibo:Chapter" id="sec-mediaReg" class="appendix">
+        <!--OddPage--><h2><span class="secno">B. </span>Internet Media Type, File Extension and Macintosh File Type</h2>
+        <dl>
+          <dt>Contact:</dt>
+          <dd>Eric Prud'hommeaux</dd>
+          <dt>See also:</dt>
+
+          <dd><a href="http://www.w3.org/2002/06/registering-mediatype">How to Register a Media Type for a <abbr title="World Wide Web Consortium">W3C</abbr> Specification</a></dd>
+          <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 "application/trig".</p>
+        <p>It is recommended that TriG files have the extension ".trig" (all lowercase) on all platforms.</p>
+
+        <p>It is recommended that TriG files stored on Macintosh HFS file systems be given a file type of "TEXT".</p>
+        <p>This information that follows has been <a href="http://lists.w3.org/Archives/Public/www-archive/2007Dec/0065.html">submitted to the IESG</a> for review, approval, and registration with IANA.</p>
+        <dl>
+          <dt>Type name:</dt>
+          <dd>application</dd>
+
+          <dt>Subtype name:</dt>
+          <dd>trig</dd>
+          <dt>Required parameters:</dt>
+          <dd>None</dd>
+          <dt>Optional parameters:</dt>
+          <dd>None</dd>
+
+          <dt>Encoding considerations:</dt>
+          <dd>The syntax of TriG is expressed over code points in Unicode [<cite><a href="#bib-UNICODE" class="bibref">UNICODE</a></cite>]. The encoding is always UTF-8 [<cite><a href="#bib-UTF-8" class="bibref">UTF-8</a></cite>].</dd>
+          <dd>Unicode code points may also be expressed using an \uXXXX (U+0000 to U+FFFF) or \UXXXXXXXX syntax (for U+10000 onwards) where X is a hexadecimal digit [0-9A-Fa-f]</dd>
+          <dt>Security considerations:</dt>
+          <dd>TriG is a general-purpose assertion language; applications may evaluate given data to infer more assertions or to dereference IRIs, invoking the security considerations of the scheme for that IRI. Note in particular, the privacy issues in [<cite><a href="#bib-RFC3023" class="bibref">RFC3023</a></cite>] section 10 for HTTP IRIs. Data obtained from an inaccurate or malicious data source may lead to inaccurate or misleading conclusions, as well as the dereferencing of unintended IRIs. Care must be taken to align the trust in consulted resources with the sensitivity of the intended use of the data; inferences of potential medical treatments would likely require different trust than inferences for trip planning.</dd>
+
+          <dd>TriG is used to express arbitrary application data; security considerations will vary by domain of use. Security tools and protocols applicable to text (e.g. PGP encryption, MD5 sum validation, password-protected compression) may also be used on Turtle documents. Security/privacy protocols must be imposed which reflect the sensitivity of the embedded information.</dd>
+          <dd>TriG can express data which is presented to the user, for example, <abbr title="Resource Description Framework">RDF</abbr> Schema labels. Application rendering strings retrieved from untrusted Turtle documents must ensure that malignant strings may not be used to mislead the reader. The security considerations in the media type registration for XML ([<cite><a href="#bib-RFC3023" class="bibref">RFC3023</a></cite>] section 10) provide additional guidance around the expression of arbitrary data and markup.</dd>
+          <dd>TriG uses IRIs as term identifiers. Applications interpreting data expressed in TriG should address the security issues of
+      <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource Identifiers (IRIs)</a> [<cite><a href="#bib-RFC3987" class="bibref">RFC3987</a></cite>] Section 8, as well as
+      <a class="norm" href="http://www.ietf.org/rfc/rfc3986.txt">Uniform Resource Identifier (URI): Generic Syntax</a> [<cite><a href="#bib-RFC3986" class="bibref">RFC3986</a></cite>] Section 7.</dd>
+
+          <dd>Multiple IRIs may have the same appearance. Characters in different scripts may 
+    look similar (a Cyrillic "о" may appear similar to a Latin "o"). A character followed 
+    by combining characters may have the same visual representation as another character 
+    (LATIN SMALL LETTER E followed by COMBINING ACUTE ACCENT has the same visual representation 
+    as LATIN SMALL LETTER E WITH ACUTE).
+    <!-- (<code>foo:resum&#40751;code> and <code>f&#1086;&#1086;:resume&#769;</code>)-->
+    Any person or application that is writing or interpreting data in TriG must take care to use the IRI that matches the intended semantics, and avoid IRIs that make look similar.
+    Further information about matching of similar characters can be found 
+    in <a class="inform" href="http://www.unicode.org/reports/tr36/">Unicode Security 
+    Considerations</a> [<cite><a href="#bib-UNISEC" class="bibref">UNISEC</a></cite>] and
+    <a class="norm" href="http://www.ietf.org/rfc/rfc3987.txt">Internationalized Resource 
+    Identifiers (IRIs)</a> [<cite><a href="#bib-RFC3987" class="bibref">RFC3987</a></cite>] Section 8.</dd>
+
+          <dt>Interoperability considerations:</dt>
+          <dd>There are no known interoperability issues.</dd>
+          <dt>Published specification:</dt>
+          <dd>This specification.</dd>
+          <dt>Applications which use this media type:</dt>
+
+          <dd>No widely deployed applications are known to use this media type. It may be used by some web services and clients consuming their data.</dd>
+          <dt>Additional information:</dt>
+          <dt>Magic number(s):</dt>
+          <dd>TriG documents may have the strings '@prefix' or '@base' (case dependent) near the beginning of the document.</dd>
+          <dt>File extension(s):</dt>
+          <dd>".trig"</dd>
+
+          <dt>Base URI:</dt>
+          <dd>The TriG '@base &lt;IRIref&gt;' term can change the current base URI for relative IRIrefs in the query language that are used sequentially later in the document.</dd>
+          <dt>Macintosh file type code(s):</dt>
+          <dd>"TEXT"</dd>
+          <dt>Person &amp; email address to contact for further information:</dt>
+
+          <dd>Eric Prud'hommeaux &lt;eric@w3.org&gt;</dd>
+          <dt>Intended usage:</dt>
+          <dd>COMMON</dd>
+          <dt>Restrictions on usage:</dt>
+          <dd>None</dd>
+          <dt>Author/Change controller:</dt>
+
+          <dd>The TriG specification is the product of the <abbr title="Resource Description Framework">RDF</abbr> WG. The <abbr title="World Wide Web Consortium">W3C</abbr> reserves change control over this specifications.</dd>
+        </dl>
+      </section>
+	
+<section rel="bibo:chapter" resource="#references" typeof="bibo:Chapter" class="appendix" id="references"><!--OddPage--><h2><span class="secno">C. </span>References</h2><section rel="bibo:chapter" resource="#normative-references" typeof="bibo:Chapter" id="normative-references"><h3><span class="secno">C.1 </span>Normative references</h3><dl about="" class="bibliography"><dt id="bib-EBNF-NOTATION">[EBNF-NOTATION]</dt><dd rel="dcterms:requires">Tim Bray; Jean Paoli; C. M. Sperberg-McQueen; Eve Maler; François Yergeau. <a href="http://www.w3.org/TR/REC-xml/#sec-notation"><cite>EBNF Notation</cite></a> 26 November 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/REC-xml/#sec-notation">http://www.w3.org/TR/REC-xml/#sec-notation</a> 
+</dd><dt id="bib-RDF11-CONCEPTS">[RDF11-CONCEPTS]</dt><dd rel="dcterms:requires">Richard Cyganiak; David Wood. <a href="http://www.w3.org/TR/2012/WD-rdf11-concepts-20120605/"><cite>RDF 1.1 Concepts and Abstract Syntax</cite></a> 05 June 2012. W3C Working Draft (work in progress). URL: <a href="http://www.w3.org/TR/2012/WD-rdf11-concepts-20120605/">http://www.w3.org/TR/2012/WD-rdf11-concepts-20120605/</a>
+</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd rel="dcterms:requires">S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119.  URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a> 
+</dd><dt id="bib-RFC3023">[RFC3023]</dt><dd rel="dcterms:requires">M. Murata; S. St.Laurent; D. Kohn. <a href="http://www.ietf.org/rfc/rfc3023.txt"><cite>XML Media Types</cite></a> January 2001. Internet RFC 3023. URL: <a href="http://www.ietf.org/rfc/rfc3023.txt">http://www.ietf.org/rfc/rfc3023.txt</a> 
+</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd rel="dcterms:requires">T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd rel="dcterms:requires">M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
+</dd><dt id="bib-TURTLE-TR">[TURTLE-TR]</dt><dd rel="dcterms:requires">Eric Prud'hommeaux; Gavin Carothers. <a href="http://www.w3.org/TR/2013/CR-turtle-20130219/"><cite>Turtle: Terse Triple Language</cite></a> 19 February 2013. W3C Candidate Recommendation. URL: <a href="http://www.w3.org/TR/2013/CR-turtle-20130219/">http://www.w3.org/TR/2013/CR-turtle-20130219/</a>
+</dd><dt id="bib-UNICODE">[UNICODE]</dt><dd rel="dcterms:requires">The Unicode Consortium. <a href="http://www.unicode.org/unicode/standard/versions/enumeratedversions.html"><cite>The Unicode Standard.</cite></a>. Defined by: The Unicode Standard, Version 6.2.0, (Mountain View, CA: The Unicode Consortium, 2012. ISBN 978-1-936213-07-8) , as updated from time to time by the publication of new versions URL: <a href="http://www.unicode.org/unicode/standard/versions/enumeratedversions.html">http://www.unicode.org/unicode/standard/versions/enumeratedversions.html</a> 
+</dd><dt id="bib-UTF-8">[UTF-8]</dt><dd rel="dcterms:requires">F. Yergeau. <a href="http://www.ietf.org/rfc/rfc3629.txt"><cite>UTF-8, a transformation format of ISO 10646</cite></a>. IETF RFC 3629. November 2003. URL: <a href="http://www.ietf.org/rfc/rfc3629.txt">http://www.ietf.org/rfc/rfc3629.txt</a>
+</dd></dl></section><section rel="bibo:chapter" resource="#informative-references" typeof="bibo:Chapter" id="informative-references"><h3><span class="secno">C.2 </span>Informative references</h3><dl about="" class="bibliography"><dt id="bib-RDF-SPARQL-QUERY">[RDF-SPARQL-QUERY]</dt><dd rel="dcterms:references">Andy Seaborne; Eric Prud'hommeaux. <a href="http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115"><cite>SPARQL Query Language for RDF.</cite></a> 15 January 2008. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115">http://www.w3.org/TR/2008/REC-rdf-sparql-query-20080115</a> 
+</dd><dt id="bib-UNISEC">[UNISEC]</dt><dd rel="dcterms:references">Mark Davis; Michel Suignard. <a href="http://www.unicode.org/reports/tr36/"><cite>Unicode Security Considerations</cite></a> 4 August 2010. URL: <a href="http://www.unicode.org/reports/tr36/">http://www.unicode.org/reports/tr36/</a>
+</dd></dl></section></section></body></html>
\ No newline at end of file