* added graph rule ldpatch
authorAlexandre Bertails <bertails@gmail.com>
Tue, 18 Nov 2014 23:57:10 -0500
branchldpatch
changeset 884 7a8d123386ee
parent 883 465e21e46365
child 885 91b421e26b16
* added graph rule
* error handling section
* updated example with Cut
ldpatch.html
--- a/ldpatch.html	Tue Nov 18 14:10:29 2014 -0500
+++ b/ldpatch.html	Tue Nov 18 23:57:10 2014 -0500
@@ -236,7 +236,7 @@
       </p>
 
       <p id="relation-sparql-update">
-        The LD Patch format described in this document should be seen as an "assembly language" for updating <a href="http://www.w3.org/TR/rdf11-concepts/#section-rdf-graph">RDF Graphs</a> in a resource-centric fashion. It is the intention to confine its expressive power to an RDF diff with <a href="#pathological-graph">partial support for blank nodes</a> and <code>rdf:List</code> manipulations. For more powerful operations on RDF Graphs and Quad Stores, the LDP WG recommends the reader to consider <a href="http://www.w3.org/TR/sparql11-update/">SPARQL Update</a> [[sparql11-update]].
+        The LD Patch format described in this document should be seen as an "assembly language" for updating <a href="http://www.w3.org/TR/rdf11-concepts/#section-rdf-graph">RDF Graphs</a> in a resource-centric fashion. It is the intention to confine its expressive power to an RDF diff with <a class="internalDFN" href="#pathological-graph">partial support for blank nodes</a> and <code>rdf:List</code> manipulations. For more powerful operations on RDF Graphs and Quad Stores, the LDP WG recommends the reader to consider <a href="http://www.w3.org/TR/sparql11-update/">SPARQL Update</a> [[sparql11-update]].
       </p>
 
     </section>
@@ -244,61 +244,49 @@
     <section class='normative' id='language-features'>
       <h1>LD Patch Semantics</h1>
       <p>
-An LD Patch document is made of a prologue and a list of statements, where the order is relevant. The prologue declares a number of <tref>prefixes</tref> used to abbreviate URIs. Then each statement either binds a variable to a matching node, or defines a modification on the graph.
+An LD Patch document is made of a prologue and a list of statements, where the order is relevant. The prologue declares a number of <a>prefixes</a> used to abbreviate URIs. Then each statement either binds a variable to a matching node, or defines a modification on the graph.
       </p>
 
-      <section id="operational-semantics">
-        <h2><tdef>HTTP Semantics</tdef></h2>
-
-        <p>
-LD Patch abides to the semantics of the <a href="http://tools.ietf.org/html/rfc5789" target="_blank">HTTP PATCH method</a>, in that the server "MUST apply the entire set of changes atomically and never provide (e.g., in response to a GET during this operation) a partially modified representation. If the entire patch document cannot be successfully applied (e.g., one of the instructions has failed), then the server MUST NOT apply any of the changes".
-
-@@TODO: describe from an HTTP perspective what happens when a patch operation fails.
-        </p>
-      </section>
-
-      <p>
-      </p>
 
       <section id="prefixes">
-        <h2><tdef>Prefixes</tdef></h2>
+        <h2><dfn>Prefixes</dfn></h2>
         <p>
-LD Patch offers the possibility to abbreviate URIs by using <a href="http://www.w3.org/TR/turtle/">Turtle</a>'s <i>@prefix</i> directive that allows declaring a short prefix name for a long prefix of repeated URIs. This is useful for many RDF vocabularies that are all defined in nearby namespace URIs [[!rdf11-concepts]], possibly using XML's namespace mechanism [[!xml-names11]] that works in a similar fashion.
+LD Patch offers the possibility to abbreviate URIs by using <a href="http://www.w3.org/TR/turtle/">Turtle</a>'s <code>@prefix</code> directive that allows declaring a short prefix name for a long prefix of repeated URIs. This is useful for many RDF vocabularies that are all defined in nearby namespace URIs [[!rdf11-concepts]], possibly using XML's namespace mechanism [[!xml-names11]] that works in a similar fashion.
         </p>
         <p>
-Once a prefix such as <code>@prefix foo: &lt;http://example.org/ns#&gt;</code> is defined, any mention of a URI later in the document may use a <tref>PrefixedName</tref> that starts with <code>foo:</code> to stand for the longer URI. So for example, the <tref>PrefixedName</tref> <code>foo:bar</code> is a shorthand for the URI <code>&lt;http://example.org/ns#bar&gt;</code>.
+Once a prefix such as <code>@prefix foo: &lt;http://example.org/ns#&gt;</code> is defined, any mention of a URI later in the document may use a <a class="internalDFN" href="#grammar-production-PrefixedName">PrefixedName</a> that starts with <code>foo:</code> to stand for the longer URI. So for example, the <a class="internalDFN" href="#grammar-production-PrefixedName">PrefixedName</a> <code>foo:bar</code> is a shorthand for the URI <code>&lt;http://example.org/ns#bar&gt;</code>.
         </p>
       </section>
 
       <section id="node-matching-semantics">
-        <h2><tdef>Node Matching Semantics</tdef></h2>
+        <h2><dfn>Node Matching Semantics</dfn></h2>
         <p>
-LD Patch borrows much of its syntax and semantics from <a href="http://www.w3.org/TR/turtle/">Turtle</a> [[turtle]] and <a href="http://www.w3.org/TR/sparql11-query/">SPARQL</a> [[sparql11-query]] for describing nodes. IRIs (either abbreviated or not) and literals represent the corresponding node in the graph being patched. Blank nodes, on the other hand, pose a problem, as they have no global identifier. Indeed, blank node identifiers have their scope limited to the document in which they appear. As a consequence, whenever blank node identifiers appears in an LD Patch document, it is understood to denote a <em>fresh</em> blank node, that needs to be created in the patched RDF graph. They cannot interfere with existing blank nodes in the graph.
+            LD Patch borrows much of its syntax and semantics from <a href="http://www.w3.org/TR/turtle/">Turtle</a> [[turtle]] and <a href="http://www.w3.org/TR/sparql11-query/">SPARQL</a> [[sparql11-query]] for describing nodes. <a class="internalDFN" href="#grammar-production-iri">IRI</a>s (either abbreviated or not) and <a class="internalDFN" href="#grammar-production-literal">literals</a> represent the corresponding node in the graph being patched. <a class="internalDFN" href="#grammar-production-BlankNode">Blank nodes</a>, on the other hand, pose a problem, as they have no global identifier. Indeed, blank node identifiers have their scope limited to the document in which they appear. As a consequence, <dfn id="blank-node-scoping">whenever blank node identifiers appears in an LD Patch document, it is understood to denote a <em>fresh</em> blank node</dfn>, that needs to be created in the patched RDF graph. They cannot interfere with existing blank nodes in the graph.
         </p>
         <p>
