Run this query at https://cim.ontotext.com/graphdb/sparql?repositoryId=cim-shacl:
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX cim1: <http://iec.ch/TC57/CIM100#>
PREFIX cim: <https://cim.ucaiug.io/ns#>
select ?p (count(*) as ?c) {
cim: sh:declare [sh:prefix ?p; sh:namespace ?n]
} group by ?p order by ?p
The reason is that each SHACL file that needs to use SPARQL, defines (a subset of these prefixes) against cim:.
The problem is that when you put all of them together (by loading to a semantic repo), now you have duplicate prefix definitions.
Declaring the same prefix many times in SPARQL is invalid.
(I haven't tested whether doing that in SHACL is invalid, but I bet it is)
So instead, you should declare the prefixes in a single file (or two, for cim and cim1), and use it from each SHACL file like this:
io:Ontology owl:imports cim: .
This will fix another potential problem. Currently each SHACL has 2 owl:Ontology records. One has metadata, the other has prefix declarations:
io:Ontology rdf:type owl:Ontology ;
# ontology metadata
cim:
a owl:Ontology ;
owl:imports sh: ;
sh:declare ...
I don't know whether that's prohibited but certainly it's very unusual and shouldn't be done.
rdfprefix declarations in weirdcc:ontology/PrefixDeclarations #80 appear in thecim:ontology too.Run this query at https://cim.ontotext.com/graphdb/sparql?repositoryId=cim-shacl:
The reason is that each SHACL file that needs to use SPARQL, defines (a subset of these prefixes) against
cim:.The problem is that when you put all of them together (by loading to a semantic repo), now you have duplicate prefix definitions.
Declaring the same prefix many times in SPARQL is invalid.
(I haven't tested whether doing that in SHACL is invalid, but I bet it is)
So instead, you should declare the prefixes in a single file (or two, for
cimandcim1), and use it from each SHACL file like this:This will fix another potential problem. Currently each SHACL has 2
owl:Ontologyrecords. One has metadata, the other has prefix declarations:I don't know whether that's prohibited but certainly it's very unusual and shouldn't be done.