ldpatch-20150728.html
branchldpatch
changeset 977 535a33b19afd
parent 976 d4e249a5bf19
equal deleted inserted replaced
976:d4e249a5bf19 977:535a33b19afd
   185 }
   185 }
   186 aside.example div.example div.example-title {
   186 aside.example div.example div.example-title {
   187     color: #999;
   187     color: #999;
   188 }
   188 }
   189 </style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-WG-NOTE"><!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head>
   189 </style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-WG-NOTE"><!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head>
   190   <body class="h-entry" data-feedly-mini="yes" role="document" id="respecDocument"><div class="head" role="contentinfo" id="respecHeader">
   190   <body class="h-entry" data-feedly-mini="yes" id="respecDocument"><div class="head" role="contentinfo" id="respecHeader">
   191   <p>
   191   <p>
   192 
   192 
   193 
   193 
   194             <a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a>
   194             <a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a>
   195 
   195 
   196 
   196 
   197   </p>
   197   </p>
   198   <h1 class="title p-name" id="title" property="dcterms:title">Linked Data Patch Format</h1>
   198   <h1 class="title p-name" id="title" property="dcterms:title">Linked Data Patch Format</h1>
   199 
   199 
   200   <h2 id="w3c-working-group-note-24-july-2015"><abbr title="World Wide Web Consortium">W3C</abbr> Working Group Note <time property="dcterms:issued" class="dt-published" datetime="2015-07-24">24 July 2015</time></h2>
   200   <h2 id="w3c-working-group-note-24-july-2015"><abbr title="World Wide Web Consortium">W3C</abbr> Working Group Note <time property="dcterms:issued" class="dt-published" datetime="2015-07-28">28 July 2015</time></h2>
   201   <dl>
   201   <dl>
   202 
   202 
   203       <dt>This version:</dt>
   203       <dt>This version:</dt>
   204       <dd><a class="u-url" href="http://www.w3.org/TR/2015/NOTE-ldpatch-20150724/">http://www.w3.org/TR/2015/NOTE-ldpatch-20150724/</a></dd>
   204       <dd><a class="u-url" href="http://www.w3.org/TR/2015/NOTE-ldpatch-20150728/">http://www.w3.org/TR/2015/NOTE-ldpatch-20150728/</a></dd>
   205       <dt>Latest published version:</dt>
   205       <dt>Latest published version:</dt>
   206       <dd><a href="http://www.w3.org/TR/ldpatch/">http://www.w3.org/TR/ldpatch/</a></dd>
   206       <dd><a href="http://www.w3.org/TR/ldpatch/">http://www.w3.org/TR/ldpatch/</a></dd>
   207 
   207 
   208       <dt>Latest editor's draft:</dt>
   208       <dt>Latest editor's draft:</dt>
   209       <dd><a href="https://dvcs.w3.org/hg/ldpwg/raw-file/ldpatch/ldpatch.html">https://dvcs.w3.org/hg/ldpwg/raw-file/ldpatch/ldpatch.html</a></dd>
   209       <dd><a href="https://dvcs.w3.org/hg/ldpwg/raw-file/ldpatch/ldpatch.html">https://dvcs.w3.org/hg/ldpwg/raw-file/ldpatch/ldpatch.html</a></dd>
   289       </p>
   289       </p>
   290 
   290 
   291 
   291 
   292 
   292 
   293         <p>
   293         <p>
   294           This document was published by the <a href="http://www.w3.org/2012/ldp">Linked Data Platform Working Group</a> as a Working Group Note.
   294           This document was published by the <a href="http://www.w3.org/2012/ldp/">Linked Data Platform Working Group</a> as a Working Group Note.
   295 
   295 
   296 
   296 
   297             If you wish to make comments regarding this document, please send them to
   297             If you wish to make comments regarding this document, please send them to
   298             <a href="mailto:public-ldp-comments@w3.org">public-ldp-comments@w3.org</a>
   298             <a href="mailto:public-ldp-comments@w3.org">public-ldp-comments@w3.org</a>
   299             (<a href="mailto:public-ldp-comments-request@w3.org?subject=subscribe">subscribe</a>,
   299             (<a href="mailto:public-ldp-comments-request@w3.org?subject=subscribe">subscribe</a>,
   318 
   318 
   319             This document was produced by a group operating under the
   319             This document was produced by a group operating under the
   320             <a id="sotd_patent" property="w3p:patentRules" href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent
   320             <a id="sotd_patent" property="w3p:patentRules" href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent
   321             Policy</a>.
   321             Policy</a>.
   322 
   322 
   323 
   323               <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/55082/status" rel="disclosure">public list of any patent
   324 
       
   325 
       
   326               <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/" rel="disclosure">public list of any patent
       
   327               disclosures</a>
   324               disclosures</a>
   328 
   325 
   329             made in connection with the deliverables of the group; that page also includes
   326             made in connection with the deliverables of the group; that page also includes
   330             instructions for disclosing a patent. An individual who has actual knowledge of a patent
   327             instructions for disclosing a patent. An individual who has actual knowledge of a patent
   331             which the individual believes contains
   328             which the individual believes contains
   332             <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
   329             <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
   333             Claim(s)</a> must disclose the information in accordance with
   330             Claim(s)</a> must disclose the information in accordance with
   334             <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   331             <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
   335             6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
   332             6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
   336 
       
   337 
       
   338         </p>
   333         </p>
   339 
   334 
   340           <p>This document is governed by the <a id="w3c_process_revision" href="http://www.w3.org/2014/Process-20140801/">1 August 2014 <abbr title="World Wide Web Consortium">W3C</abbr> Process Document</a>.
   335           <p>This document is governed by the <a id="w3c_process_revision" href="http://www.w3.org/2014/Process-20140801/">1 August 2014 <abbr title="World Wide Web Consortium">W3C</abbr> Process Document</a>.
   341           </p>
   336           </p>
   342 
   337 
   343 
       
   344 
       
   345 
       
   346 
       
   347 </section>
   338 </section>
       
   339 
       
   340 
       
   341 <section id="toc"><h2 class="introductory" id="h-toc" resource="#h-toc"><span property="xhv:role" resource="xhv:heading">Table of Contents</span></h2><ul class="toc" role="directory" id="respecContents"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">2. </span>Examples</a><ul class="toc"><li class="tocline"><a href="#full-example" class="tocxref"><span class="secno">2.1 </span>Full example</a></li><li class="tocline"><a href="#list-manipulation-examples" class="tocxref"><span class="secno">2.2 </span><code>rdf:List</code> manipulation examples</a></li></ul></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">3. </span>Conformance</a></li><li class="tocline"><a href="#semantics" class="tocxref"><span class="secno">4. </span>LD Patch Semantics</a><ul class="toc"><li class="tocline"><a href="#nodes-and-triples-semantics" class="tocxref"><span class="secno">4.1 </span><span data-dfn-type="dfn">Nodes and triples Semantics</span></a></li><li class="tocline"><a href="#path-expression" class="tocxref"><span class="secno">4.2 </span><span data-dfn-type="dfn">Path Expression</span></a></li><li class="tocline"><a href="#patch-operations" class="tocxref"><span class="secno">4.3 </span>Patch Operations</a><ul class="toc"><li class="tocline"><a href="#Bind-statement" class="tocxref"><span class="secno">4.3.1 </span><span data-dfn-type="dfn">Bind</span></a></li><li class="tocline"><a href="#Add-statement" class="tocxref"><span class="secno">4.3.2 </span><span data-dfn-type="dfn">Add</span></a></li><li class="tocline"><a href="#AddNew-statement" class="tocxref"><span class="secno">4.3.3 </span><span data-dfn-type="dfn">AddNew</span></a></li><li class="tocline"><a href="#Delete-statement" class="tocxref"><span class="secno">4.3.4 </span><span data-dfn-type="dfn">Delete</span></a></li><li class="tocline"><a href="#DeleteExisting-statement" class="tocxref"><span class="secno">4.3.5 </span><span data-dfn-type="dfn">DeleteExisting</span></a></li><li class="tocline"><a href="#Cut-statement" class="tocxref"><span class="secno">4.3.6 </span><span data-dfn-type="dfn">Cut</span></a></li><li class="tocline"><a href="#UpdateList-statement" class="tocxref"><span class="secno">4.3.7 </span><span data-dfn-type="dfn">UpdateList</span></a></li><li class="tocline"><a href="#error-handling" class="tocxref"><span class="secno">4.3.8 </span><span data-dfn-type="dfn">Error Handling</span></a></li><li class="tocline"><a href="#pathological-graph" class="tocxref"><span class="secno">4.3.9 </span><span data-dfn-type="dfn">Pathological Graph</span></a></li></ul></li></ul></li><li class="tocline"><a href="#turtle-sparql-comparison" class="tocxref"><span class="secno">5. </span>LD Patch compared to Turtle and SPARQL</a></li><li class="tocline"><a href="#concrete-syntax" class="tocxref"><span class="secno">6. </span>Concrete Syntax</a></li><li class="tocline"><a href="#updatelist-algo" class="tocxref"><span class="secno">A. </span>UpdateList Algorithm</a></li><li class="tocline"><a href="#media-registration" class="tocxref"><span class="secno">B. </span>Internet Media Type, File Extension and Macintosh File Type</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">C. </span>Acknowledgements</a></li><li class="tocline"><a href="#changelog" class="tocxref"><span class="secno">D. </span>Change Log</a><ul class="toc"><li class="tocline"><a href="#changes-since-march-2015-candidate-recommendation" class="tocxref"><span class="secno">D.1 </span>Changes since <span class="formerLink">March 2015 Candidate Recommendation</span></a></li><li class="tocline"><a href="#changes-since-september-2014-first-public-working-draft" class="tocxref"><span class="secno">D.2 </span>Changes since <span class="formerLink">September 2014 First Public Working Draft</span></a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">E. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">E.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">E.2 </span>Informative references</a></li></ul></li></ul></section>
       
   342 
   348 
   343 
   349     <section class="informative" id="introduction" typeof="bibo:Chapter" resource="#introduction" property="bibo:hasPart">
   344     <section class="informative" id="introduction" typeof="bibo:Chapter" resource="#introduction" property="bibo:hasPart">
   350       <!--OddPage--><h2 id="h-introduction" resource="#h-introduction"><span property="xhv:role" resource="xhv:heading"><span class="secno">1. </span>Introduction</span></h2><p><em>This section is non-normative.</em></p>
   345       <!--OddPage--><h2 id="h-introduction" resource="#h-introduction"><span property="xhv:role" resource="xhv:heading"><span class="secno">1. </span>Introduction</span></h2><p><em>This section is non-normative.</em></p>
   351       <p>
   346       <p>
   352           Linked Data <q cite="http://en.wikipedia.org/wiki/Linked_data">describes a method of publishing structured data so that it can be interlinked and become more useful. It builds upon standard Web technologies such as HTTP, RDF and IRIs, but rather than using them to serve web pages for human readers, it extends them to share information in a way that can be read automatically by computers. This enables data from different sources to be connected and queried.</q> (source Wikipedia).
   347           Linked Data <q cite="https://en.wikipedia.org/wiki/Linked_data">describes a method of publishing structured data so that it can be interlinked and become more useful. It builds upon standard Web technologies such as HTTP, RDF and IRIs, but rather than using them to serve web pages for human readers, it extends them to share information in a way that can be read automatically by computers. This enables data from different sources to be connected and queried.</q> (source Wikipedia).
   353       </p>
   348       </p>
   354       <p>
   349       <p>
   355 This document defines the Linked Data Patch Format (LD Patch), a format for describing changes to apply to Linked Data. It is suitable for use with <a href="http://tools.ietf.org/html/rfc5789">HTTP PATCH</a> [<cite><a class="bibref" href="#bib-RFC5789">RFC5789</a></cite>], a method to perform partial modifications to Web resources.
   350 This document defines the Linked Data Patch Format (LD Patch), a format for describing changes to apply to Linked Data. It is suitable for use with <a href="http://tools.ietf.org/html/rfc5789">HTTP PATCH</a> [<cite><a class="bibref" href="#bib-RFC5789">RFC5789</a></cite>], a method to perform partial modifications to Web resources.
   356       </p>
   351       </p>
   357       <p>
   352       <p>
   508           <p>Output graph:</p>
   503           <p>Output graph:</p>
   509 
   504 
   510           <div class="example"><div class="example-title"><span>Example 10</span></div><pre class="example">&lt;#&gt; &lt;http://example.org/vocab#preferredLanguages&gt; ( "lorem" "ipsum" "dolor" "sit" "amet" "en" "fr" ) .</pre></div>
   505           <div class="example"><div class="example-title"><span>Example 10</span></div><pre class="example">&lt;#&gt; &lt;http://example.org/vocab#preferredLanguages&gt; ( "lorem" "ipsum" "dolor" "sit" "amet" "en" "fr" ) .</pre></div>
   511 
   506 
   512 
   507 
   513           <h3 id="replace-elements">How to replace all the elements after a given index</h3>
   508           <h3 id="replace-elements-after-index">How to replace all the elements after a given index</h3>
   514 
   509 
   515           <p>
   510           <p>
   516               This example shows how to replace all the elements after the index <code>2</code> with the provided collection:
   511               This example shows how to replace all the elements after the index <code>2</code> with the provided collection:
   517           </p>
   512           </p>
   518 
   513 
  1455     <section id="changelog" class="appendix informative" typeof="bibo:Chapter" resource="#changelog" property="bibo:hasPart">
  1450     <section id="changelog" class="appendix informative" typeof="bibo:Chapter" resource="#changelog" property="bibo:hasPart">
  1456         <!--OddPage--><h2 id="h-changelog" resource="#h-changelog"><span property="xhv:role" resource="xhv:heading"><span class="secno">D. </span>Change Log</span></h2><p><em>This section is non-normative.</em></p>
  1451         <!--OddPage--><h2 id="h-changelog" resource="#h-changelog"><span property="xhv:role" resource="xhv:heading"><span class="secno">D. </span>Change Log</span></h2><p><em>This section is non-normative.</em></p>
  1457         <section id="changes-since-march-2015-candidate-recommendation" typeof="bibo:Chapter" resource="#changes-since-march-2015-candidate-recommendation" property="bibo:hasPart">
  1452         <section id="changes-since-march-2015-candidate-recommendation" typeof="bibo:Chapter" resource="#changes-since-march-2015-candidate-recommendation" property="bibo:hasPart">
  1458             <h3 id="h-changes-since-march-2015-candidate-recommendation" resource="#h-changes-since-march-2015-candidate-recommendation"><span property="xhv:role" resource="xhv:heading"><span class="secno">D.1 </span>Changes since <a href="http://www.w3.org/TR/2015/CR-ldpatch-20150303/">March 2015 Candidate Recommendation</a></span></h3>
  1453             <h3 id="h-changes-since-march-2015-candidate-recommendation" resource="#h-changes-since-march-2015-candidate-recommendation"><span property="xhv:role" resource="xhv:heading"><span class="secno">D.1 </span>Changes since <a href="http://www.w3.org/TR/2015/CR-ldpatch-20150303/">March 2015 Candidate Recommendation</a></span></h3>
  1459             <ul>
  1454             <ul>
  1460                 <li>Closed <a href="http://www.w3.org/2012/ldp/track/issues/156">ACTION-156</a> by changing reference to "bcp47, as used by turtle”, based on <a href="https://www.w3.org/International/track/issues/410">i18n-issue-410</a>.</li>
  1455                 <li>Closed <a href="http://www.w3.org/2012/ldp/track/actions/156">ACTION-156</a> by changing reference to "bcp47, as used by turtle”, based on <a href="https://www.w3.org/International/track/issues/410">i18n-issue-410</a>.</li>
  1461                 <li>Fixed example</li>
  1456                 <li>Fixed example</li>
  1462                 <li>Fixed typo resolution re: <a href="http://www.w3.org/2012/ldp/track/issues/102">ISSUE-102</a></li>
  1457                 <li>Fixed typo resolution re: <a href="http://www.w3.org/2012/ldp/track/issues/102">ISSUE-102</a></li>
  1463                 <li>Added Conformance section</li>
  1458                 <li>Added Conformance section</li>
  1464             </ul>
  1459             </ul>
  1465             <h3 id="changes-since-september-2014-first-public-working-draft">Changes since <a href="http://www.w3.org/TR/2014/WD-ldpatch-20140918/">September 2014 First Public Working Draft</a></h3>
  1460         </section>
       
  1461         <section id="changes-since-september-2014-first-public-working-draft" typeof="bibo:Chapter" resource="#changes-since-september-2014-first-public-working-draft" property="bibo:hasPart">
       
  1462             <h3 id="h-changes-since-september-2014-first-public-working-draft" resource="#h-changes-since-september-2014-first-public-working-draft"><span property="xhv:role" resource="xhv:heading"><span class="secno">D.2 </span>Changes since <a href="http://www.w3.org/TR/2014/WD-ldpatch-20140918/">September 2014 First Public Working Draft</a></span></h3>
  1466             <ul>
  1463             <ul>
  1467                 <li>Negative indexes in Path and Slice (<a href="http://www.w3.org/2012/ldp/track/issues/102">ISSUE-102</a> and <a href="http://www.w3.org/2012/ldp/track/issues/104">ISSUE-104</a>)</li>
  1464                 <li>Negative indexes in Path and Slice (<a href="http://www.w3.org/2012/ldp/track/issues/102">ISSUE-102</a> and <a href="http://www.w3.org/2012/ldp/track/issues/104">ISSUE-104</a>)</li>
  1468                 <li>New section comparing LD Patch with Turtle and SPARQL 1.1</li>
  1465                 <li>New section comparing LD Patch with Turtle and SPARQL 1.1</li>
  1469                 <li>Add and Delete now takes Turtle as argument (<a href="http://www.w3.org/2012/ldp/track/issues/101">ISSUE-101</a>)</li>
  1466                 <li>Add and Delete now takes Turtle as argument (<a href="http://www.w3.org/2012/ldp/track/issues/101">ISSUE-101</a>)</li>
  1470                 <li>New operations AddNew and DeleteExisting (<a href="http://www.w3.org/2012/ldp/track/issues/103">ISSUE-103</a>)</li>
  1467                 <li>New operations AddNew and DeleteExisting (<a href="http://www.w3.org/2012/ldp/track/issues/103">ISSUE-103</a>)</li>