- From: Arthur Ryman <arthur.ryman@gmail.com>
- Date: Tue, 19 Jan 2016 13:38:36 -0500
- 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 classes: "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." CONSTRUCT { ?class sh:scopeClass ?class . } WHERE { ?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 data. -- Arthur
Received on Tuesday, 19 January 2016 18:39:04 UTC