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.

Introduction

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.

What's New in SHACL 1.2

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.

Specifications

SHACL 1.2

SHACL 1.2 Overview (this document)
overviews the set of SHACL specifications
SHACL 1.2 Core
defines the Core of SHACL
SHACL 1.2 SPARQL Extensions
defines SPARQL-related extensions of the SHACL
SHACL 1.2 Node Expressions
defines graph expressions used to determine focus nodes in SHACL
SHACL 1.2 Inference Rules
defines SHACL's methods of rule-based inference
SHACL 1.2 UI
defines SHACL's use for User Interface generation
SHACL 1.2 Compact Syntax
defines an RDF syntax for expressing SHACL concepts
SHACL 1.2 Profiling
defines the use of SHACL for profiling data, including SHACL data

SHACL 1.0

The original SHACL specifications, now deprecated in favour of SHACL 1.2 specifications, above.

SHACL
the original SHACL Shapes Constraint Language definition
SHACL Advanced Features
a Working Group Note about "features to define custom targets, annotation properties, user-defined functions, node expressions and rules"
SHACL Javascript Extensions
a Working Group Note about JavaScript-based extension mechanism for the Shapes Constraint Language

Section X

TODO: This section will describe...

Governance

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.

SHACL-SHACL

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:

SHACL-SHACL Core
Core specification elements only
SHACL-SHACL SPARQL
SPARQL specification elements only
SHACL-SHACL Node Expressions
Node Expression specification elements only
SHACL-SHACL Inference Rules
Inference Rules specification elements only
SHACL-SHACL UI
UI specification elements only
SHACL-SHACL Profiling
Profiling specification elements only

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:

SHACL-SHACL union
the union of all other SHACL-SHACL graphs

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.

Security and Privacy Considerations

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.

Acknowledgements

Many people contributed to this document, including members of the RDF Data Shapes Working Group.