Skip to content

Commit

Permalink
doc: fix grammar issues in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
woutslabbinck committed Jan 18, 2023
1 parent 42a526f commit 39d922f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions documentation/constrained-containers.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Constrained containers

In CSS, it is possible to have containers where all its resources conform to a given [SHACL](https://www.w3.org/TR/shacl/) shape.
Providing shape validation ensures that applications can then rely on the fact that
the structure of the graph in the resources are valid.
Providing shape validation ensures that applications can then rely on the fact that
the structure of the graph in the resources is valid.

## Constrained containers in practice

Expand All @@ -12,7 +12,7 @@ A container can be made shape constrained by editing its description resource.
A triple of the form `?container ldp:constrainedBy ?shape .` must be added,
where `?container` is the URL of the container being made constrained and `?shape` is the URL of the SHACL shape.

A precondition for making a container constrained is that the container must not contain any resource at initialisation of making it shape constrained.
A precondition for making a container constrained is that the container must not contain any resources.
Furthermore, it is only possible to initialise one shape resource per container.

### Discovery of a constrained container
Expand All @@ -22,12 +22,12 @@ with `"rel"` `http://www.w3.org/ns/ldp#constrainedBy` as is defined in [LDP](htt

## Impact of constraining a container

Only resources can be created that conform to the constraints on a constrained container.
Only resources can be created that conform to the constraints of a constrained container.
However, some additional restrictions are enforced by the server on that container:

* It is not possible to add any non-RDF resources.
* Creating containers within this constrained container is not allowed.
* Requests that results into a resource where no targetClasses from the shape are present are prohibited and will thus produce an error.
* Requests that result in a resource where no `sh:targetClasses` from the shape are present are prohibited and will thus produce an error.

## Example of a workflow on how to constrain a container

Expand All @@ -47,7 +47,7 @@ solid:inserts { <http://localhost:3000/container/> <http://www.w3.org/ns/ldp#con
```

After this update, we can verify that the container is indeed constrained with a shape by
performing a `HEAD` request to container.
performing a `HEAD` request to the container.

```curl
curl --head http://localhost:3000/container/
Expand All @@ -58,8 +58,8 @@ which will produce a response with at least this header:
Link: <http://localhost:3000/shape>; rel="http://www.w3.org/ns/ldp#constrainedBy"
```

The container is now indeed constrained by the shape.
This means that all the resources that will be added in this container are conform to the shape.
The container is now indeed constrained by the shape.
This means that all the resources that will be added to this container conform to the shape.

In this example, we used a SHACL shape that was stored on the server.
In this example, we used a SHACL shape that was stored on the server.
However, we can use any SHACL shape that can be fetched on the web via HTTP.

0 comments on commit 39d922f

Please sign in to comment.