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>
788
+
<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>
789
789
790
790
<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>
791
791
@@ -799,14 +799,14 @@ <h4 property="schema:name">Modifying Resources Using N3 Patches</h4>
799
799
<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>
800
800
</ul>
801
801
802
-
<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>
802
+
<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>
803
803
804
-
<ul>
804
+
<ulabout="#server-patch-n3-default">
805
805
<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>
806
806
<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>
807
-
<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>
807
+
<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>
810
810
</ul>
811
811
812
812
<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>
@@ -815,12 +815,12 @@ <h4 property="schema:name">Modifying Resources Using N3 Patches</h4>
815
815
816
816
<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>
817
817
818
-
<ol>
818
+
<olabout="#server-patch-n3-semantics">
819
819
<li>Start from the RDF dataset in the target document, or an empty RDF dataset if the target resource does not exist yet.</li>
820
820
<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>
821
-
<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>
821
+
<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>
822
822
<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>
823
-
<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>
823
+
<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>
824
824
<li>The triples resulting from <code>?deletions</code> are to be removed from the RDF dataset.</li>
825
825
<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>
826
826
<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