-In order to be able to address blank nodes already present in the graph, LD Patch has two mechanisms: <tref>Bind</tref>ing a variable to a blank node reachable with a <tref>path expression</tref>, and <tref>UpdateList</tref> to deal with those blank nodes that constitute RDF collections. There are cases where those mechanisms will not be able to unambiuously address a given blank node, but those cases are deemed <a href="#pathological-graph">pathological</a>, and out of the scope of this specification.
+In order to be able to address blank nodes already present in the graph, LD Patch has two mechanisms: <a>Bind</a>ing a variable to a blank node reachable with a <a>path expression</a>, and <a>UpdateList</a> to deal with those blank nodes that constitute RDF collections. There are cases where those mechanisms will not be able to unambiuously address a given blank node, but those cases are deemed <a href="#pathological-graph">pathological</a>, and are out of the scope of this specification.
         </p>
       </section>
 
       <section id="path-expression">
-        <h2><tdef>Path Expression</tdef></h2>
+        <h2><dfn>Path Expression</dfn></h2>
         <p>
-LD Patch uses path expressions to describe possible routes through a graph between two graph nodes. The main goal is to allow addressing a blank node by “walking” the arcs of the graph from an already identified node. A path is composed by a number of steps, which can be of three kinds:
+            LD Patch uses path expressions to describe possible routes through a graph between two graph nodes. The main goal is to allow addressing a blank node by “walking” the arcs of the graph from an already identified node. A path is composed by a number of <dfn>Step</dfn>s, which can be of three kinds:
         </p>
         <ul>
-          <li>A <tref>StepForward</tref> is defined by a URI, and consists in following outgoing arcs having that URI as their predicate.</li>
-          <li>A <tref>StepBackward</tref> is defined by a URI preceded with the caret ("<code>^</code>") sign, and consists in following incoming arcs having that URI as their predicate.</li>
-          <li>A <tref>StepAt</tref> is defined by an integer <i>n</i>, and consists in following <i>n</i> <code>rdf:rest</code> arcs and one <code>rdf:first</code> arc in order to reach the corresponding member of an RDF collection.</li>
+          <li>A <dfn>StepForward</dfn> is defined by a URI, and consists in following outgoing arcs having that URI as their predicate.</li>
+          <li>A <dfn>StepBackward</dfn> is defined by a URI preceded with the caret ("<code>^</code>") sign, and consists in following incoming arcs having that URI as their predicate.</li>
+          <li>A <dfn>StepAt</dfn> is defined by an integer <i>n</i>, and consists in following <i>n</i> <code>rdf:rest</code> arcs and one <code>rdf:first</code> arc in order to reach the corresponding member of an RDF collection.</li>
         </ul>
         <p>
 Note that each step can, in general, result in <em>several</em> matching nodes, as a given node can have several (incoming or outgoing) arcs with the same predicate.
         </p>
         <p>
-A Path may also contains <tref>Constraint</tref>s, which are of two kinds:
+            A <a>Path Expression</a> may also contains <dfn>constraint</dfn>s, which are of two kinds:
         </p>
         <ul>
-          <li>A unicity constraint, described by the <em>bang</em> ("<code>!</code>") character, ensures that the result of the path so far contains exactly one node. In case a <code>!</code> contraint is not successfully met, the whole request MUST fail.</li>
-          <li>A <tref>filter</tref>, consisting of a path in square brackets ("<code>[</code>", "<code>]</code>"), keeps only from the matching nodes so far those that “satisfy” the enclosed path, i.e. those from which the enclosed path reaches at least one node.</li>
+          <li>A <dfn>unicity constraint</dfn>, described by the <em>bang</em> ("<code>!</code>") character, ensures that the result of the path so far contains exactly one node. In case a <code>!</code> contraint is not successfully met, the whole request MUST fail.</li>
+          <li>A <dfn>filter</dfn>, consisting of a path in square brackets ("<code>[</code>", "<code>]</code>"), keeps only from the matching nodes so far those that “satisfy” the enclosed path, i.e. those from which the enclosed path reaches at least one node.</li>
           <li>Additionally, the path in a <tref>filter</tref> can be followed by the equal ("<code>=</code>") sign and a <tref>Value</tref>. In that case, only the node for which that particular value is reached through the enclosed path are kept.</li>
         </ul>
         <p>
@@ -319,58 +307,59 @@
         <h2>Patch Operations</h2>
 
         <section id="bind-statement">
-          <h2><tdef>Bind</tdef></h2>
+          <h2><dfn>Bind</dfn></h2>
           <p>
-  The Bind operation is used to create a new variable by binding or assigning an RDF Term to the variable. The process results in a variable being bound to exactly one node. The bound variable has a global scope. Use of a given variable name anywhere in an LD Patch document identifies the same variable, although variables can be overriden in subsequent Bind statements. Following the example above, the Bind operation creates a new variable called <code>event</code>, starting from the RDF Term <code>&lt;#&gt;</code> and following the path expression <code>/schema:performerIn[/schema:url = &lt;https://www.w3.org/2012/ldp/wiki/F2F5&gt;]</code> in order to identify the RDF Term to which this variable will be bound to -- i.e. <code>_:b2</code>.
+              The <a>Bind</a> operation is used to create a new variable by binding or assigning an RDF Term to the variable. The process results in a variable being bound to exactly one node. The bound variable has a global scope. Use of a given variable name anywhere in an LD Patch document identifies the same variable, although variables can be overriden in subsequent <a>Bind</a> statements. Following the example above, the <a>Bind</a> operation creates a new variable called <code>event</code>, starting from the RDF Term <code>&lt;#&gt;</code> and following the path expression <code>/schema:performerIn[/schema:url = &lt;https://www.w3.org/2012/ldp/wiki/F2F5&gt;]</code> in order to identify the RDF Term to which this variable will be bound to – i.e. <code>_:b2</code>.
           <pre class='example'>
-  Bind ?event &lt;#&gt; /schema:performerIn[/schema:url = &lt;https://www.w3.org/2012/ldp/wiki/F2F5&gt;] .
+Bind ?event &lt;#&gt; /schema:performerIn[/schema:url = &lt;https://www.w3.org/2012/ldp/wiki/F2F5&gt;] .
           </pre>
           </p>
           <p>
-  The Bind operation is defined by three components: <tref>Var</tref>, <tref>Value</tref> and <tref>Path</tref>, the last component being optional.
+              The <a>Bind</a> operation is defined by three components: <a>Var</a>, <a>Value</a> and <a">Path</a>, the last component being optional.
           </p>
           <p>
-  <tref>Var</tref> contains a unique name for the new variable. Variables are prefixed by "<code>?</code>"; the "<code>?</code>" character is not part of the variable name.
+              <dfn>Var</dfn> contains a unique name for the new variable. Variables are prefixed by the "<code>?</code>" character, which is not part of the variable name.
           </p>
           <p>
