Hi David, Irene
Tbc says maformed shacl for:

Any tip welcome, thx Michel
|
||||||||||||||||
Took out the prefixes there, and added 3x declare in beginning, still:

|
||||||||||||||||
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
topbraid-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/6a93f92fda784aaf98b0bc4773ce7e71%40tno.nl.
On Sep 24, 2021, at 3:16 PM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:
Took out the prefixes there, and added 3x declare in beginning, still:
<image003.png>
Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
From: 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com>
Sent: Friday, September 24, 2021 8:56 PM
To: topbrai...@googlegroups.com
Subject: [topbraid-users] malformed shaclHi David, IreneTbc says maformed shacl for:
<image005.png>
Any tip welcome, thx Michel
Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/6a93f92fda784aaf98b0bc4773ce7e71%40tno.nl.
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/0ffc2a35a5414b63993ea69ed18b1e13%40tno.nl.
Dear Irene
I fully understand and apologize.
It just sometimes so frustrating that you looked at all the examples available and sparql/shacl/shacl-af specs, copied all that was there in and it still does not work as expected.
So as a last resort you hope to get a tip via the list….
I pinpointed the actual issue to the sh:construct clause: “Unresolved prefixed name rdf:type”.
So hard to understand: I have a sh:prefixes for rdf in the sh:rule (following the examples in https://w3c.github.io/shacl/shacl-af/#rules).
sainput:MonsterLaag
a owl:Class ;
a sh:NodeShape ;
rdfs:label "MonsterLaag" ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes sa: ;
sh:prefixes sainput: ;
sh:prefixes rdf: ;
sh:construct """
CONSTRUCT {
?uri rdf:type sa:Project .
}
WHERE {
?this sainput:projectOmschrijving ?omschrijving .
BIND (IRI (CONCAT ("https://w3id.og/sa/def#", ?omschrijving )) AS ?uri) .
}
""" ;
] ;
.
And following the examples in the specs I also added to the ontology (even to the importing ontology since I was not sure whether owl:imports also imports the sh:declare’s):
<https://w3id.org/sainput/owl/def>
a owl:Ontology ;
owl:imports sh: ;
sh:declare [
sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ;
sh:prefix "rdf" ;
] ;
sh:declare [
sh:namespace "https://w3id.org/sa/def#"^^xsd:anyURI ;
sh:prefix "sa" ;
] ;
sh:declare [
sh:namespace "https://w3id.org/sainput/def#"^^xsd:anyURI ;
sh:prefix "sainput" ;
] ;
.
So you start wondering, what else could possibly go wrong!
And yes, I already tried, as you suggested earlier, to replace all prefixes by uri’s.
In that case there is no problem at all: the rule generates the instance.
![]()
Apologies again Michel
|
|
|
| ||||||||
.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/8DA4CD5F-BA0A-44C6-96D7-57AA83A6CB32%40topquadrant.com.
Dear Irene
I fixed my file by taking the sh:declare’ s out of the ontology clause.
A partner of us noted that there are two styles of declarations:
1. acc. to shacl
Here the example with sh:declare shows that you can declare prefixes inside the ontology instance
https://www.w3.org/TR/shacl/#sparql-prefixes
several prefixes are collected under the ontology clause.
This one seems not to work in TBC.
2. acc. to shacl-af
but in Advanced features an example with the sh:declare is outside the ontology instance.
https://www.w3.org/TR/shacl-af/#SPARQLTarget
This one DOES work in TBC.
Here every prefix has its own declaration.
Maybe you can indicate why there are two different ways and why the shacl-way does not work?
Thx a lot,
Michel
|
|
|
| ||||||||
Sent: Sunday, September 26, 2021 2:28 AM
To: topbrai...@googlegroups.com
Subject: Re: [topbraid-users] malformed shacl
Hi Michel,
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/8DA4CD5F-BA0A-44C6-96D7-57AA83A6CB32%40topquadrant.com.
One more:
Given:
“ The
recommended subject for
values of sh:declare is the IRI
of the named graph containing the shapes that use the prefixes. These IRIs are often declared as an instance of owl:Ontology,
but this is not required.”
Both ways should work I guess…
|
||||||||||||||||
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/20becbedbadf419e8f7350d99d4a24d0%40tno.nl.