Thx, in the manual way:
      rdf:type sh:PrefixDeclaration ;
was missing….

Works fine now, thx!









Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist


T +31888663107
M +31630381220
E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl>

Location<https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707>



[cid:image001.gif@01D3A184.58790EC0]<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.









Van: topbraid-users@googlegroups.com [mailto:topbraid-users@googlegroups.com] 
Namens Holger Knublauch
Verzonden: donderdag 8 februari 2018 23:29
Aan: topbraid-users@googlegroups.com
Onderwerp: Re: [topbraid-users] prefix in shacl

Hi Michel,

to add a SHACL prefix declaration, use the SHACL button on the namespaces tab:

[cid:image002.png@01D3A184.58790EC0]

Then the only other thing you need to change is remove the # from the reference 
in sh:prefixes, so that it becomes

      sh:prefixes <https://w3id.org/bouwbesluit><https://w3id.org/bouwbesluit> ;

The sh:prefixes triple needs to point at the owl:Ontology itself, not the 
namespace including the #.

HTH
Holger


On 8/02/2018 22:10, Bohms, H.M. (Michel) wrote:
Am I doing something wrong with the prefix in?
Or something more fund. Wrong? I want to constraint the area of a certain space…


(error when shacl-check:
Reason:
org.topbraid.shacl.validation.SHACLException: Invalid SPARQL constraint (Line 
4, column 47: Unresolved prefixed name: bb:oppervlak):


                                                                SELECT $this 
?opp
                                                                WHERE {
                                                                                
$this bb:oppervlak ?opp .
                                                                                
FILTER (?opp < 5) .
                                                                }



# baseURI: https://w3id.org/bouwbesluit
# imports: http://datashapes.org/dash
# prefix: bb

@prefix bb: <https://w3id.org/bouwbesluit#><https://w3id.org/bouwbesluit> .
@prefix dash: <http://datashapes.org/dash#><http://datashapes.org/dash> .
@prefix owl: <http://www.w3.org/2002/07/owl#><http://www.w3.org/2002/07/owl> .
@prefix rdf: 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#><http://www.w3.org/1999/02/22-rdf-syntax-ns>
 .
@prefix rdfs: 
<http://www.w3.org/2000/01/rdf-schema#><http://www.w3.org/2000/01/rdf-schema> .
@prefix sh: <http://www.w3.org/ns/shacl#><http://www.w3.org/ns/shacl> .
@prefix xsd: 
<http://www.w3.org/2001/XMLSchema#><http://www.w3.org/2001/XMLSchema> .

<https://w3id.org/bouwbesluit><https://w3id.org/bouwbesluit>
  rdf:type owl:Ontology ;
  owl:imports <http://datashapes.org/dash><http://datashapes.org/dash> ;
  owl:versionInfo "Created with TopBraid Composer" ;
.
bb:Toilet
  rdf:type owl:Class ;
  rdf:type sh:NodeShape ;
  rdfs:subClassOf bb:Verblijfsruimte ;
   sh:sparql
              [ sh:message "Minimaal oppervlak wc" ;
                sh:prefixes 
<https://w3id.org/bouwbesluit#><https://w3id.org/bouwbesluit>  ;
                     sh:select """
                            SELECT $this ?opp
                           WHERE {
                                  $this bb:oppervlak ?opp .
                                  FILTER (?opp < 5) .
                           }""" ;
              ] ;
.
bb:Toilet_1
  rdf:type bb:Toilet ;
  bb:oppervlak "3.0"^^xsd:float ;
.
bb:Verblijfsruimte
  rdf:type owl:Class ;
  rdf:type sh:NodeShape ;
  rdfs:subClassOf owl:Thing ;
.
bb:breedte
  rdf:type rdf:Property ;
  rdfs:range xsd:float ;
.
bb:diepte
  rdf:type rdf:Property ;
  rdfs:range xsd:float ;
.
bb:oppervlak
  rdf:type rdf:Property ;
  rdfs:range xsd:float ;
.





Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist



T +31888663107
M +31630381220
E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl>

Location<https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=%213m1%214b1%214m5%213m4%211s0x47c5b58c52869997:0x56681566be3b8c88%218m2%213d52.000788%214d4.376707>



[cid:image001.gif@01D3A184.58790EC0]<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>.
For more options, visit https://groups.google.com/d/optout.

--
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>.
For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to