-  <tref>Value</tref> is the RDF Term that will be used as starting point when following the path expression.
+              <dfn>Value</dfn> is the RDF Term that will be used as starting point when following the path expression.
           </p>
           <p>
-  <tref>Path</tref> is the expression that is used to identify the RDF Term to which the Variable will be bound. It is comprised of <tref>Step</tref>(s) and/or <tref>Constraint</tref>(s).
+              <dfn>Path</dfn> is the expression that is used to identify the RDF Term to which the Variable will be bound. It is comprised of <a>Step</a>(s) and/or <a>Constraint</a>(s).
           </p>
         </section>
 
         <section id="add-statement">
-          <h2><tdef>Add</tdef></h2>
+          <h2><dfn>Add</dfn></h2>
           <p>
-  The Add operation is used to add or append new RDF triples to the existing graph. To add new RDF triples, the operation requires valid <a href="http://www.w3.org/TR/turtle/#sec-grammar-grammar">Turtle syntax</a> between curly braces -- i.e. <code>{</code> and <code>}</code>. Variables can also be used, provided they have been previously defined.
+              The <a>Add</a> operation is used to add or append new RDF triples to the existing graph. To add new RDF triples, the operation requires valid <a href="http://www.w3.org/TR/turtle/#sec-grammar-grammar">Turtle syntax</a> between curly braces – i.e. <code>{</code> and <code>}</code>. <a>Var</a>iables can also be used, provided they have been previously defined.
           <pre class='example'>
-  Add { 
-      &lt;#&gt; profile:first_name "Timothy" ;
-          profile:image &lt;https://example.org/timbl.jpg&gt; .
-  } .
+Add { 
+    &lt;#&gt; profile:first_name "Timothy" ;
+        profile:image &lt;https://example.org/timbl.jpg&gt; .
+} .
 
-  Add { ?event rdf:type schema:Event } .
+Add { ?event rdf:type schema:Event } .
           </pre>
           </p>
         </section>
 
         <section id="delete-statement">
-          <h2><tdef>Delete</tdef></h2>
+          <h2><dfn>Delete</dfn></h2>
           <p>
-  The Delete operation is used to remove one or more RDF triples from the existing graph. The syntax for the Delete operation requires valid <a href="http://www.w3.org/TR/turtle/#sec-grammar-grammar">Turtle syntax</a> between curly braces -- i.e. <code>{</code> and <code>}</code>. Similar to the Add operation, variables can also be used within the Delete operation.
+              The <a>Delete</a> operation is used to remove one or more RDF triples from the existing graph. The syntax for the <a>Delete</a> operation requires valid <a href="http://www.w3.org/TR/turtle/#sec-grammar-grammar">Turtle syntax</a> between curly braces – i.e. <code>{</code> and <code>}</code>. Similar to the <a>Add</a> operation, variables can also be used within the <a>Delete</a> operation. Blank nodes are allowed in <a>Delete</a> statements but <a href="#blank-node-scoping">they remain scoped to the LD Patch document</a>, not the graph being patched.
+
           <pre class='example'>
