W3C home > Mailing lists > Public > public-rdf-shapes@w3.org > February 2017

proposed test case for SHACL

From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
Date: Wed, 8 Feb 2017 16:22:45 -0800
To: "public-rdf-shapes@w3.org" <public-rdf-shapes@w3.org>
Message-ID: <1af2abbf-86f4-c188-9744-2a0fc0a0285e@gmail.com>
Here is a good test case for SPARQL-SHACL.

Shapes Graph:

@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix ex: <http://example.org/rock/> .

ex:s1 sh:targetClass ex:Person ;
  sh:sparql [ sh:select """ SELECT $this WHERE {
    FILTER NOT EXISTS { $this
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
	<http://example.org/rock/Rock> . } } """ ] .

Data Graph:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.org/rock/> .

_:john rdf:type ex:Person .
ex:pet rdf:type ex:Rock .

Results:

Given a definition for pre-binding that matches intuitions in this case
(which is, of course, not assured) the data graph conforms to the shapes
graph.


Peter F. Patel-Schneider
Nuance Communications
Received on Thursday, 9 February 2017 00:23:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:48 UTC