diff --git a/protocol.html b/protocol.html index f9cdd114..a405a71a 100644 --- a/protocol.html +++ b/protocol.html @@ -46,9 +46,11 @@ figure .example-h { margin-top:0; text-align: left; -text-transform: uppercase; color:#827017; } +figure .example-h > span { +text-transform: uppercase; +} header address a[href] { float: right; margin: 1rem 0 0.2rem 0.4rem; @@ -719,6 +721,63 @@
Servers MAY use the HTTP ETag header with a strong validator for RDF bearing representations in order to encourage clients to opt-in to using the If-Match header in their requests.
Servers MUST accept a PATCH request with an N3 Patch body when the target of the request is an RDF document [RDF11-CONCEPTS]. Servers MUST indicate support of N3 Patch by listing text/n3 as a value of the Accept-Patch header [RFC5789] of relevant responses. [Source]
An N3 Patch is a document in the Notation3 (N3) format [N3], identified by the media type text/n3, conforming to the following constraints:
?patch in the remainder of this section.?patch rdf:type solid:Patch.?patch solid:deletes ?deletions.?patch solid:inserts ?insertions.?patch solid:where ?conditions.?deletions, ?insertions, and ?conditions MUST be non-nested cited formulae [N3] consisting only of triples and/or triple patterns [SPARQL11-QUERY]. When not present, they are presumed to be the empty formula {}.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:
+ +?patch subject.?patch rdf:type solid:InsertDeletePatch.?insertions and ?deletions formulae MUST NOT contain variables that do not occur in the ?conditions formula.?insertions and ?deletions formulae MUST NOT contain blank nodes.Servers MUST respond with a 422 status code [RFC4918] if a patch document does not satisfy all of the above constraints.
When ?conditions is non-empty, servers MUST treat the request as a Read operation. When ?insertions is non-empty, servers MUST (also) treat the request as an Append operation. When ?deletions is non-empty, servers MUST treat the request as a Read and Write operation.
Servers MUST process a patch resource against the target document as follows:
+ +?conditions is non-empty, find all (possibly empty) variable mappings such that all of the resulting triples occur in the dataset.409 status code. [Source]?deletions and ?insertions formulae to obtain two sets of resulting triples.?deletions is non-empty and the dataset does not contain all of these triples, the server MUST respond with a 409 status code. [Source]?deletions are to be removed from the RDF dataset.?insertions are to be added to the RDF dataset, with each blank node from ?insertions resulting in a newly created blank node.Example: Applying an N3 patch.
++@prefix solid: <http://www.w3.org/ns/solid/terms#>.+@prefix ex: <http://www.example.org/terms#>.++_:rename a solid:InsertDeletePatch;+solid:where { ?person ex:familyName "Garcia". };+solid:inserts { ?person ex:givenName "Alex". };+solid:deletes { ?person ex:givenName "Claudia". }.