Executing SHACL-AF

24 views
Skip to first unread message

Christophe Debruyne

unread,
Jan 21, 2021, 1:39:47 PM1/21/21
to TopBraid Suite Users
Dear all,

I tried looking at previous messages for clues but to no avail.

I was wondering whether I am forgetting something in order to support SHACL-AF.

The following shape works with pyShacl.

<#USPHONESHAPE>
    a sh:NodeShape ;
    sh:target [
        a sh:SPARQLTarget ;
        sh:prefixes <#PREFIXESFORSPARQL> ;
        sh:select """
            SELECT ?this WHERE {
                ?this a vcard:Individual .
                ?this vcard:hasAddress ?address .
                ?address vcard:country-name "USA" .
            }
            """ ;
    ] ;
    sh:property [
        sh:path ( vcard:hasTelephone rdf:value ) ;
        sh:pattern "^\\(\\d{3}\\)\\s\\d{3}-\\d{4}$" ;
    ] ;
.

Topbraid's shaclvalidate.bat doesn't pick up on that shape, however. I am using the following command:
shaclvalidate.bat -datafile .\output.ttl -shapesfile .\output.ttl

I understood that shacl-af was supported and threads in the group do allude to sh:SPARQLTarget and sh:select being used. Am I missing something?

With my best regards,

Christophe Debruyne

Holger Knublauch

unread,
Jan 21, 2021, 8:09:36 PM1/21/21
to topbrai...@googlegroups.com

To speed up finding the cause of this, would you mind sending the complete file, or at least a minimal snippet that allows me to run this locally? I see nothing obviously wrong, but the devil may be in the details.

Holger

--
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/4fef5751-ef91-4d18-a332-3b1b6214a6f1n%40googlegroups.com.

Christophe Debruyne

unread,
Jan 22, 2021, 3:56:06 AM1/22/21
to TopBraid Suite Users
Dear Holger,

Thanks. Creating the minimal files helped me spot the problem. The working group's notes [1] contain a mistake: 

sh:declare [ sh:prefix "ex" ; sh:namespace <http://example.com/ns#> ; ] .   

should be

sh:declare [ sh:prefix "ex" ; sh:namespace "http://example.com/ns#"^^xsd:anyURI ; ] . 

I used the correct syntax in the other folder (probably copied from the shacl recommendation).


Holger Knublauch

unread,
Jan 22, 2021, 3:58:41 AM1/22/21
to topbrai...@googlegroups.com


On 2021-01-22 6:26 pm, Christophe Debruyne wrote:
Dear Holger,

Thanks. Creating the minimal files helped me spot the problem. The working group's notes [1] contain a mistake: 

sh:declare [ sh:prefix "ex" ; sh:namespace <http://example.com/ns#> ; ] .  

Yes! I spotted the same mistake (*my* mistake as editor of this doc) and fixed it earlier today.

Refresh your browser :)

Thanks
Holger


Reply all
Reply to author
Forward
0 new messages