W3C home > Mailing lists > Public > public-shex@w3.org > March 2017

Re: ShEx 2.0 Candidate Release

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Wed, 29 Mar 2017 10:20:23 -0700
Message-Id: <29455D32-16E1-476C-B898-BAA193550D92@greggkellogg.net>
Cc: W3C Semantic Web IG <semantic-web@w3.org>, public-rdf-shapes@w3.org, public-shex@w3.org
To: Lukas Rosenstock <lukas@cloudobjects.io>
> On Mar 29, 2017, at 3:25 AM, Lukas Rosenstock <lukas@cloudobjects.io> 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.

Gregg

[1] http://shex.io/shex-semantics/index.html#the-application-programming-interface <http://shex.io/shex-semantics/index.html#the-application-programming-interface>
[2] http://shex.io/shex-semantics/index.html#shape-map <http://shex.io/shex-semantics/index.html#shape-map>
[3] http://shex.io/shex-primer/index.html#validation

> Regards,
> 
> Lukas Rosenstock
> 
>> Am 28.03.2017 um 10:43 schrieb Gregg Kellogg <gregg@greggkellogg.net <mailto:gregg@greggkellogg.net>>:
>> 
>> he ShEx Community Group would like to invite public review of three deliverables:
>> 
>>  Shape Expressions (ShEx) Primer http://shex.io/shex-primer/ <http://shex.io/shex-primer/>
>>  Shape Expressions Language 2.0 http://shex.io/shex-semantics/ <http://shex.io/shex-semantics/>
>>  Shape Expressions Test Suite https://github.com/shexSpec/shexTest/ <https://github.com/shexSpec/shexTest/> 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:
>>  http://shexspec.github.io/shexTest/reports/ <http://shexspec.github.io/shexTest/reports/>
>> 
>> For feature requests please note the features in the 2.1 milestone:
>>  https://github.com/shexSpec/shex/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.1 <https://github.com/shexSpec/shex/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.1>
>> 
>> 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):
>>  public-shex@w3.org <mailto:public-shex@w3.org>
>> 
>> Readers may also wish to join the ShEx Community Group:
>>  https://www.w3.org/community/shex/join <https://www.w3.org/community/shex/join>
>> 
>> 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

This archive was generated by hypermail 2.3.1 : Wednesday, 29 March 2017 17:20:59 UTC