We present Shape Expressions (ShEx), an expressive schema language for RDF designed to provide a high-level, user friendly syntax with intuitive semantics. ShEx allows to describe the vocabulary and the structure of an RDF graph, and to constrain the allowed values for the properties of a node. It includes an algebraic grouping operator, a choice operator, cardinalitiy constraints for the number of allowed occurrences of a property, and negation. We define the semantics of the language and illustrate it with examples. We then present a validation algorithm that, given a node in an RDF graph and a constraint defined by the ShEx schema, allows to check whether the node satisfies that constraint. The algorithm outputs a proof that contains trivially verifiable associations of nodes and the constraints that they satisfy. The structure can be used for complex post-processing tasks, such as transforming the RDF graph to other graph or tree structures, verifying more complex constraints, or debugging (w.r.t. the schema). We also show the inherent difficulty of error identification of ShEx.
[1]
Juan L. Reutter,et al.
Recursion in SPARQL
,
2015,
SEMWEB.
[2]
Georg Lausen,et al.
RDF Constraint Checking
,
2015,
EDBT/ICDT Workshops.
[3]
Boris Motik,et al.
Adding Integrity Constraints to OWL
,
2007,
OWLED.
[4]
Jose María Álvarez Rodríguez,et al.
Validating and Describing Linked Data Portals using RDF Shape Expressions
,
2014,
LDQ@SEMANTICS.
[5]
Harold R. Solbrig,et al.
Towards an RDF Validation Language Based on Regular Expression Derivatives
,
2015,
EDBT/ICDT Workshops.
[6]
Jiao Tao,et al.
Integrity Constraints in OWL
,
2010,
AAAI.
[7]
Jens Lehmann,et al.
Test-driven evaluation of linked data quality
,
2014,
WWW.
[8]
Jose Emilio Labra Gayo.
Validating statistical index data represented in RDF using SPARQL queries
,
2013
.
[9]
Harold R. Solbrig,et al.
Shape expressions: an RDF validation and transformation language
,
2014,
SEM '14.
[10]
Iovka Boneva,et al.
Complexity and Expressiveness of ShEx for RDF
,
2015,
ICDT.