- From: Holger Knublauch <holger@topquadrant.com>
- Date: Thu, 24 Mar 2016 11:54:40 +1000
- To: public-schemaorg@w3.org
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
http://datashapes.org/schema
(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
restrictions.
SHACL can express much more than currently encoded in machine-readable
form. Some examples are listed here:
https://www.w3.org/TR/shacl-ucr/#uc23-schema.org-constraints
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.
Thanks,
Holger
[1] https://www.w3.org/TR/shacl/
Received on Thursday, 24 March 2016 01:55:16 UTC