You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><spanabout="" id="server-patch-n3-accept" rel="spec:requirement" resource="#server-patch-n3-accept"><spanproperty="spec:statement"><spanrel="spec:requirementSubject" resource="spec:Server">Servers</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> accept a <code>PATCH</code> request with an <em>N3 Patch</em> body when the target of the request is an <em>RDF document</em> [<cite><aclass="bibref" href="#bib-rdf11-concepts">RDF11-CONCEPTS</a></cite>].</span></span><spanabout="" id="server-patch-n3-advertise" rel="spec:requirement" resource="#server-patch-n3-advertise"><spanproperty="spec:statement"><spanrel="spec:requirementSubject" resource="spec:Server">They</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> indicate such support by listing <code>text/n3</code> as a value of the <code>Accept-Patch</code> header [<cite><aclass="bibref" href="#bib-rfc5789">RFC5789</a></cite>] of relevant responses.</span></span> [<ahref="https://github.com/solid/specification/issues/125#issuecomment-959518598" rel="cito:citesAsSourceDocument">Source</a>]</p>
728
+
<p><spanabout="" id="server-patch-n3-accept" rel="spec:requirement" resource="#server-patch-n3-accept"><spanproperty="spec:statement"><spanrel="spec:requirementSubject" resource="spec:Server">Servers</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> accept a <code>PATCH</code> request with an <em>N3 Patch</em> body when the target of the request is an <em>RDF document</em> [<cite><aclass="bibref" href="#bib-rdf11-concepts">RDF11-CONCEPTS</a></cite>].</span></span><spanabout="" id="server-patch-n3-advertise" rel="spec:requirement" resource="#server-patch-n3-advertise"><spanproperty="spec:statement"><spanrel="spec:requirementSubject" resource="spec:Server">Servers</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> indicate support of N3 Patch by listing <code>text/n3</code> as a value of the <code>Accept-Patch</code> header [<cite><aclass="bibref" href="#bib-rfc5789">RFC5789</a></cite>] of relevant responses.</span></span> [<ahref="https://github.com/solid/specification/issues/125#issuecomment-959518598" rel="cito:citesAsSourceDocument">Source</a>]</p>
729
729
730
730
<p>An <em>N3 Patch</em> is a document in the <em>Notation3 (N3)</em> format [<cite><aclass="bibref" href="#bib-notation3">N3</a></cite>], identified by the media type <code>text/n3</code>, conforming to the following constraints:</p>
731
731
@@ -739,14 +739,14 @@ <h4 property="schema:name">Modifying Resources Using N3 Patches</h4>
739
739
<liid="server-patch-n3-formulae" rel="spec:requirement" resource="#server-patch-n3-formulae"><spanproperty="spec:statement">When present, <code>?deletions</code>, <code>?insertions</code>, and <code>?conditions</code><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> be non-nested <em>cited formulae</em> [<cite><aclass="bibref" href="#bib-notation3">N3</a></cite>] consisting only of triples and/or triple patterns [<cite><aclass="bibref" href="#bib-sparql11-query">SPARQL11-QUERY</a></cite>]. When not present, they are presumed to be the empty formula <code>{}</code>.</span></li>
740
740
</ul>
741
741
742
-
<pid="server-patch-n3-default">While other specifications might provide a structure and interpretation for a wider class of N3 Patch documents, the present specification only governs the application of N3 Patch documents that additionally adhere to the following constraints:</p>
742
+
<pid="server-patch-n3-default"rel="schema:hasPart" resource="#server-patch-n3-default"><spanproperty="schema:description">While other specifications might provide a structure and interpretation for a wider class of N3 Patch documents, the present specification only governs the application of N3 Patch documents that additionally adhere to the following constraints:</span></p>
743
743
744
-
<ul>
744
+
<ulabout="#server-patch-n3-default">
745
745
<liid="server-patch-n3-single" rel="spec:requirement" resource="#server-patch-n3-single"><spanproperty="spec:statement">The patch document <spanrel="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>
746
746
<liid="server-patch-n3-matching-strategy" rel="spec:requirement" resource="#server-patch-n3-matching-strategy"><spanproperty="spec:statement">The patch resource <spanrel="spec:requirementLevel" resource="spec:MAY">MAY</span> contain one triple of the form <code>?patch solid:matchingStrategy solid:SingleMatch</code>.</span></li>
747
-
<liid="server-patch-n3-variables" rel="spec:requirement" resource="#server-patch-n3-variables"><spanproperty="spec:statement">The <code>?insertions</code> and <code>?deletions</code> formulae <spanrel="spec:requirementLevel" resource="spec:MUSTNOT">MUST NOT</span> contain variables that do not occur in the <code>?conditions</code> formula.</span></li>
<liid="server-patch-n3-other-triples" rel="spec:requirement" resource="#server-patch-n3-other-triples"><spanproperty="spec:statement">The patch document <spanrel="spec:requirementLevel" resource="spec:MUSTNOT">MUST NOT</span> contain any other triples.</span></li>
747
+
<liid="server-patch-n3-variables" rel="spec:requirement" resource="#server-patch-n3-variables"><spanproperty="spec:statement">The <code>?insertions</code> and <code>?deletions</code> formulae <spanrel="spec:requirementLevel" resource="spec:MUST-NOT">MUST NOT</span> contain variables that do not occur in the <code>?conditions</code> formula.</span></li>
<liid="server-patch-n3-other-triples" rel="spec:requirement" resource="#server-patch-n3-other-triples"><spanproperty="spec:statement">The patch document <spanrel="spec:requirementLevel" resource="spec:MUST-NOT">MUST NOT</span> contain any other triples.</span></li>
750
750
</ul>
751
751
752
752
<p><spanabout="" id="server-patch-n3-invalid" rel="spec:requirement" resource="#server-patch-n3-invalid"><spanproperty="spec:statement"><spanrel="spec:requirementSubject" resource="spec:Server">Servers</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> respond with a <code>422</code> status code [<cite><aclass="bibref" href="#bib-rfc4918">RFC4918</a></cite>] if a patch document does not satisfy all of the above constraints.</span></span></p>
@@ -755,12 +755,12 @@ <h4 property="schema:name">Modifying Resources Using N3 Patches</h4>
755
755
756
756
<p><spanabout="" id="server-patch-n3-semantics" rel="spec:requirement" resource="#server-patch-n3-semantics"><spanproperty="spec:statement"><spanrel="spec:requirementSubject" resource="spec:Server">Servers</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> process a patch resource against the target document as follows:</span></span></p>
757
757
758
-
<ol>
758
+
<olabout="#server-patch-n3-semantics">
759
759
<li>Start from the RDF dataset in the target document, or an empty RDF dataset if the target resource does not exist yet.</li>
760
760
<li>If <code>?conditions</code> is non-empty, find all (possibly empty) variable mappings such that all of the resulting triples occur in the dataset.</li>
761
-
<li>If no such mapping exists, or if multiple mappings exist, the <spanrel="spec:requirementSubject" resource="spec:Server">server</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> respond with a <code>409</code> status code. [<ahref="https://github.com/solid-archive/query-panel/issues/3" rel="cito:citesAsSourceDocument">Source</a>]</li>
761
+
<li>If no such mapping exists, or if multiple mappings exist, the <spanid="server-patch-n3-semantics-no-mapping" rel="spec:requirement" resource="#server-patch-n3-semantics-no-mapping"><spanproperty="spec:statement"><spanrel="spec:requirementSubject" resource="spec:Server">server</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> respond with a <code>409</code> status code.</span></span> [<ahref="https://github.com/solid-archive/query-panel/issues/3" rel="cito:citesAsSourceDocument">Source</a>]</li>
762
762
<li>The resulting variable mapping is propagated to the <code>?deletions</code> and <code>?insertions</code> formulae to obtain two sets of resulting triples.</li>
763
-
<li>If the set of triples resulting from <code>?deletions</code> is non-empty and the dataset does not contain <em>all</em> of these triples, the <spanrel="spec:requirementSubject" resource="spec:Server">server</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> respond with a <code>409</code> status code. [<ahref="https://github.com/solid-archive/query-panel/issues/3" rel="cito:citesAsSourceDocument">Source</a>]</li>
763
+
<li>If the set of triples resulting from <code>?deletions</code> is non-empty and the dataset does not contain <em>all</em> of these triples, the <spanid="server-patch-n3-semantics-deletions-non-empty-all-triples" rel="spec:requirement" resource="#server-patch-n3-semantics-deletions-non-empty-all-triples"><spanproperty="spec:statement"><spanrel="spec:requirementSubject" resource="spec:Server">server</span><spanrel="spec:requirementLevel" resource="spec:MUST">MUST</span> respond with a <code>409</code> status code.</span></span> [<ahref="https://github.com/solid-archive/query-panel/issues/3" rel="cito:citesAsSourceDocument">Source</a>]</li>
764
764
<li>The triples resulting from <code>?deletions</code> are to be removed from the RDF dataset.</li>
765
765
<li>The triples resulting from <code>?insertions</code> are to be added to the RDF dataset, with each blank node from <code>?insertions</code> resulting in a newly created blank node.</li>
766
766
<li>The combination of deletions followed by insertions then forms the new resource state of the RDF document, and the server responds with the appropriate status code.</li>
0 commit comments