Skip to content

Ability to know in a validation report which shapes actually matched some targets, and which didn't #325

@tfrancart

Description

@tfrancart

In a validation report, it is impossible to distinguish between 2 situations:

  1. A shape found some targets, and all targets conforms to the shape (hence, no validation results triggered by that shape)
  2. The shape did not found any target (hence, no validation results triggered by that shape)

This can lead to (very) misleading situations where the validation report is empty, not because the data is valid, but because no targets were matched (e.g. a wrong identifier used in a sh:targetClass)

An idea to implement this would be to have an extra option when computing the validation report, e.g. "includeTargets" or something similar, that would add an explicit link (e.g. sh:hasTarget) between shapes and their targets in the validation report:

# this shape found some targets
ex:MyShape a sh:NodeShape
  sh:hasTarget ex:node1, ex:node2 ;
.

# this one didn't
ex:MyShape a sh:NodeShape .

(could be also in the other direction ex:node1 sh:isTargetOf ex:MyShape)

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