validatingrdf / validatingrdf.github.io

Public repo for Validating RDF data book
15 stars 2 forks source link

Missing data in 5.12 Shape-based Constraints Example 135 (sh:node) #15

Open jameshowison opened 6 years ago

jameshowison commented 6 years ago

Enjoying the book, but spent some time wrapping my head around example 135 in section 5.12. It seems that the "data" section is missing (and instead has a slight different definition of the sh:NodeShape)?

http://book.validatingrdf.com/bookHtml011.html#ch5.sec12.1

labra commented 6 years ago

For some reason I had missed your bug report. You are indeed right, the data part was missing.

There is another typo in that instead of sh:node :Company, it should be sh:node :CompanyShape.

A possible data part could be:

 @prefix :      <http://example.org/> .
@prefix schema: <http://schema.org/> .
@prefix sh:    <http://www.w3.org/ns/shacl#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .

:alice  a                :User ;
        schema:worksFor  :aCompany .

:bob    a                :User ;
        schema:worksFor  :wrongCompany .

:aCompany  schema:name  "ACompany" .
:wrongCompany  schema:name  23 .

You can play with the example here.

I will try to repair the bug as soon as possible in the HTML version of the book.

labra commented 5 years ago

I think it is up now. The service is currently deployed at one of my University servers by free and it may not be as stable as I would like. I would be happy to deploy it in a better place...any help would be appreciated