ShEx - Shape Expressions | |
Paradigm: | Data Validation |
Year Started: | 2013 |
Designer: | Eric Prud'hommeaux, Iovka Boneva, Jose Emilio Labra Gayo, Gregg Kellogg, Shape Expressions W3C Community Group |
Programming Language: | JavaScript, Scala |
Latest Release Version: | 2.1 |
File Ext: | shex, sx |
Scope: | Semantic Web |
Abbreviation: | ShEx |
Implementations: | shex.js,[1] Shaclex |
Influenced: | SHACL |
Shape Expressions (ShEx) [2] is a data modelling language for validating and describing a Resource Description Framework (RDF).
It was proposed at the 2012 RDF Validation Workshop[3] as a high-level, concise language for RDF validation.
The shapes can be defined in a human-friendly compact syntax called ShExC or using any RDF serialization formats like JSON-LD or Turtle.
ShEx expressions can be used both to describe RDF and to automatically check the conformance of RDF data. The syntax of ShEx is similar to Turtle and SPARQL while the semantics is inspired by regular expression languages like RelaxNG.
Person
The previous example declares that nodes conforming to shape Person
must have one property schema:name
with a string value and zero or more properties schema:knows
whose values must conform with shape Person
.
Programming language | Version | Latest release | Compatible ShEx version | Features | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
value checking | cardinality | manifest shapemap | imports | external shapes | annotations | semantic actions | ||||||
ShEx.ex | Elixir | v0.1.4 | 2020-10-13 | |||||||||
Ruby ShEx | Ruby | 0.7.1 | 2022-01-29 | 2.0 | ||||||||
shexjava | Java | 2.0 | ||||||||||
PyShEx | Python | v0.8.1 | 2022-04-14 | 2.0 | ||||||||
entityshape | Python | 0.0.2 | 2023-06-24 | |||||||||
shaclex | Scala | 0.1.70 | 2020-11-02 | |||||||||
shex.js | JavaScript | v1.0.0-alpha.26 | 2023-04-25 |