- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Thu, 1 Jan 2015 18:43:36 -0500
- To: Judson Lester <nyarly@gmail.com>
- Cc: public-rdf-shapes@w3.org
* Judson Lester <nyarly@gmail.com> [2015-01-01 21:35+0000] > (Originally posted erroneously to public-rdf) > > I know that the Shapes WG is relatively recent, but I'm wondering if it > aligns with some work I was doing with RDF. > > I've been building a RESTful framework with RDF as a part of the > abstraction, and discovered that I needed at way to describe graphs and > subgraphs in a way that was analogous to HTML forms. (I'm making no claims > to the profundity of this discovery. I assume it's relatively well known.) > > I wound up defining a vocabulary of "paths" in RDF that could be used to > match parts of a graph, something like regular expressions match strings. > The next steps would be to extend that idea to have "captures" so that > clients can extract data from the graph without having to hard-code its > structure. > > My rough understanding of Shapes is that they're largely the same idea > arrived at from a different direction, and I'd be interested in at least > following their development, perhaps contributing to it. > > Do I understand Shapes correctly, or have I missed something? "Shapes" itself it a bit of a generic term (intentionally, because the WG needed some way to talk about structural constraints on a graph without favoring a particular technology). There are four principle candidates for shapes: Resource Shapes (IBM) - a recursive grammar to describe constraints on some node in an RDF graph including: Expected properties and their cardinalities. Object type, which can be: Value set — enumeration of possible values. RDFLiteral data type. A reference to another "shape" (potentially cyclic). Resource Shapes is expressed as an RDF vocabulary described in a W3C Submission <http://www.w3.org/Submission/shapes/>. SPIN (Top Quadrant) — a generic inferencing and constraint checking convention expressed in terms of rules attached to RDF classes. SPIN rules are expressed as SPARQL CONSTRUCTS, constraints as either ASKs or CONSTRUCTs that build an error object. The process of constraint checking involves inference for discovery of types and validation performed based on those discovered types. SPIN is also a W3C Submission <http://www.w3.org/Submission/spin-overview/>. Not mentioned in the submission is a vocabulary based on RDFS analogous to the Resource Shapes vocabulary. OWL ICV, or OWL with closed world and unique name assumption also weaves discovery into validation. Where conventional OWL's open world semantics prevents one from e.g. failing a minimum cardinality constraint or catching misspellings, OWL ICV leverages the same schema definition with a semantics which presumes that missing data is an error and that no individuals, properties or classes are equivalent unless specifically asserted. While it uses OWL structures, the only implementation does not leverage a conventional reasoner for validation; schemas are translated to sets of SPARQL queries for evaluation. Shape Expressions is a W3C Submission interpreting and formalizing (<http://www.w3.org/Submission/shex-defn/>) the description of the Resource Shapes vocabulary. An auxilliary language, ShExC, is designed for terse, human-facing presentation of schemas. ShEx extends Resource Shapes with semantic actions that can be used for extending the expressivity (for e.g. date comparison) or e.g. AST or document generation such as the GenX demo <http://www.w3.org/2013/ShEx/Examples/#GenX>. This sounds the closest to what you're describing in terms of capture groups. > Judson -- -ericP office: +1.617.599.3509 mobile: +33.6.80.80.35.59 (eric@w3.org) Feel free to forward this message to any list for any purpose other than email address distribution. There are subtle nuances encoded in font variation and clever layout which can only be seen by printing this message on high-clay paper.
Received on Thursday, 1 January 2015 23:43:39 UTC