Skip to content

Commit

Permalink
Allow arbitrary patch triples by requiring a specific type.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh authored and csarven committed Dec 15, 2021
1 parent 2921822 commit bcb778b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ <h4 property="schema:name">Modifying Resources Using N3 Patches</h4>

<ul>
<li id="server-patch-n3-patches" rel="spec:requirement" resource="#server-patch-n3-patches"><span property="spec:statement">A patch document <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> contain one or more patch resources.</span></li>
<li id="server-patch-n3-patch-identifier" rel="spec:requirement" resource="#server-patch-n3-patch-identifier"><span property="spec:statement">A patch resource <span rel="spec:requirementLevel" resource="spec:MAY">MUST</span> be identified by a URI or blank node, which we refer to as <code>?patch</code> in the remainder of this section.</span></li>
<li id="server-patch-n3-patch-identifier" rel="spec:requirement" resource="#server-patch-n3-patch-identifier"><span property="spec:statement">A patch resource <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> be identified by a URI or blank node, which we refer to as <code>?patch</code> in the remainder of this section.</span></li>
<li id="server-patch-n3-type" rel="spec:requirement" resource="#server-patch-n3-type">A patch resource <span rel="spec:requirementLevel" resource="spec:MAY">MAY</span> contain a triple [<cite><a class="bibref" href="#bib-rdf11-concepts">RDF11-CONCEPTS</a></cite>] <code><span property="spec:statement">?patch rdf:type solid:Patch</span></code>.</li>
<li id="server-patch-n3-deletes" rel="spec:requirement" resource="#server-patch-n3-deletes"><span property="spec:statement">A patch resource <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> contain at most one triple of the form <code>?patch solid:deletes ?deletions</code>.</span></li>
<li id="server-patch-n3-inserts" rel="spec:requirement" resource="#server-patch-n3-inserts">A patch resource <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> contain at most one triple of the form <code>?patch solid:inserts ?insertions</code>.</li>
Expand All @@ -803,10 +803,9 @@ <h4 property="schema:name">Modifying Resources Using N3 Patches</h4>

<ul about="#server-patch-n3-default">
<li id="server-patch-n3-single" rel="spec:requirement" resource="#server-patch-n3-single"><span property="spec:statement">The patch document <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> contain exactly one patch resource, identified by one or more of the triple patterns described above, which all share the same <code>?patch</code> subject.</span></li>
<li id="server-patch-n3-matching-strategy" rel="spec:requirement" resource="#server-patch-n3-matching-strategy"><span property="spec:statement">The patch resource <span rel="spec:requirementLevel" resource="spec:MAY">MAY</span> contain one triple of the form <code>?patch solid:matchingStrategy solid:SingleMatch</code>.</span></li>
<li id="server-patch-n3-simple-type" rel="spec:requirement" resource="#server-patch-n3-type">A patch resource <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> contain a triple <code><span property="spec:statement">?patch rdf:type solid:InsertDeletePatch</span></code>.</li>
<li id="server-patch-n3-variables" rel="spec:requirement" resource="#server-patch-n3-variables"><span property="spec:statement">The <code>?insertions</code> and <code>?deletions</code> formulae <span rel="spec:requirementLevel" resource="spec:MUST-NOT">MUST NOT</span> contain variables that do not occur in the <code>?conditions</code> formula.</span></li>
<li id="server-patch-n3-blank-nodes" rel="spec:requirement" resource="#server-patch-n3-blank-nodes"><span property="spec:statement">The <code>?insertions</code> and <code>?deletions</code> formulae <span rel="spec:requirementLevel" resource="spec:MUST-NOT">MUST NOT</span> contain blank nodes.</span></li>
<li id="server-patch-n3-other-triples" rel="spec:requirement" resource="#server-patch-n3-other-triples"><span property="spec:statement">The patch document <span rel="spec:requirementLevel" resource="spec:MUST-NOT">MUST NOT</span> contain any other triples.</span></li>
</ul>

<p><span about="" id="server-patch-n3-invalid" rel="spec:requirement" resource="#server-patch-n3-invalid"><span property="spec:statement"><span rel="spec:requirementSubject" resource="spec:Server">Servers</span> <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> respond with a <code>422</code> status code [<cite><a class="bibref" href="#bib-rfc4918">RFC4918</a></cite>] if a patch document does not satisfy all of the above constraints.</span></span></p>
Expand All @@ -832,7 +831,7 @@ <h4 property="schema:name">Modifying Resources Using N3 Patches</h4>
<pre about="#n3-patch-example" property="schema:description" typeof="fabio:Script"><code>@prefix solid: &lt;http://www.w3.org/ns/solid/terms#&gt;.</code>
<code>@prefix ex: &lt;http://www.example.org/terms#&gt;.</code>
<code></code>
<code>_:rename a solid:Patch;</code>
<code>_:rename a solid:InsertDeletePatch;</code>
<code> solid:where { ?person ex:familyName "Garcia". };</code>
<code> solid:inserts { ?person ex:givenName "Alex". };</code>
<code> solid:deletes { ?person ex:givenName "Claudia". }.</code></pre>
Expand Down Expand Up @@ -1231,7 +1230,7 @@ <h3 property="schema:name">Normative References</h3>
<dd><a href="https://httpwg.org/specs/rfc8288.html" rel="cito:citesAsAuthority"><cite>Web Linking</cite></a>. M. Nottingham. IETF. October 2017. Proposed Standard. URL: <a href="https://httpwg.org/specs/rfc8288.html">https://httpwg.org/specs/rfc8288.html</a></dd>
<dt id="bib-solid-oidc">[SOLID-OIDC]</dt>
<dd><a href="https://solid.github.io/solid-oidc/" rel="cito:citesAsAuthority"><cite>SOLID-OIDC</cite></a>. Aaron Coburn; elf Pavlik; Dmitri Zagidulin. W3C Solid Community Group. W3C Editor's Draft. URL: <a href="https://solid.github.io/solid-oidc/">https://solid.github.io/solid-oidc/</a></dd>
<dt id="bib-sparql11-query">[SPARQL11-QUERY]</dt>
<dt id="bib-sparql11-query">[SPARQL11-QUERY]</dt>
<dd><a href="https://www.w3.org/TR/sparql11-query/" rel="cito:citesAsAuthority"><cite>SPARQL 1.1 Query</cite></a>. Steve Harris; Andy Seaborne; Eric Prud'hommeaux. W3C. 21 March 2013. W3C Recommendation. URL: <a href="https://www.w3.org/TR/sparql11-query/">https://www.w3.org/TR/sparql11-query/</a></dd>
<dt id="bib-turtle">[Turtle]</dt>
<dd><a href="https://www.w3.org/TR/turtle/" rel="cito:citesAsAuthority"><cite>RDF 1.1 Turtle</cite></a>. Eric Prud'hommeaux; Gavin Carothers. W3C. 25 February 2014. W3C Recommendation. URL: <a href="https://www.w3.org/TR/turtle/">https://www.w3.org/TR/turtle/</a></dd>
Expand Down

0 comments on commit bcb778b

Please sign in to comment.