@@ -330,11 +330,17 @@ If-None-Match](https://tools.ietf.org/html/rfc2616#section-14.24) HTTP headers.
330330because the behavior of PUT (overwrite) is not well defined for containers. You
331331MUST use POST (as defined by LDP) to create containers alone.
332332
333- #### Alternative: Using SPARQL
333+ #### Alternative: Using SPARQL Update
334334
335- To write data, clients can send an HTTP PATCH request with a sparql -update payload to
335+ To write data, clients can send an HTTP PATCH request with a [ SPARQL Update ] ( https://www.w3.org/TR/sparql11 -update/ ) payload to
336336the resource in question. If the resource doesn't exist, it should be created
337- through an LDP POST or through a PUT.
337+ through an LDP POST or through a PUT first.
338+ Since PATCH requests only apply to a single graph, identified by the request target,
339+ only a subset of SPARQL Update is supported, namely:
340+
341+ * [ INSERT DATA] ( https://www.w3.org/TR/sparql11-update/#insertData )
342+ * [ DELETE DATA] ( https://www.w3.org/TR/sparql11-update/#deleteData )
343+ * [ INSERT/DELETE] ( https://www.w3.org/TR/sparql11-update/#deleteInsert )
338344
339345For instance, to update the ` title ` of the container from the previous example,
340346the client would have to send a DELETE statement, followed by an INSERT
@@ -359,10 +365,14 @@ RESPONSE:
359365HTTP/1.1 200 OK
360366```
361367
362- Willful violation of the sparql-update spec: DELETEs that don't match should
363- result in a 409 response, not a 200 response.
364- See https://github.com/solid/node-solid-server/issues/1085#issuecomment-461948770
365- for more details.
368+ ** Willful violation of the sparql-update spec:**
369+ Solid purposely deviates from the SPARQL UPDATE specification.
370+ A WHERE clause should result in _ exactly_ one result mapping.
371+ If there are zero matches, or if there is more than one match,
372+ the server MUST reply with a 409.
373+ This mechanism acts as a semaphore,
374+ ensuring that the part of the data affected by the requested update
375+ has not been altered in the meantime.
366376
367377** IMPORTANT:** There is currently no support for blank nodes and RDF lists in
368378our SPARQL patches.
0 commit comments