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 committed Dec 14, 2021
1 parent 970e809 commit cd44b69
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,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:MAY">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 @@ -772,7 +771,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

0 comments on commit cd44b69

Please sign in to comment.