Skip to content

Commit

Permalink
Named graphs also need to be check if no shape was set
Browse files Browse the repository at this point in the history
  • Loading branch information
pietercolpaert authored Nov 28, 2023
1 parent 86eb496 commit ccb94fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions specs/0-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ A <code>tree:search</code> form is a IRI template, that when filled out with the
# The member extraction algorithm # {#member-extraction-algorithm}

The first focus node is the object of the <code>tree:member</code> triple.
1. If a shape was set, [create a shape template](#shape-template-extraction) and execute the shape template extraction algorithm, yet exclude all quads that have another member (from the current context) set as their named graph
2. If no shape was set, extract all quads with subject the focus node, and recursively include its blank nodes (see also [[!CBD]])
1. If a shape was set, [create a shape template](#shape-template-extraction) and execute the shape template extraction algorithm, yet exclude all quads that have another member (from the current context or page) set as their named graph
2. If no shape was set, extract all quads with subject the focus node, and recursively include its blank nodes (see also [[!CBD]]), yet exclude all quads that have another member (from the current context or page) set as their named graph
3. Extract all quads with the graph matching the focus node
4. When no quads were extracted from 1 and 2, a client MUST dereference the focus node and re-execute 1 and 2.
4. When no quads were extracted from 1 and 2, a client MUST dereference the focus node and re-execute 1 to 3.

## Shape Template extraction ## {#shape-template-extraction}

Expand Down Expand Up @@ -162,4 +162,4 @@ In that case, the SHACL shape MUST be processed towards a Shape Template as foll
- <code>sh:and</code>: all properties on that shape template MUST be merged with the current shape template
- <code>sh:xone</code> and <code>sh:or</code>: in both cases, at least one item must match at least one quad for all required paths. If not, it will do an HTTP request to the current namednode.

Note: The way we process SHACL shapes into Shape Template is important to understand in order to know when an HTTP request will be triggered when designing SHACL shapes. A cardinality constraint not being exactly matched or a <code>sh:pattern</code> not being respected will not trigger an HTTP request, and instead just add the invalid quads to the Member. This is a design choice: we only define triggers for HTTP request from the SHACL shape to come to a complete set of quads describing the member the data publisher pointed at using <code>tree:member</code>.
Note: The way we process SHACL shapes into Shape Template is important to understand in order to know when an HTTP request will be triggered when designing SHACL shapes. A cardinality constraint not being exactly matched or a <code>sh:pattern</code> not being respected will not trigger an HTTP request, and instead just add the invalid quads to the Member. This is a design choice: we only define triggers for HTTP request from the SHACL shape to come to a complete set of quads describing the member the data publisher pointed at using <code>tree:member</code>.

0 comments on commit ccb94fe

Please sign in to comment.