Two technologies have been proposed for RDF validation based on the notion of shape: Shape Expressions (ShEx) and Shapes Constraint Language (SHACL). The adoption of both languages in different semantic web applications and domains has been gradually increasing since their appearance and they are claiming their space in the semantic web stack. ShEx was designed as a concise, human-readable language for RDF description and validation, while SHACL was designed as an RDF vocabulary that allows to describe constraints on RDF data. Although both have some similarities, they were designed from different perspectives. In this tutorial we will present both ShEx and SHACL using examples, discuss the rationales for their design and compare them.

We will also present some tools that are being developed around shapes, as well as some applications like the wikidata entity schema namespace which allows to create an ecosystem of shape expressions to validate wikidata entities.

Slides and video recordings


RDF data can be considered the llingua franca of the semantic web. It possess a number of indisputable benefits like flexibility, easy integration and openness. It forms a core layer for knowledge representation in the semantic web stack and the availability of RDF data stores and SPARQL makes it a right choice for practical applications. Although RDF, and graph stores in general, don't demand an initial schema definition like SQL, and operates in a more flexible way, practical applications impose further demands. In that sense ShEx and SHACL work with the open spirit of RDF (natively schema-less), while giving developers and data architects a tool to impose and validate some specific constraints. The need to increase the quality of RDF data has made that the adoption of ShEx and SHACL in Semantic Web projects has been increasing and nowadays they are an important part of the semantic web tooling.

SHACL was proposed by the Data Shapes Working Group and accepted as a W3C Recommendation in July 2017 while ShEx has been proposed by the W3C ShEx community group.

Since their appearance, both ShEx and SHACL have been increasingly adopted by semantic web data practitioners. SHACL has been adopted in enterprise data management scenarios as well as government. On the other hand ShEx has also been adopted in scenarios like the Gene Ontology or Wikidata

Like the popular http://www.cambridgesemantics.com/semantic-university/sparql-by-example tutorial, this tutorial is intended to provide step-by-step instructions with examples. Participants will be able to play with validation tools using web-based interfaces like RDFShape, WikiShape or ShEx Simple online validator} to validate their RDF data.


  • RDF Data Model
  • Shape Expressions
    • Shapes and basic triple constraints
    • Groupings and cardinality
    • References and logical operators
    • Shape maps
    • Semantic actions
    • Shapes
    • Target declarations
    • Constraints: property constraints, property pair constraints, constraint operators: Or, And and Not
    • Other features: SPARQL based constraints and templates
  • Comparing ShEx and SHACL
  • Applications and tools
    • Data portals
    • Wikidata and Wikibase
  • Challenges and perspectives


  • Users will understand use cases for data shapes.
  • Users will be able to create their own RDF data shapes or schemas and validate instance data against them.
  • They will see how RDF validation works in ShEx and SHACL.
  • Users will understand some advanced validation scenarios like cyclic data models, negations or recursion as well as more complex definitions.
  • Hands-on experience will leave users comfortable using existing tools to solve practical needs in communicating schemas and verifying instance data conformance.
  • Users will be able to assess and compare the differences between ShEx and SHACL
  • Users will be able to validate and create entity schemas on Wikidata.


Anyone interested in Semantic Web technologies and tools is expected to attend this tutorial. Some rudimentary knowledge of RDF and Turtle is expected, although a short introduction to the RDF data model will be done.

Tutoring team

  • Jose Emilio Labra Gayo. Associate Professor, University of Oviedo, Spain. Founder and main researcher of WESO (Web Semantics Oviedo) research group, which collaborates with different companies around the world applying semantic web technologies. The development of data portals for several companies and public administrations led to his interest on RDF validation. He was a member of the W3C Data Shapes working group and of the W3C community groups: Shape Expressions and SHACL. He implemented the SHACL and ShEx library SHaclEX and maintains the online RDF validator services RDFShape and WikiShape.

Registration and schedule

To register, visit: ISWC'20 registration

The tutorial will start at 10:00h CET time and will end at 13:00h CET time on Monday, 2nd November 2020 (see Program).

Attendees can use the following link to attend the tutorial.


Examples and other material will be available at this repository