Skip to content

Validation not compliant when using bnodes? #21

@vcharpenay

Description

@vcharpenay

I tested on the playground with the following shape:

@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix ex: <http://example.org/> .

ex:ClassShape a sh:NodeShape ;
  sh:targetClass ex:C ;
  sh:property [
    sh:path ex:p ;
    sh:maxCount 1
  ] .

As expected, the following instance has no violation:

@prefix ex: <http://example.org/> .

<tag:b0> a ex:C ; ex:p 0 . 
<tag:b1> a ex:C ; ex:p 1 .

However, if I use blank nodes as follows, I get a max count violation:

@prefix ex: <http://example.org/> .

_:b0 a ex:C ; ex:p 0 . 
_:b1 a ex:C ; ex:p 1 .

This should make no difference according to the standard, right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions