Re: ShEx 2.0 Candidate Release

> On Mar 29, 2017, at 3:25 AM, Lukas Rosenstock <> wrote:
> Hello!
> ShEx looks interesting and seems to fill a gap in terms of defining constraints for RDF documents!
> I have a quick question in terms of understanding the semantics and how they relate to existing RDF, apologies in advance if it’s a dumb question.
> I’m basing this on the example in the Quick Start of the Primer.
> There is inst:Student1. Where is it defined that inst:Student1 is to be validated against ex:Enrollee?

The ShEx API [1] allows two mechanisms for validating graph nodes:

* Pass in shapeMap which maps graph nodes to shapes
* Create a start shape in the schema, and pass one or more focusNodes, which are evaluated against the start shape.

The ShapeMap is defined in section 5.2 [2] of the specification. The primer discussed a “shape map” in section 2.1 [3].

ShEx would be invoked with a shape map associating inst:Student1 with school:Enrollee.

Results are returned using a variation on the same map, with node and shape, along with the result, and a possible Reason.

> My understanding would be that it would have to be stated that inst:Student1 rdf:type ex:Enrollee.,
> which implies that ex:Enrollee rdf:type rdfs:Class, shex:Shape. or even shex:Shape rdfs:subClassOf rdfs:Class..

No, the shape makes no assertions about type, the two IRIs are in different locations, inst:Student1 is in the graph to be checked, and school:Enrollee is the label of a shape in the schema. By mapping these together, we’re asserting that inst:Student1 has that shape, which that there be at least one and at most two statements where the graph node has the ex:hasGuardian predicate, and an object which is an IRI.

> Does that make any sense or am I going in a wrong direction with my thinking?

It can be helpful to use the “try it” button to open the example and play with variations on the schema and graph.

Hope that clarifies it.


[1] <>
[2] <>

> Regards,
> Lukas Rosenstock
>> Am 28.03.2017 um 10:43 schrieb Gregg Kellogg < <>>:
>> he ShEx Community Group would like to invite public review of three deliverables:
>>  Shape Expressions (ShEx) Primer <>
>>  Shape Expressions Language 2.0 <>
>>  Shape Expressions Test Suite <> including:
>>  * 337 schemas in three representations:
>>      ShExC: compact syntax
>>      ShExJ: JSON-LD 1.0 syntax
>>      ShExR: Turtle syntax
>>  * 927 validation tests.
>>  * 101 ShExC negative syntax tests
>>  * 7 negative structure tests.
>> The test suite has a Implementation Report including 4 of the 5 implementations:
>> <>
>> For feature requests please note the features in the 2.1 milestone:
>> <>
>> Many of these have been implemented and tested but are not in this version of
>> the specification. We invite feedback from the community on issues with the
>> documents or tests, new feature prioritization and new feature use cases.
>> Comments are welcome on the ShEx Community Group mailing list (archived):
>> <>
>> Readers may also wish to join the ShEx Community Group:
>> <>
>> Sincerely,
>>  Andra Waagmeester
>>  Dimitris Kontokostas
>>  Eric Prud'hommeaux
>>  Gregg Kellogg
>>  Harold Solbrig
>>  Iovka Boneva
>>  Jose Emilio Labra Gayo 
>>  Karen Coyle
>>  Katherine Thornton
>>  Tom Baker

Received on Wednesday, 29 March 2017 17:20:58 UTC