The Shapes Constraint Language, "SHACL", is a language for validating RDF graphs against a set of conditions. SHACL has a core specification, extensions for related query languages, User Interface generation, rule-based reasoning and a data profiling mechanism. This document overviews all these parts of SHACL and serves as an introduction to all of them and related on-going work such as libraries of examples.
This documentation is published by the Data Shapes Working Group.
This document provides a non-normative, high-level, overview of the various Shapes Constraint Language (SHACL) specifications.
The second iteration of the World Wide Web Consortium's Data Shapes Working Group aimed to "...update data shapes standards in line with the versions of core Semantic Web standards that cater for RDF-star and to extend the applications of data shapes with new packaging and use specifications". The outcome of the Working Group's operations was a set of specifications - W3C 'Recommendations' - that cover core SHACL elements, extended elements for advanced validation and SHACL functions beyond validation, such as User Interface generation.
The What's new in SHACL 1.2 section below describes the changes between SHACL, as published in 2017 and SHACL 1.2, including all the new SHACL elements such as SHACL for User Interface generation.
The Specifications section below lists all the Data Shapes Working Group's specifications which are also listed in each specification's Introduction.
The appendixes below contain material supporting the set of SHACL specifications and provide SHACL users with additional support, such as validators for shapes graphs.
The main information about SHACL 1.0 → 1.2 will be added here.
SHACL 1.0 Core included an appendix providing a shapes graph to be used to validate shapes graphs according to the SHACL 1.0 Core specification. SHACL 1.2 has moved this information from the Core specification to an appendix in this Overview to allow for information relevant to parts of SHACL 1.2 not in the Core. A note about this new SHACL-SHACL location is retained in SHACL 1.2 Core.
The original SHACL specifications, now deprecated in favour of SHACL 1.2 specifications, above.
TODO: This section will describe...
TODO: This section will describe the governance arrangements in place for the continued maintenance of SHACL-SHACL resources, i.e., handling updates beyond the time frame of the Working Group's Charter.
The Data Shapes Working Group maintains SHACL graphs known as "SHACL-SHACL", which are used to validate other SHACL Shapes graphs. Multiple graphs exist to enable the validation of subsets within the complete body of SHACL elemenmts defined in the various SHACL specifications.
Each SHACL-SHACL graph corresponds to the scope of individual SHACL specifications and are available as RDF resources:
There is no SHACL-SHACL graph for SHACL Compact Syntax since the specification defines an RDF syntax specialised for describing SHACL concepts - and does not introduce any new concepts itself.
Additionally, the union of the above shapes graphs is also provided:
The SHACL-SHACL shapes graphs listed above can be retrieved from their namespace IRIs and are also available within the W3C SHACL Resources repository which also contains other community-generated SHACL resources.
The SHACL-SHACL Shapes graphs do not import or modify the data they evaluate, ensuring that they do not impact an organization's information when applied to it. They only report on the data's validity according to the vocabulary-subset of SHACL corresponding to the utilized Shapes graph and any imports of other SHACL-SHACL Shapes graphs (e.g., all SHACL-SHACL shapes graphs will import SHACL-SHACL Core). Additionally, they do not automatically export results anywhere beyond a SHACL processor's standard output channel.
For these reasons, this content is expected to present minimal security and privacy concerns.
Many people contributed to this document, including members of the RDF Data Shapes Working Group.