malformed shacl

22 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Sep 24, 2021, 2:55:35 PM9/24/21
to topbrai...@googlegroups.com

Hi David, Irene

 

Tbc says maformed shacl for:

 

Any tip welcome, thx Michel

 

 

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

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

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.

 

Bohms, H.M. (Michel)

unread,
Sep 24, 2021, 3:16:25 PM9/24/21
to topbrai...@googlegroups.com

Took out the prefixes there, and added 3x declare in beginning, still:

 

 

 

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

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

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.

Irene Polikoff

unread,
Sep 25, 2021, 8:27:37 PM9/25/21
to topbrai...@googlegroups.com
Hi Michel,

If you think your problem is due to some issue with prefixes, a quick workaround is to replace the QNames in the query with full URIs in <>.

I know that you sent a number of other e-mails to this list about your prefixes problems. I am quite certain that they are not about bugs in our tool, but are either a result of user error or some issues with the files you are using. 

Investigating what is happening with your example would require me to get your files and try to reproduce what you were doing. Unfortunately, we do not have time and resources to provide this kind of involved assistance free of charge. 

Many of our users have technical expertise to resolve such issues themselves and only need some general tips and hints that this list is designed to offer. When this is not the case (or for projects that may be too complicated to do without more intense interaction and mentoring from TopQuadrant), we can provide help off the mailing list through a contracted professional services project.

Regards,

Irene

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
T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@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. 
 
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 shacl
 
Hi David, Irene
 
Tbc says maformed shacl for:
 
<image005.png>
Any tip welcome, thx Michel
 
 
Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability
T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@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-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.

Bohms, H.M. (Michel)

unread,
Sep 26, 2021, 8:54:18 AM9/26/21
to topbrai...@googlegroups.com

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

 

 

 

 

 

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

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

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.

Bohms, H.M. (Michel)

unread,
Sep 27, 2021, 2:16:51 PM9/27/21
to topbrai...@googlegroups.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

 

 

 

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

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

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: topbrai...@googlegroups.com <topbrai...@googlegroups.com> On Behalf Of Irene Polikoff


Sent: Sunday, September 26, 2021 2:28 AM
To: topbrai...@googlegroups.com
Subject: Re: [topbraid-users] malformed shacl

 

Hi Michel,

Bohms, H.M. (Michel)

unread,
Sep 27, 2021, 2:24:31 PM9/27/21
to topbrai...@googlegroups.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…

 

 

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

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
michel...@tno.nl

Location

 

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.

 

Reply all
Reply to author
Forward
0 new messages