w3c / data-shapes

RDF Data Shapes WG repo
89 stars 33 forks source link

Can sh:hasValue point to multiple values? #91

Closed MiguelAraCo closed 7 years ago

MiguelAraCo commented 7 years ago

The specification doesn't explicitly say it can't but it could be implicitly inferred that it can't due to the following statement:

sh:hasValue specifies the condition that at least one value node is equal to the given RDF term.

MiguelAraCo commented 7 years ago

Also:

sh:hasValue - A specific required value.

So would this be an ill-formed shape?

<PropertyShape>
  sh:path ex:property ;
  sh:hasValue "Hello!" ;
  sh:hasValue "World" .
HolgerKnublauch commented 7 years ago

There is no such restriction. If there were a max 1 restriction then it would show up in the "Parameters" table at https://www.w3.org/TR/shacl/#HasValueConstraintComponent. In the example above, both values must be present for the property.

MiguelAraCo commented 7 years ago

👍