W3C | Submissions

Submission Version:

Team Comment on the "Resource Shape 2.0" Submission

"Resource Shape 2.0" provides a way to constrain the properties, types and cardinality of nodes in RDF graphs. These constraints, expressed in an RDF vocabulary, are intended for validation of data as well as description of APIs and datasets. Additional properties such as hidden and readOnly can inform generation of human interfaces. This definition of "shapes" fills a significant gap in the Semantic Web stack by providing the contraints that are available in other languages, such as XML Schema for XML data and Data Definition Language for SQL data. Like these other schema languages Resource Shapes provides a recursive definition for a shape where the value of some property is defined by another shape (see oslc:valueShape).

The Submission contrasts constraints-based definition of RDF graph shapes against the inference-based methods available with RDFS and OWL. High-level use cases describe the use of shapes in conventionally deployed systems. These use cases motivate the two properties for associating RDF graph nodes with one or more shapes: oslc:instanceShape for pairing a specific node with a shape and oslc:resourceShape for associating some aspect of a service API with a shape. While the practical applicability to systems and workflows is apparent, more work is needed to define the semantics when e.g. multiple potentially conflicting shapes are associated with some node.


The RDF vocabulary described in this Submission associates a shape identifier with a set of constraints. While not explicitly stated, this implies a conjunction of property constraints where each occurance of the property in the data must conform to each of the constraints associated with that property.

The 2013 W3C RDF Validation Workshop assembled requirements and proposals around RDF validation and interface specification. The agenda for that workshop lists several approaches to meeting similar use cases. Dublin Core's Description Set Profiles (DSP) identifies similar cardinality constraint restrictions. Shape Expressions provides a grammar-like syntax for specifying shapes.

Future Work

This document provides a useful constraints language as well as laying the groundwork for future work on validation and shape definition languages and protocols. Such work could define:

Continuing discussion of this topic, including whether or not this area is ready for W3C standards-track work, is welcome on the mailing list public-rdf-shapes@w3.org (achives).

Eric Prud'hommeaux <eric@w3.org>
$Date: 2014-04-09 21:56:25 $