Skip to content

Validation of rdf:List or containers (rdf:Seq) #196

@u0078867

Description

@u0078867

I am trying to get the following input validated:

{
  "@context": {
    "@vocab": "https://example.com/"
  },
  "@graph": [
    {
      "@id": "http://schema.org/my_car",
      "@type": "Car",
      "color": {
        "@list": [1, "green"]
      }
    }
  ]
}

with the following SHACL:

@prefix example: <https://example.com/> .
@prefix xsd:    <http://www.w3.org/2001/XMLSchema#> .
@prefix sh:     <http://www.w3.org/ns/shacl#> .
@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

example:CarShape
        a sh:NodeShape;
        sh:description  "Abstract shape that describes a car entity" ;
        sh:targetClass  example:Car;
        sh:name         "Car";
        sh:property     [ sh:path        example:color;
                          sh:name        "color" ;
                          sh:description "Color of the car" ;
                          sh:class       rdf:List;
                        ];
.

but the validation fails. What am I doing wrong?
Thank you.

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