W3C home > Mailing lists > Public > public-schemaorg@w3.org > March 2016

SHACL version of schema.org

From: Holger Knublauch <holger@topquadrant.com>
Date: Thu, 24 Mar 2016 11:54:40 +1000
To: public-schemaorg@w3.org
Message-ID: <56F348E0.5010009@topquadrant.com>
SHACL [1] is an evolving specification created by a W3C working group. 
SHACL can be used to describe and constrain the content of RDF graphs. 
Since schema.org is a widely used vocabulary with an RDF-friendly data 
model, I thought it would be a good exercise to convert schema.org to 
SHACL. A current snapshot of this conversion can be found at


(in particular look at the Turtle file). This is basically translating 
each schema.org class into rdfs:Classes that also carry "shape 
constraints" to declare and restrict relevant properties for those 
classes. The current "official" schema.org data model doesn't contain 
much constraint-related info, so all we have right now is value type 

SHACL can express much more than currently encoded in machine-readable 
form. Some examples are listed here:


Another advantage of SHACL over the current way of describing the 
vocabulary is that SHACL property declarations are local for each class, 
i.e. it is possible to define different restrictions, labels or 
descriptions for properties that are shared between classes, or to 
specialize properties in subclasses. SHACL is very expressive and can 
even fall back to SPARQL or languages like JavaScript to express complex 
conditions. Basically it allows users to validate incoming data to 
improve data quality and spot mistakes in existing schema.org pages. In 
addition to "global" constraints, it can also be used to define 
application-specific constraints.

If there are any early adopters interested in SHACL and this work, I'd 
be more than happy to discuss.


[1] https://www.w3.org/TR/shacl/
Received on Thursday, 24 March 2016 01:55:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:12:24 UTC