-  Delete { &lt;#&gt; profile:first_name "Tim" } .
+Delete { &lt;#&gt; profile:first_name "Tim" } .
 
-  Delete { ?ted schema:startDate "2009-02-04" } .
+Delete { ?ted schema:startDate "2009-02-04" } .
           </pre>
           </p>
         </section>
 
         <section id="cut-statement">
-          <h2><tdef>Cut</tdef></h2>
+          <h2><dfn>Cut</dfn></h2>
           <p>
-  The Cut operation is used to remove one or more triples from the existing graph, having a matching <tref>Subject</tref> that corresponds to either an IRI or a previously bound varible.
+              The <a>Cut</a> operation is used to remove one or more triples from the existing graph, having a matching <a class="internalDFN" href="#grammar-production-subject">subject</a> that corresponds to either an IRI or a previously bound varible.
           <pre class='example'>
   @@TODO use UpdateList example .
           </pre>
@@ -378,15 +367,15 @@
         </section>
 
         <section id="update-list-statement">
-          <h2><tdef>UpdateList</tdef></h2>
+          <h2><dfn>UpdateList</dfn></h2>
           <p>
-  The UpdateList operation is used to update the members of an <a href="http://www.w3.org/TR/rdf-schema/#ch_collectionvocab">RDF collection</a>. That collection is supposed to be the object of a triple, specified by its <tref>Subject</tref> and <tref>Predicate</tref>. A <tref>Slice</tref> specification then describes which members (if any) of the collections are affected by the operation, and then a <tref>List</tref> of new members is provided. In the example below, UpdateList is used to replace the second member of a collection by the literal "fr-CH".
+  The UpdateList operation is used to update the members of an <a href="http://www.w3.org/TR/rdf-schema/#ch_collectionvocab">RDF collection</a>. That collection is supposed to be the object of a triple, specified by its <a class="internalDFN" href="#grammar-production-subject">subject</a> and <a class="internalDFN" href="#grammar-production-predicate">predicate</a>. A <tref>Slice</tref> specification then describes which members (if any) of the collections are affected by the operation, and then a <a class="internalDFN" href="#grammar-production-collection">collection</a> of new members is provided. In the example below, UpdateList is used to replace the second member of a collection by the literal "fr-CH".
           <pre class='example'>
-  UpdateList &lt;#&gt; ex:preferredLanguages 1..2 ( "fr-CH" ) .
+UpdateList &lt;#&gt; ex:preferredLanguages 1..2 ( "fr-CH" ) .
           </pre>
           </p>
           <p>
-  UpdateList works in a similar way to <a href="https://docs.python.org/3/reference/expressions.html#slicings">slicing in Python</a> or similar languages. In general, it replaces a part (“slice”) of a list by another list. To remove members, one can replace them by an empty list. To insert new values between two members, one can set a non empty list to the empty slice comprised between those two members.
+              <a>UpdateList</a> works in a similar way than <a href="https://docs.python.org/3/reference/expressions.html#slicings">slicing in Python</a> or similar languages. In general, it replaces a <dfn>slice</dfn> of a list by another list. To remove members, one can replace them by an empty list. To insert new values between two members, one can set a non empty list to the empty slice comprised between those two members.
           </p>
 
           <p>
@@ -398,7 +387,7 @@
           </p>
 
           <pre class='example'>
-  UpdateList &lt;#&gt; ex:preferredLanguages .. ( "fr-CH" ) .
+UpdateList &lt;#&gt; ex:preferredLanguages .. ( "fr-CH" ) .
           </pre>
 
           <p>
@@ -406,27 +395,49 @@
           </p>
 
           <pre class='example'>
-  UpdateList &lt;#&gt; ex:preferredLanguages 2.. ( "fr-CH" ) .
+UpdateList &lt;#&gt; ex:preferredLanguages 2.. ( "fr-CH" ) .
           </pre>
 
 
         </section>
       </section>
 
+
+
       <section id="error-handling">
-        <h2><tdef>Error Handling</tdef></h2>
-        <p>@@TODO</p>
+        <h2><dfn>Error Handling</dfn></h2>
+        <p>
+LD Patch abides to the semantics of the <a href="http://tools.ietf.org/html/rfc5789">HTTP PATCH method</a> [[!rfc5789]], in that the server <cite>MUST apply the entire set of changes atomically and never provide (e.g., in response to a GET during this operation) a partially modified representation. If the entire patch document cannot be successfully applied (e.g., one of the instructions has failed), then the server MUST NOT apply any of the changes</cite>. In the case LD Patch operations fail to be applied, "Error Handling" in <a href="http://tools.ietf.org/html/rfc5789#section-2.2">[RFC5789], Section 2</a> specifies the error codes to be used.
+        </p>
+
+	<p>
+            Here are some additional error conditions more specific to LD Patch:
+        </p>
+
+        <ul>
+            <li id="bind-unique-match">If a <code>Bind</code> statement fails to match exactly one node, then a 422 (Unprocessable Entity) status MUST be returned.</li>
+            <li id="unicity-constraint-violated">If a <a>unicity constraint</a> is violated, then a 422 (Unprocessable Entity) status MUST be returned.</li>
+            <li id="cut-nothing">If a <a>Cut</a> operation fail to remove any triple, then a 422 (Unprocessable Entity) status MUST be returned.</li>
+            <li id="delete-non-existing-triple">If a <a>Delete</a> attempts to remove a non-existing triple, then a 422 (Unprocessable Entity) status MUST be returned.</li>
+            <li id="updatelist-non-list-argument">If the <a class="internalDFN" href="#grammar-production-subject">subject</a> and <a class="internalDFN" href="#grammar-production-predicate">predicate</a> provided to a <a>UpdateList</a> operation fail to match a collection, then a 422 (Unprocessable Entity) status MUST be returned.</li>
+        </ul>
+
+        <p>
+            Note: 422 (Unprocessable Entity) is defined in section <a href="http://tools.ietf.org/html/rfc4918#section-11.2">"11.2. 422 Unprocessable Entity"</a> of [[!rfc4918]].
+
+        </p>
+
       </section>
 
       <section id="pathological-graph">
-        <h2><tdef>Pathological Graph</tdef></h2>
+        <h2><dfn>Pathological Graph</dfn></h2>
           <p>
             There exists a particular case which LD Patch is not able to address. Given an RDF graph <em>G</em>, a blank node <em>b</em> is said to be unambiguous in <em>G</em> if there exists a couple <em>(n, p)</em> where
           <ul>
             <li><em>n</em> is a URI or a literal</li>
-            <li><em>p</em> is an LD Path expression</li>
+            <li><em>p</em> is an LD <a>Path Expression</a></li>
           </ul>
-          such that applying <em>p</em> to <em>n</em> results in a unique <em>{b}</em>.
+          such that applying <em>p</em> to <em>n</em> results in the singleton set <em>{b}</em>.
           </p>
 
           <p>
@@ -438,14 +449,14 @@
           </p>
 
         <pre class='example'>
-  &lt;#&gt; foaf:name "Alice" ; foaf:knows _:b1, _:b2 .
-  _:b1 a foaf:Person .
-  _:b2 a foaf:Person ; schema:workLocation _:b3 .
-  _:b3 schema:name "W3C/MIT" .
+&lt;#&gt; foaf:name "Alice" ; foaf:knows _:b1, _:b2 .
+_:b1 a foaf:Person .
+_:b2 a foaf:Person ; schema:workLocation _:b3 .
+_:b3 schema:name "W3C/MIT" .
         </pre>
 
         <p>
-          The blank nodes <code>_:b2</code> and <code>_:b3</code> are unambiguous (they can for example be reached unambiguoulsy from the literal <code>"W3C/MIT"</code>). The blank node <code>_:b1</code>, on the other hand, is ambigious as all path expressions that can can match it would also match <code>_:b2</code>.
+          The blank nodes <code>_:b2</code> and <code>_:b3</code> are unambiguous as they can be reached unambiguoulsy from the literal <code>"W3C/MIT"</code>). The blank node <code>_:b1</code>, on the other hand, is ambigious as all path expressions that can can match it would also match <code>_:b2</code>.
         </p>
 
         <!-- p>
@@ -502,23 +513,26 @@
 Content-Type: text/ldpatch
 If-Match: "abc123"
 
-@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
-@prefix schema: &lt;http://schema.org/&gt; .
-@prefix profile: &lt;http://ogp.me/ns/profile#&gt; .
-@prefix ex: &lt;http://example.org/vocab#&gt; .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix schema: <http://schema.org/> .
+@prefix profile: <http://ogp.me/ns/profile#> .
+@prefix ex: <http://example.org/vocab#> .
 
-Delete { &lt;#&gt; profile:first_name "Tim" } .
-Add    { 
-  &lt;#&gt; profile:first_name "Timothy" ;
-    profile:image &lt;https://example.org/timbl.jpg&gt;.
+Delete { <#> profile:first_name "Tim" } .
+Add {
+  <#> profile:first_name "Timothy" ;
+    profile:image <https://example.org/timbl.jpg> .
 } .
 
-UpdateList &lt;#&gt; ex:preferredLanguages 1..2 ( "fr-CH" ) .
+Bind ?workLocation <#> /schema:workLocation .
+Cut ?workLocation.
 
-Bind ?event &lt;#&gt; /schema:performerIn[/schema:url = &lt;https://www.w3.org/2012/ldp/wiki/F2F5&gt;]  .
+UpdateList <#> ex:preferredLanguages 1..2 ( "fr-CH" ) .
+
+Bind ?event <#> /schema:attendee[/schema:url = <https://www.w3.org/2012/ldp/wiki/F2F5>]  .
 Add { ?event rdf:type schema:Event } .
 
-Bind ?ted &lt;http://conferences.ted.com/TED2009/&gt; /^schema:url! .
+Bind ?ted <http://conferences.ted.com/TED2009/> /^schema:url! .
 Delete { ?ted schema:startDate "2009-02-04" } .
 Add {
   ?ted schema:location [
@@ -531,32 +545,31 @@
 } .
       </pre>
       <p>
-        This example introduces most features of the LD Patch format: <code>@prefix</code> and prefixed names, the <tref>Add</tref>, <tref>Delete</tref> and <tref>UpdateList</tref> operations, the <tref>Bind</tref>-ing mechanism and blank node creation. The "text/ldpatch" media type is <a href="#media-registration">prospectively</a> used to identify such LD Patch documents.
+          This example introduces most features of the LD Patch format: <code>@prefix</code> and prefixed names, the <a>Add</a>, <a>Delete</a>, <a>Cut</a>, and <a>UpdateList</a> operations, the <a>Bind</a>-ing mechanism and blank node creation. The "text/ldpatch" media type is <a href="#media-registration">prospectively</a> used to identify such LD Patch documents.
       </p>
       <p>
 The following is the resulting (patched) document.
       </p>
       <pre class='example'>
-@prefix schema: &lt;http://schema.org/&gt; .
-@prefix profile: &lt;http://ogp.me/ns/profile#&gt; .
-@prefix ex: &lt;http://example.org/vocab#&gt; .
-
-&lt;http://example.com/timbl#&gt; a schema:Person ;
+@prefix schema: <http://schema.org/> .
+@prefix profile: <http://ogp.me/ns/profile#> .
+@prefix ex: <http://example.org/vocab#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+<http://example.com/timbl#> a schema:Person ;
   schema:alternateName "TimBL" ;
   profile:first_name "Timothy" ;
   profile:last_name "Berners-Lee" ;
-  proflie:image &lt;https://example.org/timbl.jpg&gt; ;
-  schema:workLocation [ schema:name "W3C/MIT" ] ;
-  schema:performerIn _:b1, _:b2 ;
+  profile:image <https://example.org/timbl.jpg> ;
+  schema:attendee _:b1, _:b2 ;
   ex:preferredLanguages ( "en" "fr-CH" ).
 
 _:b1 a schema:Event ;
   schema:name "F2F5 - Linked Data Platform" ;
-  schema:url &lt;https://www.w3.org/2012/ldp/wiki/F2F5&gt; .
+  schema:url <https://www.w3.org/2012/ldp/wiki/F2F5> .
 
 _:b2 a schema:Event ;
   schema:name "TED 2009" ;
-  schema:url &lt;http://conferences.ted.com/TED2009/&gt; ;
+  schema:url <http://conferences.ted.com/TED2009/> ;
   schema:location [
     schema:name "Long Beach, California";
     schema:geo [ schema:latitude "33.7817" ; schema:longitude "-118.2054" ]
@@ -564,376 +577,389 @@
       </pre>
     </section>
 
+
+
+
+
     <section id='concrete-syntax'>
       <h1>Concrete Syntax</h1>
       <p>
+          The LD Patch grammar shares most of its production rules with [[!turtle]], which are extended to allow variables in the <a class="internalDFN" href="#grammar-production-subject">subject</a> and <a class="internalDFN" href="#grammar-production-object">object</a> position.
       </p>
       <!-- do not edit manually, this is automatically generated -->
 <table class="grammar">
   <tbody class="grammar-productions">
 <tr id="grammar-production-ldpatch">
     <td>[1]</td>
-    <td><code>ldpatch</code></td>
+    <td><a href="#grammar-production-ldpatch">ldpatch</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-prologue">prologue</a> <a href="#grammar-production-statement">statement</a>*</td>
 </tr>
 <tr id="grammar-production-prologue">
     <td>[2]</td>
-    <td><code>prologue</code></td>
+    <td><a href="#grammar-production-prologue">prologue</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-prefixID">prefixID</a>*</td>
 </tr>
 <tr id="grammar-production-statement">
     <td>[3]</td>
-    <td><code>statement</code></td>
+    <td><a href="#grammar-production-statement">statement</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-bind">bind</a> | <a href="#grammar-production-add">add</a> | <a href="#grammar-production-delete">delete</a> | <a href="#grammar-production-updateList">updateList</a></td>
 </tr>
 <tr id="grammar-production-bind">
     <td>[4]</td>
-    <td><code>bind</code></td>
+    <td><a href="#grammar-production-bind">bind</a></td>
     <td>::=</td>
     <td>("<code class="grammar-literal">Bind</code>" | "<code class="grammar-literal">B</code>") <a href="#grammar-production-Var">Var</a> <a href="#grammar-production-value">value</a> <a href="#grammar-production-path">path</a>? "<code class="grammar-literal">.</code>"</td>
 </tr>
 <tr id="grammar-production-add">
     <td>[5]</td>
-    <td><code>add</code></td>
+    <td><a href="#grammar-production-add">add</a></td>
     <td>::=</td>
-    <td>("<code class="grammar-literal">Add</code>" | "<code class="grammar-literal">A</code>") "<code class="grammar-literal">{</code>" <a href="#grammar-production-triples">triples</a> "<code class="grammar-literal">}</code>" "<code class="grammar-literal">.</code>"</td>
+    <td>("<code class="grammar-literal">Add</code>" | "<code class="grammar-literal">A</code>") "<code class="grammar-literal">{</code>" <a href="#grammar-production-graph">graph</a> "<code class="grammar-literal">}</code>" "<code class="grammar-literal">.</code>"</td>
 </tr>
 <tr id="grammar-production-delete">
     <td>[6]</td>
-    <td><code>delete</code></td>
+    <td><a href="#grammar-production-delete">delete</a></td>
     <td>::=</td>
-    <td>("<code class="grammar-literal">Delete</code>" | "<code class="grammar-literal">D</code>") "<code class="grammar-literal">{</code>" <a href="#grammar-production-triples">triples</a> "<code class="grammar-literal">}</code>" "<code class="grammar-literal">.</code>"</td>
+    <td>("<code class="grammar-literal">Delete</code>" | "<code class="grammar-literal">D</code>") "<code class="grammar-literal">{</code>" <a href="#grammar-production-graph">graph</a> "<code class="grammar-literal">}</code>" "<code class="grammar-literal">.</code>"</td>
 </tr>
 <tr id="grammar-production-cut">
     <td>[7]</td>
-    <td><code>cut</code></td>
+    <td><a href="#grammar-production-cut">cut</a></td>
     <td>::=</td>
     <td>("<code class="grammar-literal">Cut</code>" | "<code class="grammar-literal">C</code>") (<a href="#grammar-production-iri">iri</a> | <a href="#grammar-production-Var">Var</a>) "<code class="grammar-literal">.</code>"</td>
 </tr>
 <tr id="grammar-production-updateList">
     <td>[8]</td>
-    <td><code>updateList</code></td>
+    <td><a href="#grammar-production-updateList">updateList</a></td>
     <td>::=</td>
     <td>("<code class="grammar-literal">UpdateList</code>" | "<code class="grammar-literal">UL</code>") <a href="#grammar-production-subject">subject</a> <a href="#grammar-production-predicate">predicate</a> <a href="#grammar-production-slice">slice</a> <a href="#grammar-production-collection">collection</a> "<code class="grammar-literal">.</code>"</td>
 </tr>
 <tr id="grammar-production-value">
     <td>[9]</td>
-    <td><code>value</code></td>
+    <td><a href="#grammar-production-value">value</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-iri">iri</a> | <a href="#grammar-production-literal">literal</a> | <a href="#grammar-production-Var">Var</a></td>
 </tr>
 <tr id="grammar-production-path">
     <td>[10]</td>
-    <td><code>path</code></td>
+    <td><a href="#grammar-production-path">path</a></td>
     <td>::=</td>
     <td>( <a href="#grammar-production-step">step</a> | <a href="#grammar-production-constraint">constraint</a> )*</td>
 </tr>
 <tr id="grammar-production-step">
     <td>[11]</td>
-    <td><code>step</code></td>
+    <td><a href="#grammar-production-step">step</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">/</code>' ( '<code class="grammar-literal">^</code>' <a href="#grammar-production-iri">iri</a> | <a href="#grammar-production-iri">iri</a> | <a href="#grammar-production-INDEX">INDEX</a> )</td>
 </tr>
 <tr id="grammar-production-constraint">
     <td>[12]</td>
-    <td><code>constraint</code></td>
+    <td><a href="#grammar-production-constraint">constraint</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">[</code>' <a href="#grammar-production-path">path</a> ( '<code class="grammar-literal">=</code>' <a href="#grammar-production-value">value</a> )? '<code class="grammar-literal">]</code>' | '<code class="grammar-literal">!</code>'</td>
 </tr>
 <tr id="grammar-production-slice">
     <td>[13]</td>
-    <td><code>slice</code></td>
+    <td><a href="#grammar-production-slice">slice</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-INDEX">INDEX</a>? '<code class="grammar-literal">..</code>' <a href="#grammar-production-INDEX">INDEX</a>?</td>
 </tr>
 <tr id="grammar-production-INDEX">
     <td>[14]</td>
-    <td><code>INDEX</code></td>
+    <td><a href="#grammar-production-INDEX">INDEX</a></td>
     <td>::=</td>
     <td>[0-9]+</td>
 </tr>
 <tr id="grammar-production-Var">
     <td>[15]</td>
-    <td><code>Var</code></td>
+    <td><a href="#grammar-production-Var">Var</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">?</code>' <a href="#grammar-production-VARNAME">VARNAME</a></td>
 </tr>
 <tr id="grammar-production-VARNAME">
     <td>[16]</td>
-    <td><code>VARNAME</code></td>
+    <td><a href="#grammar-production-VARNAME">VARNAME</a></td>
     <td>::=</td>
     <td>( <a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> | [0-9] ) ( <a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040] )*</td>
 </tr>
 <tr id="grammar-production-prefixID">
     <td>[17]</td>
-    <td><code>prefixID</code></td>
+    <td><a href="#grammar-production-prefixID">prefixID</a></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-graph">
+    <td>[18]</td>
+    <td><a href="#grammar-production-graph">graph</a></td>
+    <td>::=</td>
+    <td><a href="#grammar-production-triples">triples</a> ( '<code class="grammar-literal">.</code>' <a href="#grammar-production-triples">triples</a> )* '<code class="grammar-literal">.</code>'?</td>
+</tr>
 <tr id="grammar-production-triples">
-    <td>[18]</td>
-    <td><code>triples</code></td>
+    <td>[19]</td>
+    <td><a href="#grammar-production-triples">triples</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-subject">subject</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a> | <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a>?</td>
 </tr>
 <tr id="grammar-production-predicateObjectList">
-    <td>[19]</td>
-    <td><code>predicateObjectList</code></td>
+    <td>[20]</td>
+    <td><a href="#grammar-production-predicateObjectList">predicateObjectList</a></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>)?)*</td>
 </tr>
 <tr id="grammar-production-objectList">
-    <td>[20]</td>
-    <td><code>objectList</code></td>
+    <td>[21]</td>
+    <td><a href="#grammar-production-objectList">objectList</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-object">object</a> ('<code class="grammar-literal">,</code>' <a href="#grammar-production-object">object</a>)*</td>
 </tr>
 <tr id="grammar-production-verb">
-    <td>[21]</td>
-    <td><code>verb</code></td>
+    <td>[22]</td>
+    <td><a href="#grammar-production-verb">verb</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-predicate">predicate</a> | '<code class="grammar-literal">a</code>'</td>
 </tr>
 <tr id="grammar-production-subject">
-    <td>[22]</td>
-    <td><code>subject</code></td>
+    <td>[23]</td>
+    <td><a href="#grammar-production-subject">subject</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-iri">iri</a> | <a href="#grammar-production-BlankNode">BlankNode</a> | <a href="#grammar-production-collection">collection</a> | <a href="#grammar-production-Var">Var</a></td>
 </tr>
 <tr id="grammar-production-predicate">
-    <td>[23]</td>
-    <td><code>predicate</code></td>
+    <td>[24]</td>
+    <td><a href="#grammar-production-predicate">predicate</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-iri">iri</a></td>
 </tr>
 <tr id="grammar-production-object">
-    <td>[24]</td>
-    <td><code>object</code></td>
+    <td>[25]</td>
+    <td><a href="#grammar-production-object">object</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-iri">iri</a> | <a href="#grammar-production-BlankNode">BlankNode</a> | <a href="#grammar-production-collection">collection</a> | <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> | <a href="#grammar-production-literal">literal</a></td>
 </tr>
 <tr id="grammar-production-literal">
-    <td>[25]</td>
-    <td><code>literal</code></td>
+    <td>[26]</td>
+    <td><a href="#grammar-production-literal">literal</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-RDFLiteral">RDFLiteral</a> | <a href="#grammar-production-NumericLiteral">NumericLiteral</a> | <a href="#grammar-production-BooleanLiteral">BooleanLiteral</a></td>
 </tr>
 <tr id="grammar-production-blankNodePropertyList">
-    <td>[26]</td>
-    <td><code>blankNodePropertyList</code></td>
+    <td>[27]</td>
+    <td><a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a></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">
-    <td>[27]</td>
-    <td><code>collection</code></td>
+    <td>[28]</td>
+    <td><a href="#grammar-production-collection">collection</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">(</code>' <a href="#grammar-production-object">object</a>* '<code class="grammar-literal">)</code>'</td>
 </tr>
 <tr id="grammar-production-NumericLiteral">
-    <td>[28]</td>
-    <td><code>NumericLiteral</code></td>
+    <td>[29]</td>
+    <td><a href="#grammar-production-NumericLiteral">NumericLiteral</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-INTEGER">INTEGER</a> | <a href="#grammar-production-DECIMAL">DECIMAL</a> | <a href="#grammar-production-DOUBLE">DOUBLE</a></td>
 </tr>
 <tr id="grammar-production-RDFLiteral">
-    <td>[29]</td>
-    <td><code>RDFLiteral</code></td>
+    <td>[30]</td>
+    <td><a href="#grammar-production-RDFLiteral">RDFLiteral</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-String">String</a> (<a href="#grammar-production-LANGTAG">LANGTAG</a> | '<code class="grammar-literal">^^</code>' <a href="#grammar-production-iri">iri</a>)?</td>
 </tr>
 <tr id="grammar-production-BooleanLiteral">
-    <td>[30]</td>
-    <td><code>BooleanLiteral</code></td>
+    <td>[31]</td>
+    <td><a href="#grammar-production-BooleanLiteral">BooleanLiteral</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">true</code>' | '<code class="grammar-literal">false</code>'</td>
 </tr>
 <tr id="grammar-production-String">
-    <td>[31]</td>
-    <td><code>String</code></td>
+    <td>[32]</td>
+    <td><a href="#grammar-production-String">String</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a> | <a href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE">STRING_LITERAL_SINGLE_QUOTE</a> | <a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">STRING_LITERAL_LONG_SINGLE_QUOTE</a> | <a href="#grammar-production-STRING_LITERAL_LONG_QUOTE">STRING_LITERAL_LONG_QUOTE</a></td>
 </tr>
 <tr id="grammar-production-iri">
-    <td>[32]</td>
-    <td><code>iri</code></td>
+    <td>[33]</td>
+    <td><a href="#grammar-production-iri">iri</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-IRIREF">IRIREF</a> | <a href="#grammar-production-PrefixedName">PrefixedName</a></td>
 </tr>
 <tr id="grammar-production-PrefixedName">
-    <td>[33]</td>
-    <td><code>PrefixedName</code></td>
+    <td>[34]</td>
+    <td><a href="#grammar-production-PrefixedName">PrefixedName</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-PNAME_LN">PNAME_LN</a> | <a href="#grammar-production-PNAME_NS">PNAME_NS</a></td>
 </tr>
 <tr id="grammar-production-BlankNode">
-    <td>[34]</td>
-    <td><code>BlankNode</code></td>
+    <td>[35]</td>
+    <td><a href="#grammar-production-BlankNode">BlankNode</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a> | <a href="#grammar-production-ANON">ANON</a></td>
 </tr>
 <tr id="grammar-production-IRIREF">
-    <td>[35]</td>
-    <td><code>IRIREF</code></td>
+    <td>[36]</td>
+    <td><a href="#grammar-production-IRIREF">IRIREF</a></td>
     <td>::=</td>
-    <td>'<code class="grammar-literal">&lt;</code>' ([^#x00-#x20&lt;&gt;"{}|^`\] | <a href="#grammar-production-UCHAR">UCHAR</a>)* '<code class="grammar-literal">></code>' /* #x00=NULL #01-#x1F=control codes #x20=space */</td>
+    <td>'<code class="grammar-literal"><</code>' ([^#x00-#x20<>"{}|^`\] | <a href="#grammar-production-UCHAR">UCHAR</a>)* '<code class="grammar-literal">></code>' /* #x00=NULL #01-#x1F=control codes #x20=space */</td>
 </tr>
 <tr id="grammar-production-PNAME_NS">
-    <td>[36]</td>
-    <td><code>PNAME_NS</code></td>
+    <td>[37]</td>
+    <td><a href="#grammar-production-PNAME_NS">PNAME_NS</a></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">
-    <td>[37]</td>
-    <td><code>PNAME_LN</code></td>
+    <td>[38]</td>
+    <td><a href="#grammar-production-PNAME_LN">PNAME_LN</a></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">
-    <td>[38]</td>
-    <td><code>BLANK_NODE_LABEL</code></td>
+    <td>[39]</td>
+    <td><a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">_:</code>' (<a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> | [0-9]) ((<a href="#grammar-production-PN_CHARS">PN_CHARS</a> | '<code class="grammar-literal">.</code>')* <a href="#grammar-production-PN_CHARS">PN_CHARS</a>)?</td>
 </tr>
 <tr id="grammar-production-LANGTAG">
-    <td>[39]</td>
-    <td><code>LANGTAG</code></td>
+    <td>[40]</td>
+    <td><a href="#grammar-production-LANGTAG">LANGTAG</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">@</code>' [a-zA-Z]+ ('<code class="grammar-literal">-</code>' [a-zA-Z0-9]+)*</td>
 </tr>
 <tr id="grammar-production-INTEGER">
-    <td>[40]</td>
-    <td><code>INTEGER</code></td>
+    <td>[41]</td>
+    <td><a href="#grammar-production-INTEGER">INTEGER</a></td>
     <td>::=</td>
     <td>[+-]? [0-9]+</td>
 </tr>
 <tr id="grammar-production-DECIMAL">
-    <td>[41]</td>
-    <td><code>DECIMAL</code></td>
+    <td>[42]</td>
+    <td><a href="#grammar-production-DECIMAL">DECIMAL</a></td>
     <td>::=</td>
     <td>[+-]? [0-9]* '<code class="grammar-literal">.</code>' [0-9]+</td>
 </tr>
 <tr id="grammar-production-DOUBLE">
-    <td>[42]</td>
-    <td><code>DOUBLE</code></td>
+    <td>[43]</td>
+    <td><a href="#grammar-production-DOUBLE">DOUBLE</a></td>
     <td>::=</td>
     <td>[+-]? ([0-9]+ '<code class="grammar-literal">.</code>' [0-9]* <a href="#grammar-production-EXPONENT">EXPONENT</a> | '<code class="grammar-literal">.</code>' [0-9]+ <a href="#grammar-production-EXPONENT">EXPONENT</a> | [0-9]+ <a href="#grammar-production-EXPONENT">EXPONENT</a>)</td>
 </tr>
 <tr id="grammar-production-EXPONENT">
-    <td>[43]</td>
-    <td><code>EXPONENT</code></td>
+    <td>[44]</td>
+    <td><a href="#grammar-production-EXPONENT">EXPONENT</a></td>
     <td>::=</td>
     <td>[eE] [+-]? [0-9]+</td>
 </tr>
 <tr id="grammar-production-STRING_LITERAL_QUOTE">
-    <td>[44]</td>
-    <td><code>STRING_LITERAL_QUOTE</code></td>
+    <td>[45]</td>
+    <td><a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">"</code>' ([^#x22#x5C#xA#xD] | <a href="#grammar-production-ECHAR">ECHAR</a> | <a href="#grammar-production-UCHAR">UCHAR</a>)* '<code class="grammar-literal">"</code>'      /* #x22=" #x5C=\ #xA=new line #xD=carriage return */</td>
 </tr>
 <tr id="grammar-production-STRING_LITERAL_SINGLE_QUOTE">
-    <td>[45]</td>
-    <td><code>STRING_LITERAL_SINGLE_QUOTE</code></td>
+    <td>[46]</td>
+    <td><a href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE">STRING_LITERAL_SINGLE_QUOTE</a></td>
     <td>::=</td>
     <td>"<code class="grammar-literal">'</code>" ([^#x27#x5C#xA#xD] | <a href="#grammar-production-ECHAR">ECHAR</a> | <a href="#grammar-production-UCHAR">UCHAR</a>)* "<code class="grammar-literal">'</code>"      /* #x27=' #x5C=\ #xA=new line #xD=carriage return */</td>
 </tr>
 <tr id="grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">
-    <td>[46]</td>
-    <td><code>STRING_LITERAL_LONG_SINGLE_QUOTE</code></td>
+    <td>[47]</td>
+    <td><a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">STRING_LITERAL_LONG_SINGLE_QUOTE</a></td>
     <td>::=</td>
     <td>"<code class="grammar-literal">'''</code>" (("<code class="grammar-literal">'</code>" | "<code class="grammar-literal">''</code>")? ([^'\] | <a href="#grammar-production-ECHAR">ECHAR</a> | <a href="#grammar-production-UCHAR">UCHAR</a>))* "<code class="grammar-literal">'''</code>"</td>
 </tr>
 <tr id="grammar-production-STRING_LITERAL_LONG_QUOTE">
-    <td>[47]</td>
-    <td><code>STRING_LITERAL_LONG_QUOTE</code></td>
+    <td>[48]</td>
+    <td><a href="#grammar-production-STRING_LITERAL_LONG_QUOTE">STRING_LITERAL_LONG_QUOTE</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">"""</code>' (('<code class="grammar-literal">"</code>' | '<code class="grammar-literal">""</code>')? ([^"\] | <a href="#grammar-production-ECHAR">ECHAR</a> | <a href="#grammar-production-UCHAR">UCHAR</a>))* '<code class="grammar-literal">"""</code>'</td>
 </tr>
 <tr id="grammar-production-UCHAR">
-    <td>[48]</td>
-    <td><code>UCHAR</code></td>
+    <td>[49]</td>
+    <td><a href="#grammar-production-UCHAR">UCHAR</a></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 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">
-    <td>[49]</td>
-    <td><code>ECHAR</code></td>
+    <td>[50]</td>
+    <td><a href="#grammar-production-ECHAR">ECHAR</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">\</code>' [tbnrf"'\]</td>
 </tr>
 <tr id="grammar-production-WS">
-    <td>[50]</td>
-    <td><code>WS</code></td>
+    <td>[51]</td>
+    <td><a href="#grammar-production-WS">WS</a></td>
     <td>::=</td>
     <td>#x20 | #x9 | #xD | #xA</td>
 </tr>
 <tr id="grammar-production-ANON">
-    <td>[51]</td>
-    <td><code>ANON</code></td>
+    <td>[52]</td>
+    <td><a href="#grammar-production-ANON">ANON</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">[</code>' <a href="#grammar-production-WS">WS</a>* '<code class="grammar-literal">]</code>'</td>
 </tr>
 <tr id="grammar-production-PN_CHARS_BASE">
-    <td>[52]</td>
-    <td><code>PN_CHARS_BASE</code></td>
+    <td>[53]</td>
+    <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a></td>
     <td>::=</td>
     <td>[A-Z] | [a-z] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x02FF] | [#x0370-#x037D] | [#x037F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]</td>
 </tr>
 <tr id="grammar-production-PN_CHARS_U">
-    <td>[53]</td>
-    <td><code>PN_CHARS_U</code></td>
+    <td>[54]</td>
+    <td><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> | '<code class="grammar-literal">_</code>'</td>
 </tr>
 <tr id="grammar-production-PN_CHARS">
-    <td>[54]</td>
-    <td><code>PN_CHARS</code></td>
+    <td>[55]</td>
+    <td><a href="#grammar-production-PN_CHARS">PN_CHARS</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> | '<code class="grammar-literal">-</code>' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]</td>
 </tr>
 <tr id="grammar-production-PN_PREFIX">
-    <td>[55]</td>
-    <td><code>PN_PREFIX</code></td>
+    <td>[56]</td>
+    <td><a href="#grammar-production-PN_PREFIX">PN_PREFIX</a></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 class="grammar-literal">.</code>')* <a href="#grammar-production-PN_CHARS">PN_CHARS</a>)?</td>
 </tr>
 <tr id="grammar-production-PN_LOCAL">
-    <td>[56]</td>
-    <td><code>PN_LOCAL</code></td>
+    <td>[57]</td>
+    <td><a href="#grammar-production-PN_LOCAL">PN_LOCAL</a></td>
     <td>::=</td>
     <td>(<a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> | '<code class="grammar-literal">:</code>' | [0-9] | <a href="#grammar-production-PLX">PLX</a>) ((<a href="#grammar-production-PN_CHARS">PN_CHARS</a> | '<code class="grammar-literal">.</code>' | '<code class="grammar-literal">:</code>' | <a href="#grammar-production-PLX">PLX</a>)* (<a href="#grammar-production-PN_CHARS">PN_CHARS</a> | '<code class="grammar-literal">:</code>' | <a href="#grammar-production-PLX">PLX</a>))?</td>
 </tr>
 <tr id="grammar-production-PLX">
-    <td>[57]</td>
-    <td><code>PLX</code></td>
+    <td>[58]</td>
+    <td><a href="#grammar-production-PLX">PLX</a></td>
     <td>::=</td>
     <td><a href="#grammar-production-PERCENT">PERCENT</a> | <a href="#grammar-production-PN_LOCAL_ESC">PN_LOCAL_ESC</a></td>
 </tr>
 <tr id="grammar-production-PERCENT">
-    <td>[58]</td>
-    <td><code>PERCENT</code></td>
+    <td>[59]</td>
+    <td><a href="#grammar-production-PERCENT">PERCENT</a></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">
-    <td>[59]</td>
-    <td><code>HEX</code></td>
+    <td>[60]</td>
+    <td><a href="#grammar-production-HEX">HEX</a></td>
     <td>::=</td>
     <td>[0-9] | [A-F] | [a-f]</td>
 </tr>
 <tr id="grammar-production-PN_LOCAL_ESC">
-    <td>[60]</td>
-    <td><code>PN_LOCAL_ESC</code></td>
+    <td>[61]</td>
+    <td><a href="#grammar-production-PN_LOCAL_ESC">PN_LOCAL_ESC</a></td>
     <td>::=</td>
     <td>'<code class="grammar-literal">\</code>' ('<code class="grammar-literal">_</code>' | '<code class="grammar-literal">~</code>' | '<code class="grammar-literal">.</code>' | '<code class="grammar-literal">-</code>' | '<code class="grammar-literal">!</code>' | '<code class="grammar-literal">$</code>' | '<code class="grammar-literal">&</code>' | "<code class="grammar-literal">'</code>" | '<code class="grammar-literal">(</code>' | '<code class="grammar-literal">)</code>' | '<code class="grammar-literal">*</code>' | '<code class="grammar-literal">+</code>' | '<code class="grammar-literal">,</code>' | '<code class="grammar-literal">;</code>' | '<code class="grammar-literal">=</code>' | '<code class="grammar-literal">/</code>' | '<code class="grammar-literal">?</code>' | '<code class="grammar-literal">#</code>' | '<code class="grammar-literal">@</code>' | '<code class="grammar-literal">%</code>')</td>
 </tr>
   </tbody>
 </table>
 
+
+
     </section>
 
     <section id="acknowledgements" class="appendix informative">