SHACL Playground
A constraint validator for the Shapes Constraint Language, written in JavaScript. Work in Progress!
Shapes Graph
        Always included: shacl.ttl dash.ttl
 
Data Graph
   
 
Show function call sequence
Shapes Graph Structure
Validation Report
About SHACL

SHACL is being defined by a W3C Working Group with the goal to become a standard for describing structural constraints on data graphs and validate RDF instance data against those.

In a nutshell, a SHACL processor takes a shapes graph and a data graph as input. Both can be entered here using data formats such as Turtle or JSON-LD. The shapes graph defines so-called shapes which are a collection of constraints. A shape also tells the engine for which nodes in the data graph it applies to (using targets). Constraints are of a type, called constraint components.

This Implementation

This service has been implemented in JavaScript by Holger Knublauch. Copyright © TopQuadrant, Inc. All rights reserved. The service is free to use from this web site, but the code is not to be distributed without permission. Last updated: 2017-03-02 - we are tracking the latest SHACL draft.

The design follows the emerging SHACL-JS extension mechanism for SHACL. Each constraint component (such as sh:minCount) is backed by a JavaScript function. The linkage from constraint components to these JavaScript functions is entirely declarative via RDF triples in the shapes graph. The built-in SHACL Core components are implemented in the same way as any user-defined extension. As a result, SHACL is extensible for any kind of constraint that can be expressed in JavaScript, while the shape and constraint definitions can be distributed using linked data standards.

The parsing services and in-memory triple store used by this service are provided, with many thanks, by rdflib.js.

Known Issues