SHACL (Shapes Constraint Language) is a W3C standard for validating and describing the structure of RDF (Resource Description Framework) data. SHACL enables users to define constraints (called "shapes") on RDF graphs, ensuring that data conforms to expected schemas and business rules.
SHACL (Shapes Constraint Language) is a W3C standard for validating and describing the structure of RDF (Resource Description Framework) data. SHACL enables users to define constraints (called "shapes") on RDF graphs, ensuring that data conforms to expected schemas and business rules.
SHACL provides a way to:
SHACL is written in RDF itself, making it compatible with existing RDF tools and infrastructures.
Open in new tab to be able to click the links
SHACL provides a way to:
SHACL is written in RDF itself, making it compatible with existing RDF tools and infrastructures.
A shape is a node in an RDF graph that specifies constraints about the data. Shapes can be used to describe:
Shapes are associated with target nodes in the data graph using target declarations (e.g., by node type, specific node, or all nodes).
SHACL defines a variety of constraint components, including:
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix ex: <http://example.org/> .
ex:PersonShape
a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:property [
sh:path ex:firstName ;
sh:datatype xsd:string ;
sh:minCount 1 ;
] ;
sh:property [
sh:path ex:age ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
] .
This example defines a shape for ex:Person that requires a firstName (string, at least one) and an optional age (integer, must be ≥ 0).
⚠️ LLM-generated content notice: Parts of this page may have been created or edited with the assistance of a large language model (LLM). The prompts that have been used might be on the page itself, the discussion page or in straight forward cases the prompt was just "Write a mediawiki page on X" with X being the page name. While the content has been reviewed it might still not be accurate or error-free.