Hi David
This did not work for me earlier starting the whole issue but i will retry 
again tomorrow.

The spec I know and copied earlier.
The issue is that in that paragraph ...the link you copy below...it says 
"recommended" and "optional" where looking at the rdfs def of sh:declare it is 
much stronger since the domain there specifies owl:Ontology.

So to be consistent the spec should say something like..."the declare shall 
always be for an ontology graph".....

Anyway that is a shacl issue indeed...

I will focus first on the second issue....let you know outcome...

Thx michel


Op 28 sep. 2021 21:47 schreef David Price <dpr...@topquadrant.com>:
Hi Michel,

I did the following from your example but following the W3C spec and it works 
fine in Composer:

<https://w3id.org/sainput/owl/def>
  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" ;
    ] ;
.
sainput:MonsterLaag
  a owl:Class ;
  a sh:NodeShape ;
  rdfs:label "MonsterLaag" ;
  sh:rule [
      a sh:SPARQLRule ;
      sh:construct """
       CONSTRUCT {
         ?project rdf:type sa:Project .
       }
       WHERE {
         ?this sainput:projectOmschrijving ?omschrijving .
         BIND (IRI (CONCAT (\"https://w3id.org/sa/def#\";, encode_for_uri 
(?omschrijving))) AS ?project) .
       }
       """ ;
      sh:prefixes <https://w3id.org/sainput/owl/def> ;
    ] ;
.


Please see SHACL spec

5.1 An Example SPARQL-based Constraint - see 
https://www.w3.org/TR/shacl/#sparql-constraints

and

5.2.1  https://www.w3.org/TR/shacl/#sparql-prefixes

Cheers,
David


On 28 Sep 2021, at 19:54, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
<topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> wrote:

Wrt your ps

I think it is quite obvious that I mention this issue 1 here since it is so 
much related to the actual tbc issue being issue 2.

Op 28 sep. 2021 19:38 schreef David Price 
<dpr...@topquadrant.com<mailto:dpr...@topquadrant.com>>:
Hi Michel,

I did not test anything but it looks to me like you’re having problems reading 
the W3C spec. I see this in your file:

rdf:
  sh:declare [
      sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ;
      sh:prefix "rdf" ;
    ] ;
.

when the spec clearly says “The recommended subject for values of sh:declare is 
the IRI of the named graph containing the shapes that use the prefixes."

rdf: graph does not contain any shapes.

I expoect rdf: above should instead be

<https://w3id.org/sainput/owl/def>
  sh:declare [
      sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ;
      sh:prefix "rdf" ;
    ] ;
.

Cheers,
David

P.S. If you have an issue with a W3C spec, please report it to the W3C rather 
than the TB user forum.


On 28 Sep 2021, at 16:12, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
<topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> wrote:

Together with our partner, BIM-Connected, Miltos Gatzios, we tried to better 
formulate the actual issue we see with sh:declare.

Issue 1 (not tbc issue, but general shacl issue)

Metalanguage (https://www.w3.org/ns/shacl.ttl):

sh:declare
        a rdf:Property ;
        rdfs:label "declare"@en ;
        rdfs:comment "Links a resource with its namespace prefix 
declarations."@en<mailto:%22Links%20a%20resource%20with%20its%20namespace%20prefix%20declarations.%22@en>
 ;
        rdfs:domain owl:Ontology ;
        rdfs:range sh:PrefixDeclaration ;
        rdfs:isDefinedBy sh: .

Specification (Shapes Constraint Language (SHACL) 
(w3.org)<https://www.w3.org/TR/shacl/#sparql-prefixes>):

“ The recommended subject<https://www.w3.org/TR/shacl/#dfn-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.”


So the spec is flexible but the metalanguage makes a choice that it actually IS 
the named graph using the prefixes AND that it IS at an instance of 
owl:Ontology.

Issue 2 (the actual tbc/edg issue)

The implementation in tbc/edg seems to use the more strict way as recommended 
(we assume since that sh name space is used).
But that one seems not to work while the flexible way DOES seem to work …

Greetings, Michel

Ps
Attached the file where the shacl-rule does work (but we think now all prefixes 
become of type owl:Ontology…)
In case the declare’s are all attached to sainput: (the graph/ontology-prefix), 
the rule does not result in results.




Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl>

Location<http://www.tno.nl/locations/DTS>



<image001.gif><http://www.tno.nl/>

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-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/fd20239d403743a8a9aa80d4e96828ef%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/fd20239d403743a8a9aa80d4e96828ef%40tno.nl?utm_medium=email&utm_source=footer>.
<sainput.ttl>

UK +44 (0) 7788 561308
US +1 (336) 283-0808‬


--
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-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/B62F7DC9-15DC-4F01-B91D-2D569505A82C%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/B62F7DC9-15DC-4F01-B91D-2D569505A82C%40topquadrant.com?utm_medium=email&utm_source=footer>.

--
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-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/3e3294b8-6744-41b9-8586-fc9c2ee04548%40email.android.com<https://groups.google.com/d/msgid/topbraid-users/3e3294b8-6744-41b9-8586-fc9c2ee04548%40email.android.com?utm_medium=email&utm_source=footer>.

UK +44 (0) 7788 561308
US +1 (336) 283-0808‬


--
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-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/F145FDE5-1D3D-4304-BB3E-132D9BC37F19%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/F145FDE5-1D3D-4304-BB3E-132D9BC37F19%40topquadrant.com?utm_medium=email&utm_source=footer>.

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/72eafe3d-8ee3-4978-87b9-93a3736e5f05%40email.android.com.

Reply via email to