--- a/ldpatch.html Tue Nov 18 13:30:44 2014 -0500
+++ b/ldpatch.html Tue Nov 18 14:10:29 2014 -0500
@@ -242,7 +242,7 @@
</section>
<section class='normative' id='language-features'>
- <h1>LD Patch Syntax</h1>
+ <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.
</p>
@@ -273,7 +273,7 @@
<section id="node-matching-semantics">
<h2><tdef>Node Matching Semantics</tdef></h2>
<p>
-LD Patch borrows much of its syntax 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. 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.
</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.
@@ -465,6 +465,105 @@
</section>
</section>
+ <section id="examples" class="informative">
+ <h2>Examples</h2>
+
+ <p>
+ The following RDF Graph will be used as an example through this specification. It describes the relation between a person named Tim Berners-Lee (denoted by <code><http://example.org/timbl#></code>) and two events he attended.
+ </p>
+ <pre class='example'>
+@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 "Tim" ;
+ profile:last_name "Berners-Lee" ;
+ schema:workLocation [ schema:name "W3C/MIT" ] ;
+ schema:performerIn _:b1, _:b2 ;
+ ex:preferredLanguages ( "en" "fr" ).
+
+_:b1 schema:name "F2F5 - Linked Data Platform" ;
+ schema:url <https://www.w3.org/2012/ldp/wiki/F2F5> .
+
+_:b2 a schema:Event ;
+ schema:name "TED 2009" ;
+ schema:startDate "2009-02-04" ;
+ schema:url <http://conferences.ted.com/TED2009/> .
+ </pre>
+ <p>
+The following is an example HTTP Patch request, conveying an LD Patch document:
+ </p>
+ <pre class='example'>
+PATCH /timbl HTTP/1.1
+Host: example.org
+Content-Length: 478
+Content-Type: text/ldpatch
+If-Match: "abc123"
+
+@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 { <#> profile:first_name "Tim" } .
+Add {
+ <#> profile:first_name "Timothy" ;
+ profile:image <https://example.org/timbl.jpg>.
+} .
+
+UpdateList <#> ex:preferredLanguages 1..2 ( "fr-CH" ) .
+
+Bind ?event <#> /schema:performerIn[/schema:url = <https://www.w3.org/2012/ldp/wiki/F2F5>] .
+Add { ?event rdf:type schema:Event } .
+
+Bind ?ted <http://conferences.ted.com/TED2009/> /^schema:url! .
+Delete { ?ted schema:startDate "2009-02-04" } .
+Add {
+ ?ted schema:location [
+ schema:name "Long Beach, California" ;
+ schema:geo [
+ schema:latitude "33.7817" ;
+ schema:longitude "-118.2054"
+ ]
+ ]
+} .
+ </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.
+ </p>
+ <p>
+The following is the resulting (patched) document.
+ </p>
+ <pre class='example'>
+@prefix schema: <http://schema.org/> .
+@prefix profile: <http://ogp.me/ns/profile#> .
+@prefix ex: <http://example.org/vocab#> .
+
+<http://example.com/timbl#> a schema:Person ;
+ schema:alternateName "TimBL" ;
+ profile:first_name "Timothy" ;
+ profile:last_name "Berners-Lee" ;
+ proflie:image <https://example.org/timbl.jpg> ;
+ schema:workLocation [ schema:name "W3C/MIT" ] ;
+ schema:performerIn _:b1, _:b2 ;
+ ex:preferredLanguages ( "en" "fr-CH" ).
+
+_:b1 a schema:Event ;
+ schema:name "F2F5 - Linked Data Platform" ;
+ schema:url <https://www.w3.org/2012/ldp/wiki/F2F5> .
+
+_:b2 a schema:Event ;
+ schema:name "TED 2009" ;
+ schema:url <http://conferences.ted.com/TED2009/> ;
+ schema:location [
+ schema:name "Long Beach, California";
+ schema:geo [ schema:latitude "33.7817" ; schema:longitude "-118.2054" ]
+ ] .
+ </pre>
+ </section>
+
<section id='concrete-syntax'>
<h1>Concrete Syntax</h1>
<p>
@@ -680,7 +779,7 @@
<td>[35]</td>
<td><code>IRIREF</code></td>
<td>::=</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>
+ <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>
@@ -837,105 +936,6 @@
</section>
- <section id="examples" class="informative">
- <h2>Examples</h2>
-
- <p>
- The following RDF Graph will be used as an example through this specification. It describes the relation between a person named Tim Berners-Lee (denoted by <code><http://example.org/timbl#></code>) and two events he attended.
- </p>
- <pre class='example'>
-@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 "Tim" ;
- profile:last_name "Berners-Lee" ;
- schema:workLocation [ schema:name "W3C/MIT" ] ;
- schema:performerIn _:b1, _:b2 ;
- ex:preferredLanguages ( "en" "fr" ).
-
-_:b1 schema:name "F2F5 - Linked Data Platform" ;
- schema:url <https://www.w3.org/2012/ldp/wiki/F2F5> .
-
-_:b2 a schema:Event ;
- schema:name "TED 2009" ;
- schema:startDate "2009-02-04" ;
- schema:url <http://conferences.ted.com/TED2009/> .
- </pre>
- <p>
-The following is an example HTTP Patch request, conveying an LD Patch document:
- </p>
- <pre class='example'>
-PATCH /timbl HTTP/1.1
-Host: example.org
-Content-Length: 478
-Content-Type: text/ldpatch
-If-Match: "abc123"
-
-@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 { <#> profile:first_name "Tim" } .
-Add {
- <#> profile:first_name "Timothy" ;
- profile:image <https://example.org/timbl.jpg>.
-} .
-
-UpdateList <#> ex:preferredLanguages 1..2 ( "fr-CH" ) .
-
-Bind ?event <#> /schema:performerIn[/schema:url = <https://www.w3.org/2012/ldp/wiki/F2F5>] .
-Add { ?event rdf:type schema:Event } .
-
-Bind ?ted <http://conferences.ted.com/TED2009/> /^schema:url! .
-Delete { ?ted schema:startDate "2009-02-04" } .
-Add {
- ?ted schema:location [
- schema:name "Long Beach, California" ;
- schema:geo [
- schema:latitude "33.7817" ;
- schema:longitude "-118.2054"
- ]
- ]
-} .
- </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.
- </p>
- <p>
-The following is the resulting (patched) document.
- </p>
- <pre class='example'>
-@prefix schema: <http://schema.org/> .
-@prefix profile: <http://ogp.me/ns/profile#> .
-@prefix ex: <http://example.org/vocab#> .
-
-<http://example.com/timbl#> a schema:Person ;
- schema:alternateName "TimBL" ;
- profile:first_name "Timothy" ;
- profile:last_name "Berners-Lee" ;
- proflie:image <https://example.org/timbl.jpg> ;
- schema:workLocation [ schema:name "W3C/MIT" ] ;
- schema:performerIn _:b1, _:b2 ;
- ex:preferredLanguages ( "en" "fr-CH" ).
-
-_:b1 a schema:Event ;
- schema:name "F2F5 - Linked Data Platform" ;
- schema:url <https://www.w3.org/2012/ldp/wiki/F2F5> .
-
-_:b2 a schema:Event ;
- schema:name "TED 2009" ;
- schema:url <http://conferences.ted.com/TED2009/> ;
- schema:location [
- schema:name "Long Beach, California";
- schema:geo [ schema:latitude "33.7817" ; schema:longitude "-118.2054" ]
- ] .
- </pre>
- </section>
-
<section id="acknowledgements" class="appendix informative">
<h2>Acknowledgements</h2>