[data-shapes] sh:prefixes vs rdfs:isDefinedBy (#858)

VladimirAlexiev has just created a new issue for https://github.com/w3c/data-shapes:

== sh:prefixes vs rdfs:isDefinedBy ==
- https://github.com/w3c/data-shapes/issues/857 makes the case that many NodeShapes and PropertyShapes may want to use `sh:prefixes` not just SPARQL NodeShapes
- In all SHACL examples `sh:prefixes` points to an ontology (and that's the right place, rather than hanging `sh:declare` off of random nodes)
- A long-established best practices is that every ontology term needs to have `rdfs:isDefinedBy` pointing to the ontology
- Implicit targeting (and the new `sh:ClassShape`) creates classes and shapes at one go, so using `rdfs:isDefinedBy` is fully warranted:
```ttl
:MyClass a rdfs:Class, sh:NodeShape;
  rdfs:isDefinedBy :MyOntology.
:YourClass a sh:ClassShape;
  rdfs:isDefinedBy :MyOntology.
```
- @nicholascar was looking for a way to tie up shapes to ontologies, as part of modularization/profiles

So we have 2 props that relate a Shape to an Ontology:
- `rdfs:isDefinedBy` has stronger semantics as it says "the Shape is part of the Ontology"
- `sh:prefixes` has weaker semantics as it says "the Shape uses prefixes attached to the Ontology"

I guess the request I'm making is this:
- if a NodeShape or PropertyShape has `rdfs:isDefinedBy` then also infer a parallel `sh:prefixes` link
  - we cannot just say `rdfs:isDefinedBy rdfs:subProperyOf sh:prefixes` because that's not true of non-SHACL ontology terms
- a NodeShape or PropertyShape is not allowed to have different `rdfs:isDefinedBy` and `sh:prefixes`



Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/858 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 April 2026 15:41:02 UTC