W3C home > Mailing lists > Public > public-data-shapes-wg@w3.org > January 2016

ISSUE-23: Where should we query for class and subClassOf?

From: Arthur Ryman <arthur.ryman@gmail.com>
Date: Tue, 19 Jan 2016 13:38:36 -0500
Message-ID: <CAApBiO=6eid_FEkSNebzmJMJu4=0W9qD50Yh7QZbNhSdgyvugQ@mail.gmail.com>
To: "public-data-shapes-wg@w3.org" <public-data-shapes-wg@w3.org>
While reading the spec I noticed the following statement:

"To determine class membership, the rdf:type and rdfs:subClassOf
triples are queried in the data graph."

However, querying the data graph for class and subclass information is
inconsistent with the example SPARQL for determining which shapes are

"As syntactic sugar for the scenario above, SHACL includes a rule that
if a class is also a shape (in the shapes graph), then the
sh:scopeClass triple pointing at itself can be omitted. This rule is
illustrated by the following SPARQL CONSTRUCT query, which may be
executed over the shapes graph prior to validation, to produce the
implicit sh:scopeClass triples."

?class sh:scopeClass ?class .
?class rdfs:subClassOf*/rdf:type rdfs:Class .
?class rdfs:subClassOf*/rdf:type sh:Shape .

I propose that in both cases we query the shapes graph, NOT the data graph.

Recall that we expect the application to provide a shapes graph and a
data graph as input to the SHACL validator. Therefore, the application
can always copy any rdfs:Class and rdfs:subClassOf triples into the
shapes graph. Although RDF does not require class definitions to be
separated from data instances, in practice these are often separated.
Both shapes and classes are more properly regarded as metadata than

-- Arthur
Received on Tuesday, 19 January 2016 18:39:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:30:29 UTC