Skip to content

Strange use of sh:or for targetClass declarations in SHACL shapes #6

@labra

Description

@labra

@jesswr pointed me to the catalog shape that appears here and I think the use of sh:or to declare optional target class declarations is not currently supported in SHACL.

I mean, this pattern:

:SolidProjectResourceShape a sh:NodeShape ;
 sh:or (
   [ sh:targetClass soar:PodService ]
   [ sh:targetClass schema:LearningResource ]
 );
 . . .

which probably means that :SolidProjectResourceShape can be applied to either soar:PodService or schema:LearningResource or any other element in that list does not work in SHACL as far as I know.

I think a simpler way to declare it would just be:

:SolidProjectResourceShape a sh:NodeShape ;
 sh:targetClass soar:PodService, schema:LearningResource, ...
 . . .

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